github.com/lmorg/murex@v0.0.0-20240217211045-e081c89cd4ef/lang/expressions/parse_quoteBQ_test.go (about) 1 package expressions 2 3 import ( 4 "testing" 5 6 "github.com/lmorg/murex/test" 7 ) 8 9 func TestParseQuoteBlock(t *testing.T) { 10 tests := []test.MurexTest{ 11 { 12 Block: "echo { %() }", 13 Stdout: "{ %() }\n", 14 }, 15 { 16 Block: "echo { %[] }", 17 Stdout: "{ %[] }\n", 18 }, 19 { 20 Block: "echo { %{} }", 21 Stdout: "{ %{} }\n", 22 }, 23 } 24 25 test.RunMurexTests(tests, t) 26 } 27 28 // https://github.com/lmorg/murex/issues/697 29 func TestParseQuoteBlockIssue697(t *testing.T) { 30 tests := []test.MurexTest{ 31 { 32 Block: "%[1] -> foreach var { out '%{foo}\n%{bar}' }", 33 Stdout: "%{foo}\n%{bar}\n", 34 }, 35 } 36 37 test.RunMurexTests(tests, t) 38 }