File tree 1 file changed +2
-3
lines changed
1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -7,10 +7,9 @@ die () { printf "$@" ; exit 1; }
7
7
# posix compliant array needed to support iterating an asterisk without it being evaluated to the list of files in the current dir
8
8
set -- ' 1.1.1' ' 1.1' ' 1' ' ~1.1.1' ' <1.1.1' ' <=1.1.1' ' >1.1.1' ' >=1.1.1' ' 1.1.1-1.1.2' ' ^1.1.1' ' *' ' =1.1.1' ' v1.1.1' ' x' ' X' ' 1.x.x' ' 1.X.X'
9
9
10
- PKG_JSON_TEMPLATES=$( ls package_json_templates)
11
- for TEMPLATE_NAME in $PKG_JSON_TEMPLATES ; do
10
+ for TEMPLATE_NAME in package_json_templates/* ; do
12
11
for TEST_SEMVER in " $@ " ; do
13
- INPUT=$( sed ' s/NODE_SEMVER/' " $TEST_SEMVER " ' /g' " package_json_templates/ $TEMPLATE_NAME " )
12
+ INPUT=$( sed ' s/NODE_SEMVER/' " $TEST_SEMVER " ' /g' " $TEMPLATE_NAME " )
14
13
ACTUAL_OUTPUT=$( nvm_get_node_from_pkg_json " $INPUT " )
15
14
[ " $ACTUAL_OUTPUT " = " $TEST_SEMVER " ] && [ -n " $ACTUAL_OUTPUT " ] && [ -n " $INPUT " ] || die " 'nvm_get_node_from_pkg_json' failed. Expected '$TEST_SEMVER ' but got '$ACTUAL_OUTPUT ' when given input template '$TEMPLATE_NAME ':\n$INPUT "
16
15
done
You can’t perform that action at this time.
0 commit comments