mirror of
https://github.com/nushell/nushell.git
synced 2024-11-07 09:04:18 +01:00
make *dots* tests easier to read (#9467)
related to - https://github.com/nushell/nushell/pull/8544 cc/ @jntrnr @ahkrr # Description some of the tests in the `dots.rs` file are a bit hard to read because some of the paths look like command calls 🤔 in an attempt to making them easier to read, in the tests of `dots.rs`, this PR - replaces `file .../` with `not_a_cmd.../` because it's not a call to the `file` command - removes the space in `not_a_cmd .../` to see it's not a command call - adds a bit more `not a cmd` to the last tests, to be consistent with the other tests # User-Facing Changes ``` $nothing ``` # Tests + Formatting - 🟢 `toolkit fmt` - 🟢 `toolkit clippy` - ⚫ `toolkit test` - ⚫ `toolkit test stdlib`
This commit is contained in:
parent
1be4eaeae3
commit
aaa21c1619
@ -295,7 +295,7 @@ mod tests {
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn string_with_three_ndots_and_garbage() {
|
fn string_with_three_ndots_and_garbage() {
|
||||||
check_ndots_expansion(r"file .../ garbage.*[", "file .../ garbage.*[");
|
check_ndots_expansion(r"not_a_cmd.../ garbage.*[", "not_a_cmd.../ garbage.*[");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -324,12 +324,18 @@ mod tests {
|
|||||||
fn string_with_three_ndots_and_garbage() {
|
fn string_with_three_ndots_and_garbage() {
|
||||||
// filenames can contain spaces, in these cases the ... .... etc.
|
// filenames can contain spaces, in these cases the ... .... etc.
|
||||||
// that are part of a filepath should not be expanded
|
// that are part of a filepath should not be expanded
|
||||||
check_ndots_expansion("not_a_cmd .../ garbage.*[", "not_a_cmd .../ garbage.*[");
|
check_ndots_expansion("not_a_cmd.../ garbage.*[", "not_a_cmd.../ garbage.*[");
|
||||||
check_ndots_expansion("/not_a_cmd .../ garbage.*[", "/not_a_cmd .../ garbage.*[");
|
check_ndots_expansion("/not_a_cmd.../ garbage.*[", "/not_a_cmd.../ garbage.*[");
|
||||||
check_ndots_expansion("./not_a_cmd .../ garbage.*[", "./not_a_cmd .../ garbage.*[");
|
check_ndots_expansion("./not_a_cmd.../ garbage.*[", "./not_a_cmd.../ garbage.*[");
|
||||||
check_ndots_expansion("../../nac .../ garbage.*[", ".../nac .../ garbage.*[");
|
check_ndots_expansion(
|
||||||
check_ndots_expansion("../../nac .../ garbage.*[...", ".../nac .../ garbage.*[...");
|
"../../not a cmd.../ garbage.*[",
|
||||||
check_ndots_expansion("../../ garbage.*[", ".../ garbage.*[");
|
".../not a cmd.../ garbage.*[",
|
||||||
|
);
|
||||||
|
check_ndots_expansion(
|
||||||
|
"../../not a cmd.../ garbage.*[...",
|
||||||
|
".../not a cmd.../ garbage.*[...",
|
||||||
|
);
|
||||||
|
check_ndots_expansion("../../ not a cmd garbage.*[", ".../ not a cmd garbage.*[");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user