]> granicus.if.org Git - sudo/commitdiff
Add regress test for bug #623
authorTodd C. Miller <Todd.Miller@courtesan.com>
Tue, 12 Nov 2013 16:50:36 +0000 (09:50 -0700)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Tue, 12 Nov 2013 16:50:36 +0000 (09:50 -0700)
MANIFEST
plugins/sudoers/regress/visudo/test5.out.ok [new file with mode: 0644]
plugins/sudoers/regress/visudo/test5.sh [new file with mode: 0755]

index 89564db94f7aa7c67f16c8a6065973f7086b1dc2..a41e6767251ae494b7dbbbdac317a38262ba4197 100644 (file)
--- a/MANIFEST
+++ b/MANIFEST
@@ -357,6 +357,8 @@ plugins/sudoers/regress/visudo/test3.out.ok
 plugins/sudoers/regress/visudo/test3.sh
 plugins/sudoers/regress/visudo/test4.out.ok
 plugins/sudoers/regress/visudo/test4.sh
+plugins/sudoers/regress/visudo/test5.out.ok
+plugins/sudoers/regress/visudo/test5.sh
 plugins/sudoers/set_perms.c
 plugins/sudoers/sha2.c
 plugins/sudoers/sha2.h
diff --git a/plugins/sudoers/regress/visudo/test5.out.ok b/plugins/sudoers/regress/visudo/test5.out.ok
new file mode 100644 (file)
index 0000000..e5c355c
--- /dev/null
@@ -0,0 +1 @@
+stdin: parsed OK
diff --git a/plugins/sudoers/regress/visudo/test5.sh b/plugins/sudoers/regress/visudo/test5.sh
new file mode 100755 (executable)
index 0000000..29364ea
--- /dev/null
@@ -0,0 +1,8 @@
+#!/bin/sh
+#
+# Test comment on the last line with no newline
+#
+
+printf "# one comment\n#two comments" | ./visudo -csf -
+
+exit 0