2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-30 05:48:18 +00:00

convert test2 to use testsudoers

This commit is contained in:
Todd C. Miller 2011-02-23 15:26:13 -05:00
parent e558b79e85
commit a64bd36b33
3 changed files with 14 additions and 5 deletions

View File

@ -0,0 +1,9 @@
Parses OK.
%:C/non UNIX 0 c ALL = (ALL) ALL
%:C/non\'UNIX\'1 c ALL = (ALL) ALL
%:C/non"UNIX"0 c ALL = (ALL) ALL
%:C/non_UNIX_0 c ALL = (ALL) ALL
%:C/non\'UNIX_3 c ALL = (ALL) ALL

View File

@ -4,9 +4,9 @@
# See http://www.sudo.ws/bugs/show_bug.cgi?id=437
#
WANT=${SRCDIR-.}/regress/visudo/test1.ok
GOT=vs_test1.out
./visudo -c -f- > $GOT <<EOF
WANT=${SRCDIR-.}/regress/testsudoers/test2.out
GOT=ts_test2.out
./testsudoers -d > $GOT <<EOF
"%:C/non UNIX 0 c" ALL=(ALL) ALL
"%:C/non\'UNIX\'1 c" ALL=(ALL) ALL
"%:C/non\"UNIX\"0 c" ALL=(ALL) ALL
@ -16,8 +16,8 @@ EOF
# Check results
if cmp $WANT $GOT >/dev/null; then
echo "visudo 2: OK"
echo "testsudoers 2: OK"
else
echo "visudo 2: FAILED"
echo "testsudoers 2: FAILED"
diff $WANT $GOT
fi