about summary refs log tree commit diff
path: root/pkgs/test/make-wrapper
diff options
context:
space:
mode:
authorNaïm Favier <n@monade.li>2022-05-11 23:03:35 +0200
committerNaïm Favier <n@monade.li>2022-05-30 23:07:58 +0200
commit1c70b694fe0fece5ae74beb747a40f1b7237d251 (patch)
tree624619308a2a7dfea21c4178abf9ce2620d0058a /pkgs/test/make-wrapper
parentf1c167688a6f81f4a51ab542e5f476c8c595e457 (diff)
makeWrapper,makeBinaryWrapper: implement `--append-flags`
Diffstat (limited to 'pkgs/test/make-wrapper')
-rw-r--r--pkgs/test/make-wrapper/default.nix10
1 files changed, 5 insertions, 5 deletions
diff --git a/pkgs/test/make-wrapper/default.nix b/pkgs/test/make-wrapper/default.nix
index 62ccd272adf47..5cc7cee5a864b 100644
--- a/pkgs/test/make-wrapper/default.nix
+++ b/pkgs/test/make-wrapper/default.nix
@@ -62,7 +62,7 @@ runCommand "make-wrapper-test"
     (mkWrapperBinary { name = "test-unset"; args = [ "--unset" "VAR" ]; })
     (mkWrapperBinary { name = "test-run"; args = [ "--run" "echo bar" ]; })
     (mkWrapperBinary { name = "test-run-and-set"; args = [ "--run" "export VAR=foo" "--set" "VAR" "bar" ]; })
-    (mkWrapperBinary { name = "test-args"; args = [ "--add-flags" "abc" ]; wrapped = wrappedBinaryArgs; })
+    (mkWrapperBinary { name = "test-args"; args = [ "--add-flags" "abc" "--append-flags" "xyz" ]; wrapped = wrappedBinaryArgs; })
     (mkWrapperBinary { name = "test-prefix"; args = [ "--prefix" "VAR" ":" "abc" ]; })
     (mkWrapperBinary { name = "test-prefix-noglob"; args = [ "--prefix" "VAR" ":" "./*" ]; })
     (mkWrapperBinary { name = "test-suffix"; args = [ "--suffix" "VAR" ":" "abc" ]; })
@@ -89,10 +89,10 @@ runCommand "make-wrapper-test"
     # --unset works
     + mkTest "VAR=foo test-unset" "VAR="
 
-    # --add-flags works
-    + mkTest "test-args" "abc"
-    # given flags are appended
-    + mkTest "test-args foo" "abc foo"
+    # --add-flags and --append-flags work
+    + mkTest "test-args" "abc xyz"
+    # given flags are kept
+    + mkTest "test-args foo" "abc foo xyz"
 
     # --run works
     + mkTest "test-run" "bar\nVAR="