summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rwxr-xr-xtests4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests b/tests
index 2fcbc3b..690da7a 100755
--- a/tests
+++ b/tests
@@ -1,9 +1,11 @@
#!/bin/sh
# Test suite for mp.
+# Usage: [FAILFAST=1] tests [pattern]
+# Example: tests "obj*"
run() {
[ "$filter" ] && case $1 in ($filter) ;; (*) return; esac
- out=$(printf %s "$2" | ./mp 2>&1)
+ out=$(./mp -v str=1 "$2" 2>&1)
[ "$out" = "$3" ] && pass=$((pass + 1)) && return
printf "%s FAIL\nWant: '%s'\n Got: '%s'\n" "$1" "$3" "$out"
fail=$((fail + 1))