From e144ddab249af3737f04267c7f1f0f0e093ed314 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Sun, 3 Apr 2016 18:44:17 -0700 Subject: add multiline string literal and make multiple lines in normal string literals an error --- test/run_tests.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'test/run_tests.cpp') 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"); } ////////////////////////////////////////////////////////////////////////////// -- cgit v1.2.3