Permalink
Browse files

Spec tests for the last glob parser commit.

- Adjust the number of allowed failures, since ${x//[a-z]/_} now works
  -- i.e. globs with a character class.
- Verify that another hard case now works.
  • Loading branch information...
Andy Chu
Andy Chu committed Jun 15, 2018
1 parent 479782e commit eec59fb89ceb0e239af9ab3a0839b7b6b599f92e
Showing with 8 additions and 1 deletion.
  1. +7 −0 spec/var-op-other.test.sh
  2. +1 −1 test/spec.sh
@@ -104,6 +104,13 @@ echo ${s//[[:alpha:]]/y} ${s//[^[:alpha:]]/-}
# N-I dash status: 2
# N-I dash stdout-json: ""
### Replace hard glob
s='aa*bb+cc'
echo ${s//\**+/__} # Literal *, then any sequence of characters, then literal +
# stdout: aa__cc
# N-I dash status: 2
# N-I dash stdout-json: ""
### Pattern replacement ${v/} is not valid
v=abcde
echo -${v/}-
View
@@ -409,7 +409,7 @@ var-op-test() {
}
var-op-other() {
sh-spec spec/var-op-other.test.sh --osh-failures-allowed 2 \
sh-spec spec/var-op-other.test.sh --osh-failures-allowed 1 \
${REF_SHELLS[@]} $OSH "$@"
}

0 comments on commit eec59fb

Please sign in to comment.