From 0a4c0008542567f3b496f31ad120bec2a47b033c Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Mon, 21 Mar 2011 15:21:51 -0400 Subject: [PATCH] Add test for line continuation and aliases --- plugins/sudoers/regress/sudoers/test4.in | 7 +++++++ plugins/sudoers/regress/sudoers/test4.out.ok | 6 ++++++ plugins/sudoers/regress/sudoers/test4.toke.ok | 5 +++++ 3 files changed, 18 insertions(+) create mode 100644 plugins/sudoers/regress/sudoers/test4.in create mode 100644 plugins/sudoers/regress/sudoers/test4.out.ok create mode 100644 plugins/sudoers/regress/sudoers/test4.toke.ok diff --git a/plugins/sudoers/regress/sudoers/test4.in b/plugins/sudoers/regress/sudoers/test4.in new file mode 100644 index 000000000..b8df454b0 --- /dev/null +++ b/plugins/sudoers/regress/sudoers/test4.in @@ -0,0 +1,7 @@ +# Test line continuation with anchored matches +User_Alias FOO = foo \ +: BAR = bar + +# This used to pass for sudo < 1.8.1 (though it should not have) +User_Alias FOO = foo \ +User_Alias BAR = bar diff --git a/plugins/sudoers/regress/sudoers/test4.out.ok b/plugins/sudoers/regress/sudoers/test4.out.ok new file mode 100644 index 000000000..851e64426 --- /dev/null +++ b/plugins/sudoers/regress/sudoers/test4.out.ok @@ -0,0 +1,6 @@ +Does not parse. + + +User_Alias BAR = bar +User_Alias FOO = foo + diff --git a/plugins/sudoers/regress/sudoers/test4.toke.ok b/plugins/sudoers/regress/sudoers/test4.toke.ok new file mode 100644 index 000000000..e55d1ecc0 --- /dev/null +++ b/plugins/sudoers/regress/sudoers/test4.toke.ok @@ -0,0 +1,5 @@ +# +USERALIAS ALIAS = WORD(5) : ALIAS = WORD(5) + +USERALIAS ALIAS = WORD(5) ERROR <*> ALIAS = WORD(5) + -- 2.40.0