aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJonas Chevalier <zimbatm@zimbatm.com>2024-09-30 16:10:32 +0000
committerGerrit Code Review <gerrit@localhost>2024-09-30 16:10:32 +0000
commita16ceb9411c57993d811c6bebb517742fe3d34e3 (patch)
treea3570018ce062afe1684702308d3359f48759a85 /tests
parentaa33c34c9be074c9452976aa96d71091325c83ea (diff)
parent2265536e853437dc1f36f9c7a20eb2ebeac6ecaa (diff)
Merge "fix(nix fmt): remove the default "." argument" into main
Diffstat (limited to 'tests')
-rw-r--r--tests/functional/fmt.sh5
-rwxr-xr-xtests/functional/fmt.simple.sh2
2 files changed, 5 insertions, 2 deletions
diff --git a/tests/functional/fmt.sh b/tests/functional/fmt.sh
index 3c1bd9989..7d6add9b6 100644
--- a/tests/functional/fmt.sh
+++ b/tests/functional/fmt.sh
@@ -26,7 +26,10 @@ cat << EOF > flake.nix
};
}
EOF
-nix fmt ./file ./folder | grep 'Formatting: ./file ./folder'
+# No arguments check
+[[ "$(nix fmt)" = "Formatting(0):" ]]
+# Argument forwarding check
+nix fmt ./file ./folder | grep 'Formatting(2): ./file ./folder'
nix flake check
nix flake show | grep -P "package 'formatter'"
diff --git a/tests/functional/fmt.simple.sh b/tests/functional/fmt.simple.sh
index 03109a655..f655846ca 100755
--- a/tests/functional/fmt.simple.sh
+++ b/tests/functional/fmt.simple.sh
@@ -1,3 +1,3 @@
#!/usr/bin/env bash
-echo Formatting: "${@}"
+echo "Formatting(${#}):" "${@}"