Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use longhand gitoxide path-spec patterns #14380

Merged
merged 2 commits into from
Aug 12, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
test: Add test for issue #14379
  • Loading branch information
jemtucker committed Aug 10, 2024
commit 972d5346a20f93480a59f1a0649df9b0ccdc344b
35 changes: 34 additions & 1 deletion tests/testsuite/build_script.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ use cargo_test_support::tools;
use cargo_test_support::{
basic_manifest, cargo_exe, cross_compile, is_coarse_mtime, project, project_in,
};
use cargo_test_support::{rustc_host, sleep_ms, slow_cpu_multiplier, symlink_supported};
use cargo_test_support::{git, rustc_host, sleep_ms, slow_cpu_multiplier, symlink_supported};
use cargo_util::paths::{self, remove_dir_all};

#[cargo_test]
Expand Down Expand Up @@ -5814,3 +5814,36 @@ fn links_overrides_with_target_applies_to_host() {
"#]])
.run();
}

#[cargo_test]
fn directory_with_leading_underscore() {
let p: cargo_test_support::Project = git::new("foo", |p| {
p.no_manifest()
.file(
"_foo/foo/Cargo.toml",
r#"
[package]
name = "foo"
version = "0.1.0"
edition = "2021"
build = "build.rs"
"#,
)
.file("_foo/foo/src/main.rs", "fn main() {}")
.file("_foo/foo/build.rs", "fn main() { }")
});
p.cargo("build --manifest-path=_foo/foo/Cargo.toml -v")
.with_status(101)
.with_stderr_data(r#"[ERROR] failed to determine package fingerprint for build script for foo v0.1.0 ([ROOT]/foo/_foo/foo)

Caused by:
failed to determine the most recently modified file in [ROOT]/foo/_foo/foo

Caused by:
failed to determine list of files in [ROOT]/foo/_foo/foo

Caused by:
Unimplemented short keyword: '_'
"#)
.run();
}