| author | |
| committer | |
| log | d80b072bf29620753fb36b8053c6e81500526fb6 |
| tree | db6ec7ef2db9628dea49875dedecd7c81cdac399 |
| parent | 0804feac00ce4aff2ae746f4246d1675b6b4e491 |
5 files changed, 53 insertions(+), 3 deletions(-)
test/standalone/config_header/autoconf_at/autoconf_at.txt+12| ... | ... | @@ -35,3 +35,15 @@ what is 6*7? 42! |
| 35 | 35 | @text@ |
| 36 | 36 | // expanded variables are considered strings after expansion |
| 37 | 37 | @string@ |
| 38 | ||
| 39 | // variable name with underscores | |
| 40 | value | |
| 41 | ||
| 42 | // backslash before at-sigil does not prevent resolution | |
| 43 | \text | |
| 44 | ||
| 45 | // value that is an at-sign itself | |
| 46 | @ | |
| 47 | ||
| 48 | // incomplete key mid-line is preserved, trailing content kept | |
| 49 | @incomplete trailing content |
test/standalone/config_header/autoconf_at/autoconf_at.txt.in+12| ... | ... | @@ -34,3 +34,15 @@ what is 6*7? @integer@! |
| 34 | 34 | @@string@@ |
| 35 | 35 | // expanded variables are considered strings after expansion |
| 36 | 36 | @string_at@ |
| 37 | ||
| 38 | // variable name with underscores | |
| 39 | @underscored_var@ | |
| 40 | ||
| 41 | // backslash before at-sigil does not prevent resolution | |
| 42 | \@string@ | |
| 43 | ||
| 44 | // value that is an at-sign itself | |
| 45 | @at_sign@ | |
| 46 | ||
| 47 | // incomplete key mid-line is preserved, trailing content kept | |
| 48 | @incomplete trailing content |
test/standalone/config_header/autoconf_undef/config.h+11| ... | ... | @@ -20,4 +20,15 @@ int foo(); |
| 20 | 20 | /* #undef PREFIX_TAB */ |
| 21 | 21 | /* #undef POSTFIX_SPACE */ |
| 22 | 22 | /* #undef POSTFIX_TAB */ |
| 23 | ||
| 24 | // #undef with underscored variable name | |
| 25 | #define SOME_UNDERSCORED 1 | |
| 26 | ||
| 27 | // #undef with extra tokens after variable name (ignored) | |
| 28 | #define SOME_ONE 1 | |
| 29 | ||
| 30 | // non-#undef # lines pass through unchanged | |
| 31 | #define KEPT_DEFINE value | |
| 32 | #include <kept.h> | |
| 23 | 33 | // TODO: unexpected newline is being added here |
| 34 |
test/standalone/config_header/autoconf_undef/config.h.in+13-3| ... | ... | @@ -17,6 +17,16 @@ int foo(); |
| 17 | 17 | |
| 18 | 18 | #undef PREFIX_SPACE |
| 19 | 19 | #undef	PREFIX_TAB |
| 20 | #undef POSTFIX_SPACE | |
| 21 | #undef POSTFIX_TAB	 | |
| 22 | // TODO: unexpected newline is being added here | |
| \ No newline at end of file | ||
| 20 | #undef POSTFIX_SPACE | |
| 21 | #undef POSTFIX_TAB | |
| 22 | ||
| 23 | // #undef with underscored variable name | |
| 24 | #undef SOME_UNDERSCORED | |
| 25 | ||
| 26 | // #undef with extra tokens after variable name (ignored) | |
| 27 | #undef SOME_ONE extra ignored tokens | |
| 28 | ||
| 29 | // non-#undef # lines pass through unchanged | |
| 30 | #define KEPT_DEFINE value | |
| 31 | #include <kept.h> | |
| 32 | // TODO: unexpected newline is being added here |
test/standalone/config_header/build.zig+5| ... | ... | @@ -21,6 +21,8 @@ pub fn build(b: *std.Build) void { |
| 21 | 21 | .PREFIX_TAB = null, |
| 22 | 22 | .POSTFIX_SPACE = null, |
| 23 | 23 | .POSTFIX_TAB = null, |
| 24 | ||
| 25 | .SOME_UNDERSCORED = true, | |
| 24 | 26 | }, |
| 25 | 27 | ); |
| 26 | 28 | const check_config_header = b.addCheckFile(config_header.getOutputFile(), .{ |
| ... | ... | @@ -37,6 +39,9 @@ pub fn build(b: *std.Build) void { |
| 37 | 39 | .integer = 42, |
| 38 | 40 | .string = "text", |
| 39 | 41 | .string_at = "@string@", |
| 42 | ||
| 43 | .underscored_var = "value", | |
| 44 | .at_sign = "@", | |
| 40 | 45 | }, |
| 41 | 46 | ); |
| 42 | 47 | const check_config_header_autoconf_at = b.addCheckFile(config_header_autoconf_at.getOutputFile(), .{ |