Skip to content

Commit 44172e7

Browse files
committed
Added a numeric argument test
1 parent cfe623a commit 44172e7

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tests/default.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ argExpected['alpha|a']="alphaArg=alpha - The first argument"
88
argExpected['bravo|b']="bravoArg=bravo - The second argument"
99
argExpected['charlie|c']="charlieArg=charlie - The third argument"
1010
argExpected['delta|d']="deltaArg=delta - The forth argument"
11+
argExpected['numeric|n']="numericArg=25 - A numeric argument"
1112

1213
# Parse any arguments
1314
argParse
@@ -16,9 +17,11 @@ argParse
1617
[ "$(argValue "bravoArg")" == "bravo" ] && fail || ok
1718
[ "$(argValue "charlieArg")" == "charlie" ] && fail || ok
1819
[ "$(argValue "deltaArg")" == "delta" ] && fail || ok
20+
[ "$(argValue "numericArg")" == 25 ] && fail || ok
1921

2022

2123
argExists "alphaArg" && fail || ok
2224
argExists "bravoArg" && fail || ok
2325
argExists "charlieArg" && fail || ok
2426
argExists "deltaArg" && fail || ok
27+
argExists "numericArg" && fail || ok

0 commit comments

Comments
 (0)