aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xruntests.sh7
1 files changed, 4 insertions, 3 deletions
diff --git a/runtests.sh b/runtests.sh
index cdc33e6..e660db9 100755
--- a/runtests.sh
+++ b/runtests.sh
@@ -5,17 +5,18 @@ PLATFORM="`uname -s`"
5 5
6set -e 6set -e
7 7
8# Portable "ggrep -A" replacement 8# Portable "ggrep -A" replacement.
9# Work around Solaris awk record limit of 2559 bytes.
9# contextgrep PATTERN POST_MATCH_LINES 10# contextgrep PATTERN POST_MATCH_LINES
10contextgrep() { 11contextgrep() {
11 awk "/$1/ { count = ($2 + 1) } count { count--; print }" 12 cut -c -2500 | awk "/$1/ { count = ($2 + 1) } count > 0 { count--; print }"
12} 13}
13 14
14do_tests() { 15do_tests() {
15 echo 16 echo
16 cd tests 17 cd tests
17 lua -e 'print("Testing Lua CJSON version " .. require("cjson")._VERSION)' 18 lua -e 'print("Testing Lua CJSON version " .. require("cjson")._VERSION)'
18 ./test.lua | contextgrep 'FAIL|Summary' 3 | grep -v PASS | cut -c -70 19 ./test.lua | contextgrep 'FAIL|Summary' 3 | grep -v PASS | cut -c -150
19 cd .. 20 cd ..
20} 21}
21 22