Replace raw UTF8 parser with String parser (#6)
* Replace UTF8 parser with String based one * swift format * Add parsing errors that include context about where error is * Remove old error tests
This commit is contained in:
@@ -128,6 +128,12 @@ final class MethodTests: XCTestCase {
|
||||
""")
|
||||
}
|
||||
|
||||
func testListOutput() throws {
|
||||
let object = [1, 2, 3, 4]
|
||||
let template = try HBMustacheTemplate(string: "{{#.}}{{.}}{{^last()}}, {{/last()}}{{/.}}")
|
||||
XCTAssertEqual(template.render(object), "1, 2, 3, 4")
|
||||
}
|
||||
|
||||
func testDictionaryEnumerated() throws {
|
||||
let template = try HBMustacheTemplate(string: """
|
||||
{{#enumerated(.)}}<b>{{ key }} = {{ value }}</b>{{/enumerated(.)}}
|
||||
|
||||
Reference in New Issue
Block a user