From 8fb6c040d6603d14d6828f068385312de0b1f3f2 Mon Sep 17 00:00:00 2001 From: maxonfjvipon Date: Thu, 18 Jan 2024 19:18:41 +0300 Subject: [PATCH] fix(#2802): single quotes instead of trippled --- .../org/eolang/parser/xmir-to-eo-reversed.xsl | 13 +++------- .../org/eolang/parser/xmir-to-eo.xsl | 13 +++------- .../org/eolang/parser/samples/bytes.yaml | 12 +++------- .../eolang/parser/samples/empty-string.yaml | 6 ++--- .../org/eolang/parser/samples/idiomatic.yaml | 24 +++++-------------- .../parser/samples/multiline-string.yaml | 21 ++++++++++++++++ .../eolang/parser/samples/stars-tuples.yaml | 8 ++----- .../org/eolang/parser/samples/times.yaml | 8 ++----- 8 files changed, 42 insertions(+), 63 deletions(-) create mode 100644 eo-parser/src/test/resources/org/eolang/parser/samples/multiline-string.yaml diff --git a/eo-parser/src/main/resources/org/eolang/parser/xmir-to-eo-reversed.xsl b/eo-parser/src/main/resources/org/eolang/parser/xmir-to-eo-reversed.xsl index ae15cf74f6..666e78cf7d 100644 --- a/eo-parser/src/main/resources/org/eolang/parser/xmir-to-eo-reversed.xsl +++ b/eo-parser/src/main/resources/org/eolang/parser/xmir-to-eo-reversed.xsl @@ -135,18 +135,11 @@ SOFTWARE. - - """ - - - - - - - - """ + " + + " diff --git a/eo-parser/src/main/resources/org/eolang/parser/xmir-to-eo.xsl b/eo-parser/src/main/resources/org/eolang/parser/xmir-to-eo.xsl index d9946bc563..ebcadbfaa4 100644 --- a/eo-parser/src/main/resources/org/eolang/parser/xmir-to-eo.xsl +++ b/eo-parser/src/main/resources/org/eolang/parser/xmir-to-eo.xsl @@ -151,18 +151,11 @@ SOFTWARE. - - """ - - - - - - - - """ + " + + " diff --git a/eo-parser/src/test/resources/org/eolang/parser/samples/bytes.yaml b/eo-parser/src/test/resources/org/eolang/parser/samples/bytes.yaml index 5a58108b4c..f027bdb0c2 100644 --- a/eo-parser/src/test/resources/org/eolang/parser/samples/bytes.yaml +++ b/eo-parser/src/test/resources/org/eolang/parser/samples/bytes.yaml @@ -1,9 +1,7 @@ origin: | EA-EA-EA-EA > xs - """ - hello - """ > ys + "hello" > ys TRUE > b1 @@ -12,9 +10,7 @@ origin: | strait: | EA-EA-EA-EA > xs - """ - hello - """ > ys + "hello" > ys TRUE > b1 @@ -23,9 +19,7 @@ strait: | reversed: | EA-EA-EA-EA > xs - """ - hello - """ > ys + "hello" > ys TRUE > b1 diff --git a/eo-parser/src/test/resources/org/eolang/parser/samples/empty-string.yaml b/eo-parser/src/test/resources/org/eolang/parser/samples/empty-string.yaml index 8fcc59b094..5bb125e71f 100644 --- a/eo-parser/src/test/resources/org/eolang/parser/samples/empty-string.yaml +++ b/eo-parser/src/test/resources/org/eolang/parser/samples/empty-string.yaml @@ -11,8 +11,7 @@ strait: | QQ .txt .sprintf - """ - """ + "" reversed: | [] > app @@ -22,5 +21,4 @@ reversed: | sprintf. txt. QQ - """ - """ + "" diff --git a/eo-parser/src/test/resources/org/eolang/parser/samples/idiomatic.yaml b/eo-parser/src/test/resources/org/eolang/parser/samples/idiomatic.yaml index f3d719e93f..f832c6edf7 100644 --- a/eo-parser/src/test/resources/org/eolang/parser/samples/idiomatic.yaml +++ b/eo-parser/src/test/resources/org/eolang/parser/samples/idiomatic.yaml @@ -43,23 +43,17 @@ strait: | this n .minus - """ - \u5BB6 - """ + "\u5BB6" 4.55 > x! * - """ - Hello, \u0434\u0440\u0443\u0433 - """ + "Hello, \u0434\u0440\u0443\u0433" 2.18 TRUE .plus bar n .plus - """ - hello, \u5927\u5BB6! - """ + "hello, \u5927\u5BB6!" .if > @ reversed: | @@ -80,19 +74,13 @@ reversed: | this minus. n - """ - \u5BB6 - """ + "\u5BB6" 4.55 > x! * - """ - Hello, \u0434\u0440\u0443\u0433 - """ + "Hello, \u0434\u0440\u0443\u0433" 2.18 TRUE bar plus. n - """ - hello, \u5927\u5BB6! - """ + "hello, \u5927\u5BB6!" diff --git a/eo-parser/src/test/resources/org/eolang/parser/samples/multiline-string.yaml b/eo-parser/src/test/resources/org/eolang/parser/samples/multiline-string.yaml new file mode 100644 index 0000000000..4fc85f4160 --- /dev/null +++ b/eo-parser/src/test/resources/org/eolang/parser/samples/multiline-string.yaml @@ -0,0 +1,21 @@ +origin: | + [] > app + QQ.io.stdout > @ + """ + Hello + it's me + """ + +strait: | + [] > app + QQ + .io + .stdout > @ + "Hello\nit's me" + +reversed: | + [] > app + stdout. > @ + io. + QQ + "Hello\nit's me" diff --git a/eo-parser/src/test/resources/org/eolang/parser/samples/stars-tuples.yaml b/eo-parser/src/test/resources/org/eolang/parser/samples/stars-tuples.yaml index e04e13cf4a..3b1e60a8d5 100644 --- a/eo-parser/src/test/resources/org/eolang/parser/samples/stars-tuples.yaml +++ b/eo-parser/src/test/resources/org/eolang/parser/samples/stars-tuples.yaml @@ -4,15 +4,11 @@ origin: | strait: | * > array 1 - """ - Hello - """ + "Hello" x reversed: | * > array 1 - """ - Hello - """ + "Hello" x diff --git a/eo-parser/src/test/resources/org/eolang/parser/samples/times.yaml b/eo-parser/src/test/resources/org/eolang/parser/samples/times.yaml index f4ec32c721..4cef1c2f43 100644 --- a/eo-parser/src/test/resources/org/eolang/parser/samples/times.yaml +++ b/eo-parser/src/test/resources/org/eolang/parser/samples/times.yaml @@ -13,9 +13,7 @@ strait: | QQ .txt .sprintf - """ - result is %d\n - """ + "result is %d\n" -1 .times 228 @@ -28,9 +26,7 @@ reversed: | sprintf. txt. QQ - """ - result is %d\n - """ + "result is %d\n" times. -1 228