Skip to content

Commit ee94c43

Browse files
darnuriaemilio
authored andcommitted
Add test for quoted Env variables passed with BINDGEN_EXTRA_CLANG_ARGS.
Before the test was too broad and just tested for the definition of the variable. With this test we can ensure that quoting was indeed managed. Signed-off-by: Axel Viala <[email protected]>
1 parent 66328b2 commit ee94c43

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bindgen-tests/tests/tests.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ fn test_clang_env_args() {
390390
"test.hpp",
391391
"#ifdef _ENV_ONE\nextern const int x[] = { 42 };\n#endif\n\
392392
#ifdef _ENV_TWO\nextern const int y[] = { 42 };\n#endif\n\
393-
#ifdef NOT_THREE\nextern const int z[] = { 42 };\n#endif\n",
393+
#if defined NOT_THREE && NOT_THREE == 1\nextern const int z[] = { 42 };\n#endif\n",
394394
)
395395
.generate()
396396
.unwrap()

0 commit comments

Comments
 (0)