From 7374b1f62132af242c01f6143c4300be19372751 Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Tue, 12 Mar 2024 15:51:51 +0000 Subject: 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. --- tests/ccwl.scm | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'tests/ccwl.scm') 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") -- cgit v1.2.3