From c8acc534a9e8a8cbe6833d69d1f98ddfb988b859 Mon Sep 17 00:00:00 2001 From: Nathan McCarty Date: Tue, 31 Dec 2024 20:40:00 -0500 Subject: [PATCH] Properly support multi-word test names --- lib/IUtils.rakumod | 2 +- lib/IUtils/Regexes.rakumod | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/IUtils.rakumod b/lib/IUtils.rakumod index 3832d49..007c255 100644 --- a/lib/IUtils.rakumod +++ b/lib/IUtils.rakumod @@ -95,7 +95,7 @@ class PackageInfo { when * eq 'Either' {succeed Either}; }; my $test = - Test.new(name => $match.Str, + Test.new(name => $match.Str.trim, expr => $match.Str, output-type => $output-type); @tests.push($test); diff --git a/lib/IUtils/Regexes.rakumod b/lib/IUtils/Regexes.rakumod index d9e2ee7..5ea28e1 100644 --- a/lib/IUtils/Regexes.rakumod +++ b/lib/IUtils/Regexes.rakumod @@ -10,11 +10,12 @@ my token output-type { my token comment-start { \- \- } my token flag { \@ \@ } my token name { <[\w \-]>+ } +my token test-name { \V+ } my token comment-line { <&comment-start> \V* \v } my regex flagged-expression is export { - <&comment-start> \h* \h* \V* \v + \h* <&comment-start> \h* \h* \V* \v * \h+ \: \h+ 'IO' \h+ \V* \v }