From c9ea8fac502c6109713aa372c4c8cfafd0b86858 Mon Sep 17 00:00:00 2001 From: Havoc Pennington Date: Thu, 13 Feb 2003 02:33:32 +0000 Subject: 2003-02-12 Havoc Pennington * 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 --- test/data/auth/invalid-command.auth-script | 7 +++++++ test/data/auth/mechanisms.auth-script | 8 ++++++++ 2 files changed, 15 insertions(+) create mode 100644 test/data/auth/invalid-command.auth-script create mode 100644 test/data/auth/mechanisms.auth-script (limited to 'test') 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 + -- cgit