diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2016-07-09 12:17:31 -0700 |
|---|---|---|
| committer | Andrew Kelley <superjoe30@gmail.com> | 2016-07-09 12:17:31 -0700 |
| commit | a5251a1c102334a5dcb07e4fcc2b676be55fe2be (patch) | |
| tree | 459d720365823b10473be028d25ad86b87b825f5 /test/run_tests.cpp | |
| parent | 100e8e15fa087be8975173c03a2f89b227b16730 (diff) | |
| download | zig-a5251a1c102334a5dcb07e4fcc2b676be55fe2be.tar.gz zig-a5251a1c102334a5dcb07e4fcc2b676be55fe2be.zip | |
parseh: support octal in C macro string literal
Diffstat (limited to 'test/run_tests.cpp')
| -rw-r--r-- | test/run_tests.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/run_tests.cpp b/test/run_tests.cpp index 812484b463..16b555f4ad 100644 --- a/test/run_tests.cpp +++ b/test/run_tests.cpp @@ -1731,6 +1731,15 @@ struct type { )SOURCE", 2, R"(export struct struct_type { @"defer": c_int, })", R"(pub const @"type" = struct_type;)"); + + add_parseh_case("macro defines string literal with octal", R"SOURCE( +#define FOO "aoeu\023 derp" +#define FOO2 "aoeu\0234 derp" +#define FOO_CHAR '\077' + )SOURCE", 3, + R"(pub const FOO = c"aoeu\x13 derp")", + R"(pub const FOO2 = c"aoeu\x134 derp")", + R"(pub const FOO_CHAR = '\x3f')"); } static void run_self_hosted_test(bool is_release_mode) { |
