File: 02-fix-strutil-tests.diff

package info (click to toggle)
libsigrok 0.5.2-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 8,328 kB
  • sloc: ansic: 88,993; sh: 4,451; cpp: 2,198; makefile: 852; python: 270; java: 13; xml: 8
file content (27 lines) | stat: -rw-r--r-- 900 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
From: Jiri Slaby <jslaby@suse.cz>
Subject: tests: strutil, use ck_assert

We pass no message, so use ck_assert instead of ck_assert_msg. This
results in an error with check 0.15:
tests/strutil.c:157:2: error: too few arguments to function '_ck_assert_failed'
  157 |  ck_assert_msg(saved_locale != NULL);

Origin: upstream, https://sigrok.org/gitweb/?p=libsigrok.git;a=commitdiff;h=505a55f7899ee2eb41418e753a1290252202ecd3
Bug-Debian: https://bugs.debian.org/980589

diff --git a/tests/strutil.c b/tests/strutil.c
index fca70eaa..ec223332 100644
--- a/tests/strutil.c
+++ b/tests/strutil.c
@@ -154,7 +154,7 @@ START_TEST(test_locale)
 	fprintf(stderr, "Old locale = %s\n", old_locale);
 	/* Copy the name so it won’t be clobbered by setlocale. */
 	saved_locale = g_strdup(old_locale);
-	ck_assert_msg(saved_locale != NULL);
+	ck_assert(saved_locale != NULL);
 
 #ifdef _WIN32
 	/*
-- 
2.24.0.rc2