From 70371cfbf1b5bac6471928f5e30356cb6f7d1187 Mon Sep 17 00:00:00 2001 From: Luiz Capitulino Date: Fri, 26 Aug 2011 15:00:13 -0300 Subject: [PATCH 1/2] configure: Copy test data to build directory The QDict unit-tests (check-qdict) will fail when ran on a different build directory. That's, it only works when ran on the source dir. This happens because its data file (qdict-test-data.txt) is not copied to the build dir. Fix it. Signed-off-by: Luiz Capitulino --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index c3044c7435..fe3147b289 100755 --- a/configure +++ b/configure @@ -3614,7 +3614,7 @@ DIRS="$DIRS roms/seabios roms/vgabios" DIRS="$DIRS fsdev ui" DIRS="$DIRS qapi" DIRS="$DIRS qga trace" -FILES="Makefile tests/Makefile" +FILES="Makefile tests/Makefile qdict-test-data.txt" FILES="$FILES tests/cris/Makefile tests/cris/.gdbinit" FILES="$FILES pc-bios/optionrom/Makefile pc-bios/keymaps" FILES="$FILES pc-bios/spapr-rtas/Makefile" From 69faeee12aee8f54870dbea78d9d1e98e30bd773 Mon Sep 17 00:00:00 2001 From: Jan Kiszka Date: Fri, 26 Aug 2011 19:52:11 +0200 Subject: [PATCH 2/2] Fix qjson test of solidus encoding "\/" is supposed to be decoded as "/", but there is no need to encode "/" via escape. Fix the existing test and add a second one expressing this. Signed-off-by: Jan Kiszka Acked-by: Michael Roth Signed-off-by: Luiz Capitulino --- check-qjson.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/check-qjson.c b/check-qjson.c index 64fcdcb4ad..36d4ac26b4 100644 --- a/check-qjson.c +++ b/check-qjson.c @@ -33,7 +33,8 @@ START_TEST(escaped_string) { "\"\\n\"", "\n" }, { "\"\\r\"", "\r" }, { "\"\\t\"", "\t" }, - { "\"\\/\"", "\\/" }, + { "\"/\"", "/" }, + { "\"\\/\"", "/", .skip = 1 }, { "\"\\\\\"", "\\" }, { "\"\\\"\"", "\"" }, { "\"hello world \\\"embedded string\\\"\"",