Skip to content

Commit

Permalink
Merge pull request #53 from WyriHaximus-labs/add-support-for-escaped-…
Browse files Browse the repository at this point in the history
…quoting

Add support for escaped quoting
  • Loading branch information
lorenzo committed May 27, 2020
2 parents fb05a80 + a06ca3b commit 8858f5b
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions test/Language/Docker/ParserSpec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,19 @@ spec = do
ast = [ Env [("JAVA_HOME", "C:\\\\jdk1.8.0_112")]
]
in assertAst dockerfile ast
it "parses env with % in them" $
let dockerfile = Text.unlines [ "ENV PHP_FPM_ACCESS_FORMAT=\"prefix \\\"quoted\\\" suffix\""
]
ast = [ Env [("PHP_FPM_ACCESS_FORMAT", "%R - %u %t \"%m %r\" %s")]
]
in assertAst dockerfile ast

it "parses env with % in them" $
let dockerfile = Text.unlines [ "ENV PHP_FPM_ACCESS_FORMAT=\"%R - %u %t \\\"%m %r\\\" %s\""
]
ast = [ Env [("PHP_FPM_ACCESS_FORMAT", "%R - %u %t \"%m %r\" %s")]
]
in assertAst dockerfile ast

describe "parse RUN" $ do
it "escaped with space before" $
Expand Down

0 comments on commit 8858f5b

Please sign in to comment.