Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add test case for #32.

  • Loading branch information...
commit e351ba25e780c6a2e8a2e0a76158cbb528e216c2 1 parent 70d3754
@rubenv authored
View
1  Gruntfile.coffee
@@ -46,6 +46,7 @@ module.exports = (grunt) ->
'tmp/test14.pot': 'test/fixtures/concat.js'
'tmp/test15.pot': 'test/fixtures/data.html'
'tmp/test19.pot': 'test/fixtures/no_delimiter.html'
+ 'tmp/test21.pot': 'test/fixtures/tapestry.tml'
manual:
files:
'tmp/test5.pot': 'test/fixtures/corrupt.html'
View
12 test/extract.coffee
@@ -267,3 +267,15 @@ describe 'Extract', ->
assert.equal(catalog.items[0].references.length, 1)
assert.equal(catalog.items[0].references[0], 'test/fixtures/custom_marker_name.js')
done()
+
+ it 'Can extract tapestry files', (done) ->
+ assert(fs.existsSync('tmp/test21.pot'))
+
+ po.load 'tmp/test21.pot', (err, catalog) ->
+ assert.equal(err, null)
+ assert.equal(catalog.items.length, 1)
+ assert.equal(catalog.items[0].msgid, 'Bonjour from HelloWorld component.')
+ assert.equal(catalog.items[0].msgstr, '')
+ assert.equal(catalog.items[0].references.length, 1)
+ assert.equal(catalog.items[0].references[0], 'test/fixtures/tapestry.tml')
+ done()
View
3  test/fixtures/tapestry.tml
@@ -0,0 +1,3 @@
+<html t:type="layout" xmlns:t="http://tapestry.apache.org/schema/tapestry_5_3.xsd">
+ <h1 translate>Bonjour from HelloWorld component.</h1>
+</html>
Please sign in to comment.
Something went wrong with that request. Please try again.