Skip to content

Commit df2a36f

Browse files
committed
test: Create test for passing -- parameter
1 parent a562009 commit df2a36f

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

testdata/simple.ahoy.yml

+6
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,9 @@ ahoyapi: v2
22
commands:
33
echo:
44
cmd: echo "$@"
5+
6+
list:
7+
cmd: ls -a "$@"
8+
9+
whalesay:
10+
cmd: docker run --rm docker/whalesay cowsay -f dragon "$@"

tests/simple.bats

+5
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,8 @@
1313
result="$(./ahoy -f testdata/simple.ahoy.yml echo something)"
1414
[ "$result" == "something" ]
1515
}
16+
17+
@test "run a simple ahoy command (ls -a) with an extra parameter (-l)" {
18+
run ./ahoy -f testdata/simple.ahoy.yml list -- -l
19+
[ "${#lines[@]}" -gt 13 ]
20+
}

0 commit comments

Comments
 (0)