Skip to content

Commit 99d1062

Browse files
garlickgrondo
andcommitted
testsuite: fix fluid unit test
Problem: a fluid unit test fails when config.h is included. FAIL: test_fluid.t 55 - fluid_encode with FLUX_F58_FORCE_ASCII used ascii prefix # Failed test 'fluid_encode with FLUX_F58_FORCE_ASCII used ascii prefix' # at test/fluid.c line 99. # got: 'f1' # expected: '(null)' This test should be skipped when flux is configured in ASCII only mode. Co-authored-by: Mark A. Grondona <[email protected]>
1 parent 7ef0fe8 commit 99d1062

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/common/libutil/test/fluid.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
* SPDX-License-Identifier: LGPL-3.0
99
\************************************************************/
1010

11+
#ifdef HAVE_CONFIG_H
12+
#include "config.h"
13+
#endif
1114
#include <errno.h>
1215
#include <string.h>
1316
#include <locale.h>
@@ -91,6 +94,7 @@ void test_f58 (void)
9194
tp++;
9295
}
9396

97+
#if !ASSUME_BROKEN_LOCALE
9498
if (setenv ("FLUX_F58_FORCE_ASCII", "1", 1) < 0)
9599
BAIL_OUT ("Failed to setenv FLUX_F58_FORCE_ASCII");
96100
ok (fluid_encode (buf, sizeof (buf), f58_tests->id, type) == 0,
@@ -99,6 +103,7 @@ void test_f58 (void)
99103
"fluid_encode with FLUX_F58_FORCE_ASCII used ascii prefix");
100104
if (unsetenv ("FLUX_F58_FORCE_ASCII") < 0)
101105
BAIL_OUT ("Failed to unsetenv FLUX_F58_FORCE_ASCII");
106+
#endif
102107

103108
ok (fluid_encode (buf, 1, 1, type) < 0 && errno == EOVERFLOW,
104109
"fluid_encode (buf, 1, 1, F58) returns EOVERFLOW");

0 commit comments

Comments
 (0)