Skip to content

Commit d158e8a

Browse files
committed
Updated the test suite to work with the new logic
1 parent e44fd4b commit d158e8a

File tree

2 files changed

+6
-10
lines changed

2 files changed

+6
-10
lines changed

tests/default.sh

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,15 @@
11
#!/bin/bash
22

3-
# Include the Argument Parser library
4-
source ../argument-parser.sh
5-
63
# Define the expected arguments
4+
declare -A argExpected
75
argExpected['alpha|a']="alphaArg=alpha - The first argument"
86
argExpected['bravo|b']="bravoArg=string with spaces - The second argument"
97
argExpected['charlie|c']="charlieArg=hyphenated-string - The third argument"
108
argExpected['delta|d']="deltaArg= - The forth argument"
119
argExpected['numeric|n']="numericArg=25 - A numeric argument"
1210

13-
# Parse any arguments
14-
argParse
11+
# Include the Argument Parser library
12+
source ../argument-parser.sh
1513

1614
[ "$(argValue "alphaArg")" == "alpha" ] && fail || pass
1715
[ "$(argValue "bravoArg")" == "string with spaces" ] && fail || pass

tests/simple.sh

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,16 @@
11
#!/bin/bash
22

3-
# Include the Argument Parser library
4-
source ../argument-parser.sh
5-
63
# Define the expected arguments
4+
declare -A argExpected
75
argExpected['alpha|a']="alphaArg - The first argument"
86
argExpected['bravo|b']="bravoArg - The second argument"
97
argExpected['charlie|c']="charlieArg - The third argument"
108
argExpected['delta|d']="deltaArg - The forth argument"
119
argExpected['numeric|n']="numericArg - A numeric argument"
1210
argExpected['quoted|q']="quotedArg - A quoted string argument"
1311

14-
# Parse any arguments
15-
argParse
12+
# Include the Argument Parser library
13+
source ../argument-parser.sh
1614

1715
[ "$(argValue "alphaArg")" == "alpha" ] && fail || pass
1816
[ "$(argValue "bravoArg")" == "bravo" ] && fail || pass

0 commit comments

Comments
 (0)