From ee94c43554407f6b57c5dc44aa8914835f4760c0 Mon Sep 17 00:00:00 2001 From: Axel Viala Date: Mon, 22 Jan 2024 17:54:54 +0100 Subject: [PATCH] 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 --- bindgen-tests/tests/tests.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bindgen-tests/tests/tests.rs b/bindgen-tests/tests/tests.rs index bcc02b8dfe..9df45c3b07 100644 --- a/bindgen-tests/tests/tests.rs +++ b/bindgen-tests/tests/tests.rs @@ -390,7 +390,7 @@ fn test_clang_env_args() { "test.hpp", "#ifdef _ENV_ONE\nextern const int x[] = { 42 };\n#endif\n\ #ifdef _ENV_TWO\nextern const int y[] = { 42 };\n#endif\n\ - #ifdef NOT_THREE\nextern const int z[] = { 42 };\n#endif\n", + #if defined NOT_THREE && NOT_THREE == 1\nextern const int z[] = { 42 };\n#endif\n", ) .generate() .unwrap()