Eliminate lazy_static (#1442)
This commit is contained in:
@@ -105,7 +105,7 @@ fn working_directory_is_correct() {
|
||||
fs::write(tmp.path().join("bar"), "baz").unwrap();
|
||||
fs::create_dir(tmp.path().join("foo")).unwrap();
|
||||
|
||||
let output = Command::new(&executable_path("just"))
|
||||
let output = Command::new(executable_path("just"))
|
||||
.args(["--command", "cat", "bar"])
|
||||
.current_dir(tmp.path().join("foo"))
|
||||
.output()
|
||||
@@ -124,7 +124,7 @@ fn command_not_found() {
|
||||
|
||||
fs::write(tmp.path().join("justfile"), "").unwrap();
|
||||
|
||||
let output = Command::new(&executable_path("just"))
|
||||
let output = Command::new(executable_path("just"))
|
||||
.args(["--command", "asdfasdfasdfasdfadfsadsfadsf", "bar"])
|
||||
.output()
|
||||
.unwrap();
|
||||
|
||||
@@ -49,7 +49,7 @@ fn invoke_error() {
|
||||
assert_eq!(
|
||||
String::from_utf8_lossy(&output.stderr),
|
||||
if cfg!(windows) {
|
||||
"error: Editor `/` invocation failed: Access is denied. (os error 5)\n"
|
||||
"error: Editor `/` invocation failed: program path has no file name\n"
|
||||
} else {
|
||||
"error: Editor `/` invocation failed: Permission denied (os error 13)\n"
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ fn write_error() {
|
||||
|
||||
let justfile_path = test.justfile_path();
|
||||
|
||||
fs::create_dir(&justfile_path).unwrap();
|
||||
fs::create_dir(justfile_path).unwrap();
|
||||
|
||||
test
|
||||
.no_justfile()
|
||||
|
||||
@@ -16,8 +16,8 @@ fn interrupt_test(arguments: &[&str], justfile: &str) {
|
||||
|
||||
let start = Instant::now();
|
||||
|
||||
let mut child = Command::new(&executable_path("just"))
|
||||
.current_dir(&tmp)
|
||||
let mut child = Command::new(executable_path("just"))
|
||||
.current_dir(tmp)
|
||||
.args(arguments)
|
||||
.spawn()
|
||||
.expect("just invocation failed");
|
||||
|
||||
@@ -48,7 +48,7 @@ fn test_invocation_directory() {
|
||||
subdir.push("subdir");
|
||||
fs::create_dir(&subdir).unwrap();
|
||||
|
||||
let output = Command::new(&executable_path("just"))
|
||||
let output = Command::new(executable_path("just"))
|
||||
.current_dir(&subdir)
|
||||
.args(["--shell", "sh"])
|
||||
.output()
|
||||
|
||||
@@ -25,7 +25,7 @@ fn readme() {
|
||||
|
||||
let path = tmp.path().join("justfile");
|
||||
|
||||
fs::write(&path, &justfile).unwrap();
|
||||
fs::write(path, justfile).unwrap();
|
||||
|
||||
let output = Command::new(executable_path("just"))
|
||||
.current_dir(tmp.path())
|
||||
|
||||
@@ -59,8 +59,8 @@ fn test_upwards_path_argument() {
|
||||
},
|
||||
};
|
||||
|
||||
search_test(&tmp.path().join("a"), &["../"]);
|
||||
search_test(&tmp.path().join("a"), &["../default"]);
|
||||
search_test(tmp.path().join("a"), &["../"]);
|
||||
search_test(tmp.path().join("a"), &["../default"]);
|
||||
}
|
||||
|
||||
#[test]
|
||||
@@ -140,7 +140,7 @@ fn single_upwards() {
|
||||
|
||||
let path = tmp.path().join("child");
|
||||
|
||||
search_test(&path, &["../"]);
|
||||
search_test(path, &["../"]);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
@@ -176,7 +176,7 @@ impl Test {
|
||||
dotenv_path.push(".env");
|
||||
fs::write(dotenv_path, "DOTENV_KEY=dotenv-value").unwrap();
|
||||
|
||||
let mut command = Command::new(&executable_path("just"));
|
||||
let mut command = Command::new(executable_path("just"));
|
||||
|
||||
if self.shell {
|
||||
command.args(["--shell", "bash"]);
|
||||
@@ -258,7 +258,7 @@ struct Output<'a> {
|
||||
fn test_round_trip(tmpdir: &Path) {
|
||||
println!("Reparsing...");
|
||||
|
||||
let output = Command::new(&executable_path("just"))
|
||||
let output = Command::new(executable_path("just"))
|
||||
.current_dir(tmpdir)
|
||||
.arg("--dump")
|
||||
.output()
|
||||
@@ -274,7 +274,7 @@ fn test_round_trip(tmpdir: &Path) {
|
||||
|
||||
fs::write(&reparsed_path, &dumped).unwrap();
|
||||
|
||||
let output = Command::new(&executable_path("just"))
|
||||
let output = Command::new(executable_path("just"))
|
||||
.current_dir(tmpdir)
|
||||
.arg("--justfile")
|
||||
.arg(&reparsed_path)
|
||||
|
||||
Reference in New Issue
Block a user