Skip to content

Commit

Permalink
RakuAST: fixup tests, we use Str, not RakuAST::StrLiteral
Browse files Browse the repository at this point in the history
  • Loading branch information
lizmat committed May 2, 2023
1 parent 5965d7f commit 8e51307
Showing 1 changed file with 11 additions and 21 deletions.
32 changes: 11 additions & 21 deletions t/12-rakuast/doc-markup.rakutest
Expand Up @@ -17,9 +17,7 @@ subtest 'simple bold markup' => {
# B<this is bold>
ast RakuAST::Doc::Markup.new(
letter => 'B',
atoms => (
RakuAST::StrLiteral.new("this is bold"),
)
atoms => ("this is bold",)
);
for 'Str', $deparsed, 'Raku', $raku.EVAL.DEPARSE -> $type, $it {
is-deeply $it, 'B<this is bold>', "$type: deparse";
Expand All @@ -31,14 +29,12 @@ subtest 'simple bold with italics markup' => {
ast RakuAST::Doc::Markup.new(
letter => 'B',
atoms => (
RakuAST::StrLiteral.new("this "),
"this ",
RakuAST::Doc::Markup.new(
letter => "I",
atoms => (
RakuAST::StrLiteral.new("is"),
)
atoms => ("is",)
),
RakuAST::StrLiteral.new(" bold"),
" bold",
)
);
for 'Str', $deparsed, 'Raku', $raku.EVAL.DEPARSE -> $type, $it {
Expand All @@ -51,18 +47,14 @@ subtest 'link with code markup' => {
ast RakuAST::Doc::Markup.new(
letter => 'L',
atoms => (
RakuAST::StrLiteral.new("The "),
"The ",
RakuAST::Doc::Markup.new(
letter => "C",
atoms => (
RakuAST::StrLiteral.new("Raku"),
)
atoms => ("Raku",)
),
RakuAST::StrLiteral.new(" Programming Language"),
" Programming Language",
),
meta => (
RakuAST::StrLiteral.new("https://raku.org"),
)
meta => ("https://raku.org",)
);
for 'Str', $deparsed, 'Raku', $raku.EVAL.DEPARSE -> $type, $it {
is-deeply $it,
Expand All @@ -75,12 +67,10 @@ subtest 'index entry with multiple lemmas' => {
# X<hash|hashes, definition of;associative arrays>
ast RakuAST::Doc::Markup.new(
letter => 'X',
atoms => (
RakuAST::StrLiteral.new("hash"),
),
atoms => ("hash",),
meta => (
RakuAST::StrLiteral.new("hashes, definition of"),
RakuAST::StrLiteral.new("associative arrays"),
"hashes, definition of",
"associative arrays",
),
separator => ';',
);
Expand Down

0 comments on commit 8e51307

Please sign in to comment.