summaryrefslogtreecommitdiff
path: root/egg/egg-testing.c
diff options
context:
space:
mode:
authorStef Walter <stefw@collabora.co.uk>2011-11-17 10:30:42 +0100
committerStef Walter <stefw@collabora.co.uk>2011-11-23 09:10:51 +0100
commitc823c00677ddda03862adf2914a35670fa7cb0c9 (patch)
treed43aa862e4a34d6ff33a3d6b000e0b8b0bf8efb1 /egg/egg-testing.c
parent56132c69b650504d05f485f3222263a170fb5cc1 (diff)
egg: Rework egg_assert_cmpbytes()
* Rename to more inline with other testing functions * Clearer messages
Diffstat (limited to 'egg/egg-testing.c')
-rw-r--r--egg/egg-testing.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/egg/egg-testing.c b/egg/egg-testing.c
index 85d4b0b..88d647d 100644
--- a/egg/egg-testing.c
+++ b/egg/egg-testing.c
@@ -28,6 +28,7 @@
#include <glib-object.h>
#include <errno.h>
+#include <string.h>
#include <unistd.h>
#ifdef WITH_VALGRIND
@@ -68,7 +69,7 @@ egg_test_escape_data (const guchar *data,
result = g_string_sized_new (n_data * 2 + 1);
for (i = 0; i < n_data; ++i) {
c = data[i];
- if (g_ascii_isprint (c)) {
+ if (g_ascii_isprint (c) && !strchr ("\n\r\v", c)) {
g_string_append_c (result, c);
} else {
g_string_append (result, "\\x");