Skip to content

Commit

Permalink
Add test for quoted Env variables passed with BINDGEN_EXTRA_CLANG_ARGS.
Browse files Browse the repository at this point in the history
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 <axel.viala@darnuria.eu>
  • Loading branch information
darnuria authored and emilio committed Jan 31, 2024
1 parent 66328b2 commit ee94c43
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bindgen-tests/tests/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit ee94c43

Please sign in to comment.