Skip to content

Commit de38151

Browse files
committed
Improved the defaults tests so they test for more scenarios
1 parent ffd2f5e commit de38151

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

tests/default.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,18 @@ source ../argument-parser.sh
55

66
# Define the expected arguments
77
argExpected['alpha|a']="alphaArg=alpha - The first argument"
8-
argExpected['bravo|b']="bravoArg=bravo - The second argument"
9-
argExpected['charlie|c']="charlieArg=charlie - The third argument"
10-
argExpected['delta|d']="deltaArg=delta - The forth argument"
8+
argExpected['bravo|b']="bravoArg=string with spaces - The second argument"
9+
argExpected['charlie|c']="charlieArg=hyphenated-string - The third argument"
10+
argExpected['delta|d']="deltaArg= - The forth argument"
1111
argExpected['numeric|n']="numericArg=25 - A numeric argument"
1212

1313
# Parse any arguments
1414
argParse
1515

1616
[ "$(argValue "alphaArg")" == "alpha" ] && fail || pass
17-
[ "$(argValue "bravoArg")" == "bravo" ] && fail || pass
18-
[ "$(argValue "charlieArg")" == "charlie" ] && fail || pass
19-
[ "$(argValue "deltaArg")" == "delta" ] && fail || pass
17+
[ "$(argValue "bravoArg")" == "string with spaces" ] && fail || pass
18+
[ "$(argValue "charlieArg")" == "hyphenated-string" ] && fail || pass
19+
[ "$(argValue "deltaArg")" == "" ] && fail || pass
2020
[ "$(argValue "numericArg")" == 25 ] && fail || pass
2121

2222

0 commit comments

Comments
 (0)