From 4dc24292f83d65ad106a5e4d3f02366f79c96f99 Mon Sep 17 00:00:00 2001 From: Simon Krajewski Date: Mon, 13 Nov 2023 08:40:59 +0100 Subject: [PATCH] [tests] fix and add closes #10287 closes #11368 --- tests/misc/projects/Issue10287/Main.hx | 2 ++ tests/misc/projects/Issue10287/compile-fail.hxml | 1 + tests/misc/projects/Issue10287/compile-fail.hxml.stderr | 2 ++ tests/misc/projects/Issue11368/Main.hx | 8 ++++++++ tests/misc/projects/Issue11368/compile-fail.hxml | 1 + tests/misc/projects/Issue11368/compile-fail.hxml.stderr | 1 + tests/server/src/TestCase.hx | 2 +- 7 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 tests/misc/projects/Issue10287/Main.hx create mode 100644 tests/misc/projects/Issue10287/compile-fail.hxml create mode 100644 tests/misc/projects/Issue10287/compile-fail.hxml.stderr create mode 100644 tests/misc/projects/Issue11368/Main.hx create mode 100644 tests/misc/projects/Issue11368/compile-fail.hxml create mode 100644 tests/misc/projects/Issue11368/compile-fail.hxml.stderr diff --git a/tests/misc/projects/Issue10287/Main.hx b/tests/misc/projects/Issue10287/Main.hx new file mode 100644 index 00000000000..32a1d6f7118 --- /dev/null +++ b/tests/misc/projects/Issue10287/Main.hx @@ -0,0 +1,2 @@ +function foo() return 1; +function main() trace('${foo()blah}'); \ No newline at end of file diff --git a/tests/misc/projects/Issue10287/compile-fail.hxml b/tests/misc/projects/Issue10287/compile-fail.hxml new file mode 100644 index 00000000000..fab0aeecc3d --- /dev/null +++ b/tests/misc/projects/Issue10287/compile-fail.hxml @@ -0,0 +1 @@ +--main Main \ No newline at end of file diff --git a/tests/misc/projects/Issue10287/compile-fail.hxml.stderr b/tests/misc/projects/Issue10287/compile-fail.hxml.stderr new file mode 100644 index 00000000000..8b64c0786a8 --- /dev/null +++ b/tests/misc/projects/Issue10287/compile-fail.hxml.stderr @@ -0,0 +1,2 @@ +Main.hx:2: characters 31-35 : Unexpected blah +Main.hx:2: characters 31-35 : ... For function argument 'v' \ No newline at end of file diff --git a/tests/misc/projects/Issue11368/Main.hx b/tests/misc/projects/Issue11368/Main.hx new file mode 100644 index 00000000000..ebcbe591912 --- /dev/null +++ b/tests/misc/projects/Issue11368/Main.hx @@ -0,0 +1,8 @@ +macro function test() { + haxe.macro.Context.parseInlineSring("p:true,v:0", haxe.macro.Context.currentPos()) + return macro null; +} + +function main() { + test(); +} \ No newline at end of file diff --git a/tests/misc/projects/Issue11368/compile-fail.hxml b/tests/misc/projects/Issue11368/compile-fail.hxml new file mode 100644 index 00000000000..fab0aeecc3d --- /dev/null +++ b/tests/misc/projects/Issue11368/compile-fail.hxml @@ -0,0 +1 @@ +--main Main \ No newline at end of file diff --git a/tests/misc/projects/Issue11368/compile-fail.hxml.stderr b/tests/misc/projects/Issue11368/compile-fail.hxml.stderr new file mode 100644 index 00000000000..d0589d64f26 --- /dev/null +++ b/tests/misc/projects/Issue11368/compile-fail.hxml.stderr @@ -0,0 +1 @@ +Main.hx:3: characters 2-8 : Missing ; \ No newline at end of file diff --git a/tests/server/src/TestCase.hx b/tests/server/src/TestCase.hx index c9b689965b1..0ca5f359631 100644 --- a/tests/server/src/TestCase.hx +++ b/tests/server/src/TestCase.hx @@ -195,7 +195,7 @@ class TestCase implements ITest { } function assertSkipping(module:String, reason:SkipReason, ?p:haxe.PosInfos) { - var msg = 'skipping $module (${printSkipReason(reason))})'; + var msg = 'skipping $module (${printSkipReason(reason)})'; return Assert.isTrue(hasMessage(msg), null, p); }