mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 09:25:38 +02:00
Strip trailing whitespace in files (#4575)
* Strip trailing whitespace in rs files * Strip trailing whitespace in toml files * Strip trailing whitespace in md files * Strip trailing whitespace in nu files
This commit is contained in:
@ -7,7 +7,7 @@ fn returns_basename_of_empty_input() {
|
||||
let actual = nu!(
|
||||
cwd: "tests", pipeline(
|
||||
r#"
|
||||
echo ""
|
||||
echo ""
|
||||
| path basename
|
||||
"#
|
||||
));
|
||||
@ -20,7 +20,7 @@ fn replaces_basename_of_empty_input() {
|
||||
let actual = nu!(
|
||||
cwd: "tests", pipeline(
|
||||
r#"
|
||||
echo ""
|
||||
echo ""
|
||||
| path basename -r newname.txt
|
||||
"#
|
||||
));
|
||||
@ -33,8 +33,8 @@ fn returns_basename_of_path_ending_with_dot() {
|
||||
let actual = nu!(
|
||||
cwd: "tests", pipeline(
|
||||
r#"
|
||||
echo "some/file.txt/."
|
||||
| path basename
|
||||
echo "some/file.txt/."
|
||||
| path basename
|
||||
"#
|
||||
));
|
||||
|
||||
@ -46,7 +46,7 @@ fn replaces_basename_of_path_ending_with_dot() {
|
||||
let actual = nu!(
|
||||
cwd: "tests", pipeline(
|
||||
r#"
|
||||
echo "some/file.txt/."
|
||||
echo "some/file.txt/."
|
||||
| path basename -r viking.txt
|
||||
"#
|
||||
));
|
||||
@ -60,8 +60,8 @@ fn returns_basename_of_path_ending_with_double_dot() {
|
||||
let actual = nu!(
|
||||
cwd: "tests", pipeline(
|
||||
r#"
|
||||
echo "some/file.txt/.."
|
||||
| path basename
|
||||
echo "some/file.txt/.."
|
||||
| path basename
|
||||
"#
|
||||
));
|
||||
|
||||
@ -73,7 +73,7 @@ fn replaces_basename_of_path_ending_with_double_dot() {
|
||||
let actual = nu!(
|
||||
cwd: "tests", pipeline(
|
||||
r#"
|
||||
echo "some/file.txt/.."
|
||||
echo "some/file.txt/.."
|
||||
| path basename -r eggs
|
||||
"#
|
||||
));
|
||||
|
@ -7,7 +7,7 @@ fn returns_dirname_of_empty_input() {
|
||||
let actual = nu!(
|
||||
cwd: "tests", pipeline(
|
||||
r#"
|
||||
echo ""
|
||||
echo ""
|
||||
| path dirname
|
||||
"#
|
||||
));
|
||||
@ -20,7 +20,7 @@ fn replaces_dirname_of_empty_input() {
|
||||
let actual = nu!(
|
||||
cwd: "tests", pipeline(
|
||||
r#"
|
||||
echo ""
|
||||
echo ""
|
||||
| path dirname -r newdir
|
||||
"#
|
||||
));
|
||||
@ -33,8 +33,8 @@ fn returns_dirname_of_path_ending_with_dot() {
|
||||
let actual = nu!(
|
||||
cwd: "tests", pipeline(
|
||||
r#"
|
||||
echo "some/dir/."
|
||||
| path dirname
|
||||
echo "some/dir/."
|
||||
| path dirname
|
||||
"#
|
||||
));
|
||||
|
||||
@ -46,7 +46,7 @@ fn replaces_dirname_of_path_ending_with_dot() {
|
||||
let actual = nu!(
|
||||
cwd: "tests", pipeline(
|
||||
r#"
|
||||
echo "some/dir/."
|
||||
echo "some/dir/."
|
||||
| path dirname -r eggs
|
||||
"#
|
||||
));
|
||||
@ -60,8 +60,8 @@ fn returns_dirname_of_path_ending_with_double_dot() {
|
||||
let actual = nu!(
|
||||
cwd: "tests", pipeline(
|
||||
r#"
|
||||
echo "some/dir/.."
|
||||
| path dirname
|
||||
echo "some/dir/.."
|
||||
| path dirname
|
||||
"#
|
||||
));
|
||||
|
||||
@ -73,7 +73,7 @@ fn replaces_dirname_of_path_with_double_dot() {
|
||||
let actual = nu!(
|
||||
cwd: "tests", pipeline(
|
||||
r#"
|
||||
echo "some/dir/.."
|
||||
echo "some/dir/.."
|
||||
| path dirname -r eggs
|
||||
"#
|
||||
));
|
||||
|
@ -14,7 +14,7 @@ fn expands_path_with_dot() {
|
||||
let actual = nu!(
|
||||
cwd: dirs.test(), pipeline(
|
||||
r#"
|
||||
echo "menu/./spam.txt"
|
||||
echo "menu/./spam.txt"
|
||||
| path expand
|
||||
"#
|
||||
));
|
||||
@ -34,7 +34,7 @@ fn expands_path_with_double_dot() {
|
||||
let actual = nu!(
|
||||
cwd: dirs.test(), pipeline(
|
||||
r#"
|
||||
echo "menu/../menu/spam.txt"
|
||||
echo "menu/../menu/spam.txt"
|
||||
| path expand
|
||||
"#
|
||||
));
|
||||
|
@ -7,7 +7,7 @@ fn returns_type_of_missing_file() {
|
||||
let actual = nu!(
|
||||
cwd: "tests", pipeline(
|
||||
r#"
|
||||
echo "spam.txt"
|
||||
echo "spam.txt"
|
||||
| path type
|
||||
"#
|
||||
));
|
||||
@ -27,7 +27,7 @@ fn returns_type_of_existing_file() {
|
||||
let actual = nu!(
|
||||
cwd: dirs.test(), pipeline(
|
||||
r#"
|
||||
echo "menu"
|
||||
echo "menu"
|
||||
| path type
|
||||
"#
|
||||
));
|
||||
@ -48,7 +48,7 @@ fn returns_type_of_existing_directory() {
|
||||
let actual = nu!(
|
||||
cwd: dirs.test(), pipeline(
|
||||
r#"
|
||||
echo "menu/spam.txt"
|
||||
echo "menu/spam.txt"
|
||||
| path type
|
||||
"#
|
||||
));
|
||||
|
Reference in New Issue
Block a user