aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorArun Isaac2024-03-12 15:51:51 +0000
committerArun Isaac2024-03-12 15:51:51 +0000
commit7374b1f62132af242c01f6143c4300be19372751 (patch)
tree806468ce099b09c3b528d17aae0d24c28c0861b9 /tests
parent224070cbfd0571dd6d999f0f20593d29affb998a (diff)
downloadccwl-7374b1f62132af242c01f6143c4300be19372751.tar.gz
ccwl-7374b1f62132af242c01f6143c4300be19372751.tar.lz
ccwl-7374b1f62132af242c01f6143c4300be19372751.zip
ccwl: Count argument positions on flattened run arguments.
* ccwl/ccwl.scm (command): Count argument positions on flattened run arguments. * tests/ccwl.scm ("count argument positions correctly when left-flanked by prefixed string arguments"): New test.
Diffstat (limited to 'tests')
-rw-r--r--tests/ccwl.scm8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/ccwl.scm b/tests/ccwl.scm
index be986da..2d755ad 100644
--- a/tests/ccwl.scm
+++ b/tests/ccwl.scm
@@ -330,4 +330,12 @@
(= (length (delete-duplicates keys eq?))
(length keys))))
+(test-equal "count argument positions correctly when left-flanked by prefixed string arguments"
+ 3
+ ;; Input `in' should be counted as position 3, not 2.
+ (match (command-inputs
+ (command #:inputs in
+ #:run "foo" ("--bar" "bar") in))
+ ((in) (input-position in))))
+
(test-end "ccwl")