Make this test pass with bison's verbose error messages.

This commit is contained in:
Todd C. Miller
2020-08-17 07:41:48 -06:00
parent c7bc24d40b
commit 360c264760

View File

@@ -1,6 +1,7 @@
#!/bin/sh
#
# Test @include with garbage after the path name
# The standard error output is dup'd to the standard output.
#
# Avoid warnings about memory leaks when there is a syntax error
@@ -8,18 +9,17 @@ ASAN_OPTIONS=detect_leaks=0; export ASAN_OPTIONS
MYUID=`\ls -ln $TESTDIR/test2.inc | awk '{print $3}'`
MYGID=`\ls -ln $TESTDIR/test2.inc | awk '{print $4}'`
exec 2>&1
echo "Testing @include with garbage after the path name"
echo ""
./testsudoers -U $MYUID -G $MYGID root id <<EOF
./testsudoers -U $MYUID -G $MYGID root id <<EOF 2>&1 | sed 's/\(syntax error\), .*/\1/'
@include sudoers.local womp womp
EOF
echo ""
echo "Testing #include with garbage after the path name"
echo ""
./testsudoers -U $MYUID -G $MYGID root id <<EOF
./testsudoers -U $MYUID -G $MYGID root id <<EOF 2>&1 | sed 's/\(syntax error\), .*/\1/'
#include sudoers.local womp womp
EOF