Skip to content

Commit

Permalink
[test/spec] Don't pollute repo, and add old demo.
Browse files Browse the repository at this point in the history
  • Loading branch information
Andy Chu committed Jul 5, 2019
1 parent 06cca17 commit 9bf65d0
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .gitignore
Expand Up @@ -10,9 +10,12 @@ _build/
_devbuild/
!opy/_regtest/src/_devbuild/
_deps/
# for mycpp
_gen/
_release/
libc.so
fastlex.so
libc.so
line_input.so
posix_.so
# Python build support
build/temp.*
28 changes: 28 additions & 0 deletions spec/01-char-class.sh
@@ -0,0 +1,28 @@
#!/bin/bash
#
# Usage:
# ./01-char-class.sh <function name>

set -o nounset
set -o pipefail
set -o errexit

demo() {
[[ a == [a] ]]
[[ a != [^a] ]]

[[ a == [ab] ]]
[[ a != [^ab] ]]

[[ a == [[:alpha:]] ]]
[[ a != [^[:alpha:]] ]]
[[ 0 == [^[:alpha:]] ]]

# NOTE: there is only one negation. You can't mix them.
[[ 0 == [^[:alpha:]] ]]

echo
echo 'ALL PASSED'
}

"$@"
1 change: 1 addition & 0 deletions spec/alias.test.sh
Expand Up @@ -478,6 +478,7 @@ four
## END

#### Alias and command sub (bug regression)
cd $TMP
shopt -s expand_aliases
echo foo bar > tmp.txt
alias a=argv.py
Expand Down

0 comments on commit 9bf65d0

Please sign in to comment.