summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorHavoc Pennington <hp@redhat.com>2003-02-13 02:33:32 +0000
committerHavoc Pennington <hp@redhat.com>2003-02-13 02:33:32 +0000
commitc9ea8fac502c6109713aa372c4c8cfafd0b86858 (patch)
treebf6440f13fdf3d49bdca498f829cc464f3f8669a /test
parent32dc75ee6b1bb06e8cc1b956e7d80b54f24b5df6 (diff)
downloaddbus-c9ea8fac502c6109713aa372c4c8cfafd0b86858.tar.gz
2003-02-12 Havoc Pennington <hp@pobox.com>
* dbus/dbus-string.c (_dbus_string_pop_line): fix to also strip \r off of popped lines * dbus/dbus-auth.c (_dbus_auth_test): write code to run auth scripts * dbus/dbus-auth-script.c (_dbus_auth_script_run): when doing a SEND, append \r\n
Diffstat (limited to 'test')
-rw-r--r--test/data/auth/invalid-command.auth-script7
-rw-r--r--test/data/auth/mechanisms.auth-script8
2 files changed, 15 insertions, 0 deletions
diff --git a/test/data/auth/invalid-command.auth-script b/test/data/auth/invalid-command.auth-script
new file mode 100644
index 00000000..c49cb8d3
--- /dev/null
+++ b/test/data/auth/invalid-command.auth-script
@@ -0,0 +1,7 @@
+## this tests that receiving a nonexistent command is handled properly
+## by a server
+
+SERVER
+SEND 'NONEXISTENT_COMMAND foo bar baz blah blah'
+EXPECT_COMMAND ERROR
+EXPECT_STATE WAITING_FOR_INPUT
diff --git a/test/data/auth/mechanisms.auth-script b/test/data/auth/mechanisms.auth-script
new file mode 100644
index 00000000..be447916
--- /dev/null
+++ b/test/data/auth/mechanisms.auth-script
@@ -0,0 +1,8 @@
+## this tests that the server sends a list of mechanisms
+## in response to blank AUTH
+
+SERVER
+SEND AUTH
+EXPECT_COMMAND REJECTED
+EXPECT_STATE WAITING_FOR_INPUT
+