From: reyk Date: Tue, 23 Jun 2015 19:33:06 +0000 (+0000) Subject: Fix the optional lua patterns test with obj and different versions. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=2c9000e0b3550e72cdfcea2efaaa3d6bc802bb26;p=openbsd Fix the optional lua patterns test with obj and different versions. --- diff --git a/regress/usr.sbin/httpd/patterns/Makefile b/regress/usr.sbin/httpd/patterns/Makefile index 912d0d54bf6..fe1b3481e43 100644 --- a/regress/usr.sbin/httpd/patterns/Makefile +++ b/regress/usr.sbin/httpd/patterns/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.1 2015/06/23 18:03:09 semarie Exp $ +# $OpenBSD: Makefile,v 1.2 2015/06/23 19:33:06 reyk Exp $ HTTPDSRC = ${.CURDIR}/../../../../usr.sbin/httpd @@ -25,7 +25,8 @@ test-patterns: patterns-tester test-patterns.out test-patterns.in test-patterns-lua: patterns-tester.lua test-patterns-lua.out test-patterns.in cat ${.CURDIR}/test-patterns.in | grep -v '^#' | \ while IFS=' ' read string pattern comments ; do \ - ${LUA} ./patterns-tester.lua "$${string}" "$${pattern}" 2>&1 || true; \ - done | diff -I 'OpenBSD' -u ${.CURDIR}/test-patterns-lua.out - + ${LUA} ${.CURDIR}/patterns-tester.lua "$${string}" "$${pattern}" 2>&1 || true; \ + done | sed "s/.*\/patterns\-tester\.lua/X_PATTERNS_TESTER_X/g" | \ + diff -I 'OpenBSD' -u ${.CURDIR}/test-patterns-lua.out - .include diff --git a/regress/usr.sbin/httpd/patterns/test-patterns-lua.out b/regress/usr.sbin/httpd/patterns/test-patterns-lua.out index dd5f330c0d0..b1549258444 100644 --- a/regress/usr.sbin/httpd/patterns/test-patterns-lua.out +++ b/regress/usr.sbin/httpd/patterns/test-patterns-lua.out @@ -1,4 +1,3 @@ -# $OpenBSD: test-patterns-lua.out,v 1.1 2015/06/23 18:03:09 semarie Exp $ string='/page/51' pattern='^/(%a+)/(%d+)$' page 51 @@ -37,92 +36,92 @@ pattern='no-%d-match' nil string='/page/page-51' pattern='/(.*)/%9-(%d+)' -lua53: ./patterns-tester.lua:2: invalid capture index %9 +X_PATTERNS_TESTER_X:3: invalid capture index %9 stack traceback: [C]: in function 'string.match' - ./patterns-tester.lua:2: in main chunk +X_PATTERNS_TESTER_X:3: in main chunk [C]: in ? string=':-)' pattern=')+' -lua53: ./patterns-tester.lua:2: invalid pattern capture +X_PATTERNS_TESTER_X:3: invalid pattern capture stack traceback: [C]: in function 'string.match' - ./patterns-tester.lua:2: in main chunk +X_PATTERNS_TESTER_X:3: in main chunk [C]: in ? string='/page/51' pattern='/page/51(' -lua53: ./patterns-tester.lua:2: unfinished capture +X_PATTERNS_TESTER_X:3: unfinished capture stack traceback: [C]: in function 'string.match' - ./patterns-tester.lua:2: in main chunk +X_PATTERNS_TESTER_X:3: in main chunk [C]: in ? string='/page/51' pattern='/page/51%' -lua53: ./patterns-tester.lua:2: malformed pattern (ends with '%') +X_PATTERNS_TESTER_X:3: malformed pattern (ends with '%') stack traceback: [C]: in function 'string.match' - ./patterns-tester.lua:2: in main chunk +X_PATTERNS_TESTER_X:3: in main chunk [C]: in ? string='/page/51' pattern='/page/[51' -lua53: ./patterns-tester.lua:2: malformed pattern (missing ']') +X_PATTERNS_TESTER_X:3: malformed pattern (missing ']') stack traceback: [C]: in function 'string.match' - ./patterns-tester.lua:2: in main chunk +X_PATTERNS_TESTER_X:3: in main chunk [C]: in ? string='/page/(51)' pattern='/page/%b(' -lua53: ./patterns-tester.lua:2: malformed pattern (missing arguments to '%b') +X_PATTERNS_TESTER_X:3: malformed pattern (missing arguments to '%b') stack traceback: [C]: in function 'string.match' - ./patterns-tester.lua:2: in main chunk +X_PATTERNS_TESTER_X:3: in main chunk [C]: in ? string='/page/51' pattern='()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()' -lua53: ./patterns-tester.lua:2: too many captures +X_PATTERNS_TESTER_X:3: too many captures stack traceback: [C]: in function 'string.match' - ./patterns-tester.lua:2: in main chunk +X_PATTERNS_TESTER_X:3: in main chunk [C]: in ? string='/page/51' pattern='/page/%f' -lua53: ./patterns-tester.lua:2: missing '[' after '%f' in pattern +X_PATTERNS_TESTER_X:3: missing '[' after '%f' in pattern stack traceback: [C]: in function 'string.match' - ./patterns-tester.lua:2: in main chunk +X_PATTERNS_TESTER_X:3: in main chunk [C]: in ? string='/page/51' pattern='/page%f/51' -lua53: ./patterns-tester.lua:2: missing '[' after '%f' in pattern +X_PATTERNS_TESTER_X:3: missing '[' after '%f' in pattern stack traceback: [C]: in function 'string.match' - ./patterns-tester.lua:2: in main chunk +X_PATTERNS_TESTER_X:3: in main chunk [C]: in ? string='q*********************************' pattern='*************************************q' -lua53: ./patterns-tester.lua:2: max repetition items +X_PATTERNS_TESTER_X:3: max repetition items stack traceback: [C]: in function 'string.match' - ./patterns-tester.lua:2: in main chunk +X_PATTERNS_TESTER_X:3: in main chunk [C]: in ? string='q+++++++++++++++++++++++++++++++++' pattern='+++++++++++++++++++++++++++++++++++++q' -lua53: ./patterns-tester.lua:2: max repetition items +X_PATTERNS_TESTER_X:3: max repetition items stack traceback: [C]: in function 'string.match' - ./patterns-tester.lua:2: in main chunk +X_PATTERNS_TESTER_X:3: in main chunk [C]: in ? string='q---------------------------------' pattern='-------------------------------------q' -lua53: ./patterns-tester.lua:2: max repetition items +X_PATTERNS_TESTER_X:3: max repetition items stack traceback: [C]: in function 'string.match' - ./patterns-tester.lua:2: in main chunk +X_PATTERNS_TESTER_X:3: in main chunk [C]: in ? string='q?????????????????????????????????' pattern='?????????????????????????????????????q' -lua53: ./patterns-tester.lua:2: max repetition items +X_PATTERNS_TESTER_X:3: max repetition items stack traceback: [C]: in function 'string.match' - ./patterns-tester.lua:2: in main chunk +X_PATTERNS_TESTER_X:3: in main chunk [C]: in ?