Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
M  tests/ParserTests.hs
  • Loading branch information
Anton-Latukha committed Jul 10, 2021
1 parent 980d7af commit fc09dda
Showing 1 changed file with 35 additions and 35 deletions.
70 changes: 35 additions & 35 deletions tests/ParserTests.hs
Original file line number Diff line number Diff line change
Expand Up @@ -453,6 +453,41 @@ case_string_antiquote_syntax_mistakes =
"\"${true\""


-- *** Indented string

case_indented_string =
checks
( mkIndentedStr 0 "a"
, "''a''"
)
( mkIndentedStr 2 "foo\nbar"
, "''\n foo\n bar''"
)
( mkIndentedStr 0 ""
, "'' ''"
)
( mkIndentedStr 0 "''"
, "'''''''"
)
( Fix $ NStr $ Indented 3
[ Antiquoted mkNull
, Plain "\na"
, Antiquoted mkNull
]
, "'' ${null}\n a${null}''"
)

case_indented_string_syntax_mistakes =
mistakes
"'''''"
"'' '"

case_indented_string_escape =
checks
( mkIndentedStr 1 "\n \t \\ ${ \\ \\n ' '' "
, "'' ''\\n ''\\t ''\\\\ ''${ \\ \\n ' ''' ''"
)

-- ** Selection

case_select =
Expand Down Expand Up @@ -554,41 +589,6 @@ case_fun_app_syntax_mistakes =
"f if true then null else null"


-- *** Indented string

case_indented_string =
checks
( mkIndentedStr 0 "a"
, "''a''"
)
( mkIndentedStr 2 "foo\nbar"
, "''\n foo\n bar''"
)
( mkIndentedStr 0 ""
, "'' ''"
)
( mkIndentedStr 0 "''"
, "'''''''"
)
( Fix $ NStr $ Indented 3
[ Antiquoted mkNull
, Plain "\na"
, Antiquoted mkNull
]
, "'' ${null}\n a${null}''"
)

case_indented_string_syntax_mistakes =
mistakes
"'''''"
"'' '"

case_indented_string_escape =
checks
( mkIndentedStr 1 "\n \t \\ ${ \\ \\n ' '' "
, "'' ''\\n ''\\t ''\\\\ ''${ \\ \\n ' ''' ''"
)

-- ** Operators

case_operator_fun_app =
Expand Down

0 comments on commit fc09dda

Please sign in to comment.