aboutsummaryrefslogtreecommitdiff
path: root/test/run_tests.cpp
diff options
context:
space:
mode:
authorAndrew Kelley <superjoe30@gmail.com>2016-04-03 18:44:17 -0700
committerAndrew Kelley <superjoe30@gmail.com>2016-04-03 18:59:43 -0700
commite144ddab249af3737f04267c7f1f0f0e093ed314 (patch)
tree13a209862d84c916b5789caf2caf52d3281b235c /test/run_tests.cpp
parent5bae9ba0869409598d272a03477641d234ace8e6 (diff)
downloadzig-e144ddab249af3737f04267c7f1f0f0e093ed314.tar.gz
zig-e144ddab249af3737f04267c7f1f0f0e093ed314.zip
add multiline string literal
and make multiple lines in normal string literals an error
Diffstat (limited to 'test/run_tests.cpp')
-rw-r--r--test/run_tests.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/run_tests.cpp b/test/run_tests.cpp
index 92622b7027..fcec983db6 100644
--- a/test/run_tests.cpp
+++ b/test/run_tests.cpp
@@ -1770,6 +1770,12 @@ fn f() {
const std = @import("std");
}
)SOURCE", 1, ".tmp_source.zig:3:17: error: @import invalid inside function bodies");
+
+
+ add_compile_fail_case("normal string with newline", R"SOURCE(
+const foo = "a
+b";
+ )SOURCE", 1, ".tmp_source.zig:2:13: error: use raw string for multiline string literal");
}
//////////////////////////////////////////////////////////////////////////////