-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #25 from e-bigmoon/hamlet-testcases
Hamlet testcases -- interpolation and conditional
- Loading branch information
Showing
4 changed files
with
46 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
$# SYNTAX TEST "source.yesod.hamlet" "conditionals" | ||
$if isAdmin | ||
$# <--- meta.interpolation.hamlet keyword.control.hamlet | ||
$# ^ - keyword.control.hamlet | ||
$# ^^^^^^^ meta.interpolation.hamlet source.haskell.embedded | ||
<p>Welcome to the admin section. | ||
$# ^ meta.tag.hamlet punctuation.definition.tag.begin.hamlet | ||
$# ^ meta.tag.hamlet entity.name.tag.hamlet | ||
$# ^ meta.tag.hamlet punctuation.definition.tag.end.hamlet | ||
$elseif isLoggedIn | ||
$# <------- meta.interpolation.hamlet keyword.control.hamlet | ||
$# ^ - keyword.control.hamlet | ||
$# ^^^^^^^^^^ meta.interpolation.hamlet source.haskell.embedded | ||
<p>You are not the administrator. | ||
$# ^ meta.tag.hamlet punctuation.definition.tag.begin.hamlet | ||
$# ^ meta.tag.hamlet entity.name.tag.hamlet | ||
$# ^ meta.tag.hamlet punctuation.definition.tag.end.hamlet | ||
$else | ||
$# <---- meta.interpolation.hamlet keyword.control.hamlet | ||
$# ^ - keyword.control.hamlet | ||
<p>I don't know who you are. Please log in so I can decide if you get access. | ||
$# ^ meta.tag.hamlet punctuation.definition.tag.begin.hamlet | ||
$# ^ meta.tag.hamlet entity.name.tag.hamlet | ||
$# ^ meta.tag.hamlet punctuation.definition.tag.end.hamlet |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
$# SYNTAX TEST "source.yesod.hamlet" "interpolation" | ||
<head> | ||
$# <- meta.tag.hamlet punctuation.definition.tag.begin.hamlet | ||
$# <~---- meta.tag.hamlet entity.name.tag.hamlet | ||
$# ^ meta.tag.hamlet punctuation.definition.tag.end.hamlet | ||
<title>#{title} | ||
$# ^ meta.tag.hamlet punctuation.definition.tag.begin.hamlet | ||
$# ^^^^^ meta.tag.hamlet entity.name.tag.hamlet | ||
$# ^ meta.tag.hamlet punctuation.definition.tag.end.hamlet | ||
$# ^^ meta.interpolation.hamlet punctuation.section.interpolation.begin.hamlet | ||
$# ^^^^^ meta.interpolation.hamlet source.haskell.embedded | ||
$# ^ meta.interpolation.hamlet punctuation.section.interpolation.end.hamlet |