From 05a4ad6994919b352b5229d0b1b0a8ebebe2a42f Mon Sep 17 00:00:00 2001 From: Havoc Pennington Date: Tue, 28 Jan 2003 03:53:29 +0000 Subject: 2003-01-27 Havoc Pennington * dbus/dbus-mempool.c (time_for_size): replace printf with _dbus_verbose * dbus/dbus-message-builder.c (_dbus_message_data_load): allow empty lines; fix the SAVE_LENGTH stuff to be START_LENGTH/END_LENGTH so it actually works; couple other bugfixes * test/Makefile.am (dist-hook): add dist-hook for .message files * dbus/dbus-string.c (DBUS_STRING_COPY_PREAMBLE): source of a copy can be constant or locked. (_dbus_string_free): allow freeing a const string as documented/intended * dbus/dbus-sysdeps.c (_dbus_concat_dir_and_file): utility * dbus/dbus-test-main.c (main): take an argument which is the directory containing test data * dbus/dbus-message.c (_dbus_message_test): pass a test_data_dir argument to this and load all the messages in test/data/ checking that they can be loaded or not loaded as appropriate. --- test/data/valid-messages/simplest-manual.message | 14 ++++++++++++++ test/data/valid-messages/simplest.message | 7 ++++--- 2 files changed, 18 insertions(+), 3 deletions(-) create mode 100644 test/data/valid-messages/simplest-manual.message (limited to 'test/data/valid-messages') diff --git a/test/data/valid-messages/simplest-manual.message b/test/data/valid-messages/simplest-manual.message new file mode 100644 index 00000000..bf5ddc5b --- /dev/null +++ b/test/data/valid-messages/simplest-manual.message @@ -0,0 +1,14 @@ +## like simplest.message, but doesn't use VALID_HEADER +## convenience command. mostly to test the test framework. + +BYTE 'l' +BYTE 0 +BYTE 0 +BYTE 0 +LENGTH Header +LENGTH Body +## client serial +INT32 7 +END_LENGTH Header +START_LENGTH Body +END_LENGTH Body diff --git a/test/data/valid-messages/simplest.message b/test/data/valid-messages/simplest.message index 949aa852..872a58a6 100644 --- a/test/data/valid-messages/simplest.message +++ b/test/data/valid-messages/simplest.message @@ -1,6 +1,7 @@ ## simplest possible valid message -## this does a LENGTH Header and LENGTH Body +## VALID_HEADER includes a LENGTH Header and LENGTH Body VALID_HEADER -SET_LENGTH Header -SET_LENGTH Body +END_LENGTH Header +START_LENGTH Body +END_LENGTH Body -- cgit