From 020f854f6f794e8f9a39ad9d18c6173650ed5be3 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Mon, 30 Nov 2015 02:14:54 -0700 Subject: [PATCH] add bad version string test case --- README.md | 3 +-- test/run_tests.cpp | 5 +++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 1fa201e0c68b88e5b5ce74da6d57238ecd4c3d87..8e4bc96d611ed839a6987cb63fcd90fc935165bb 100644 --- a/README.md +++ b/README.md @@ -42,8 +42,7 @@ make ## Roadmap - * variables and parameters - * Export .so library + * variable declarations and assignment expressions * Multiple files * Type checking * inline assembly and syscalls diff --git a/test/run_tests.cpp b/test/run_tests.cpp index e20eaf8405fd2599894dec2db5a6f754f33085d7..6e6818ed62dc1f62532f89da4972cfdc9bf4d0fa 100644 --- a/test/run_tests.cpp +++ b/test/run_tests.cpp @@ -186,6 +186,11 @@ fn a() { fn b() {} )SOURCE", 1, "Line 4, column 5: unreachable code"); + + add_compile_fail_case("bad version string", R"SOURCE( +#version("aoeu") +export executable "test"; + )SOURCE", 1, "Line 2, column 1: invalid version string"); } static void print_compiler_invokation(TestCase *test_case, Buf *zig_stderr) { -- 2.54.0