=== removed file '.bzrignore' --- .bzrignore 2015-09-03 22:01:00 +0000 +++ .bzrignore 1970-01-01 00:00:00 +0000 @@ -1,1 +0,0 @@ -tests === modified file 'aat_data.test' --- aat_data.test 2015-09-03 22:01:00 +0000 +++ aat_data.test 2015-09-03 19:57:24 +0000 @@ -1,6 +1,6 @@ -./aattest tests/data1 +./inputs './bin/aat @1@ @2@' <<< -@awk ../../data.awk +@awk ./data.awk |END{ Hello {}! |} === removed file 'aattest' --- aattest 2015-09-03 22:01:00 +0000 +++ aattest 1970-01-01 00:00:00 +0000 @@ -1,34 +0,0 @@ -#!/bin/zsh -: ${delim:=---} -: ${AWK:=awk} -: ${SED:=sed} - -dst=$1 -bin=$0:h:a/bin -[[ -d $dst ]] && rm -r $dst -mkdir -p $dst || exit $? - -while IFS= read line; do - [[ $line == $delim ]] && break - printf '%s\n' $line >>$dst/test.aat || exit $? -done - -cat >$dst/test.data || exit $? -cat >$dst/Makefile <test.out - -test.qawk: test.awk - awk -f $bin/query.awk test.qawk - -test.awk: test.mac - sed -f $bin/aat_macros.sed test.awk - -test.mac: test.aat - AAT_DEP=test.dep awk -f $bin/aat.awk test.aat >test.mac - -clean: - rm -f test.out test.qawk test.awk test.mac -EOF - -gmake -sC $dst && cat $dst/test.out === modified file 'data.awk' --- data.awk 2015-09-03 22:01:00 +0000 +++ data.awk 2015-09-03 16:24:08 +0000 @@ -56,7 +56,7 @@ m = match($0, ident_re) varname = substr($0, m, RLENGTH) V[varname] = substr($0, m+1+RLENGTH) - if(DEBUG) printf "got scalar: %s ⇒ %s (%d)\n", varname, V[varname], m >"/dev/stderr" + if(DEBUG) printf "got scalar: %s ⇒ %s (%d)\n", varname, V[varname], m next } @@ -131,10 +131,9 @@ return 0 } found = V[varname] - return 1 } -function get(varname) { +function get(varname, result) { if(!find(varname)) { print "error: undefined variable '"$varname"'" >"/dev/stderr" exit 1 @@ -148,13 +147,3 @@ function or_(a, b) { return a ? a : b } - -END { - if(DEBUG) { - print "--- loaded keys ---" >"/dev/stderr" - for(key in V) - printf("%s\t→%s←\t", key, V[key]) >"/dev/stderr" - printf(">> %d →%s←\n", find(key), found) >"/dev/stderr" - print "-------------------" >"/dev/stderr" - } -} === modified file 'inputs' --- inputs 2015-09-03 22:01:00 +0000 +++ inputs 2015-09-03 16:24:08 +0000 @@ -6,7 +6,7 @@ if [[ $line == $delim ]]; then inputs+=( "$(mktemp)" ) else - printf '%s\n' $line >>$inputs[-1] + printf '%s\n' >>$inputs[-1] fi done === modified file 'testloop' --- testloop 2015-09-03 22:01:00 +0000 +++ testloop 2015-09-03 19:57:24 +0000 @@ -21,14 +21,13 @@ ret=0; show=1 case $fname in (*.py[co]) ret=1;; - (*.sw[px]) ret=1; show=0;; + (*.sw[px]) ret=1;; (*.swpx) ret=1;; (*.tmp) ret=1;; (*'~') ret=1;; (*__pycache__*) ret=1;; (*/bin/[0-9]*) ret=1;; (*/.hypothesis*) ret=1; show=0;; - (*/tests/*) ret=1; show=0;; (*/test_error.sql) ret=1;; (*/commlog/*) ret=1; show=0;; (*/.bzr/*) ret=1; show=0;;