Skip to content

Commit

Permalink
Test context sorting
Browse files Browse the repository at this point in the history
  • Loading branch information
rubenv committed Mar 18, 2016
1 parent 59d155f commit fe80b3d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
8 changes: 7 additions & 1 deletion test/extract.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,16 @@ describe('Extract', function () {
];
var catalog = testExtract(files);

assert.equal(catalog.items.length, 3);
assert.equal(catalog.items.length, 6);
assert.equal(catalog.items[0].msgid, 'a');
assert.equal(catalog.items[1].msgid, 'b');
assert.equal(catalog.items[2].msgid, 'c');
assert.equal(catalog.items[3].msgid, 'd');
assert.equal(catalog.items[3].msgctxt, null);
assert.equal(catalog.items[4].msgid, 'd');
assert.equal(catalog.items[4].msgctxt, 'a');
assert.equal(catalog.items[5].msgid, 'd');
assert.equal(catalog.items[5].msgctxt, 'b');
});

it('Extracts strings concatenation from JavaScript source', function () {
Expand Down
3 changes: 3 additions & 0 deletions test/fixtures/sort.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
<p translate>a</p>
<p translate>c</p>
<p translate>b</p>
<p translate translate-context="b">d</p>
<p translate translate-context="a">d</p>
<p translate>d</p>
</body>
</html>

0 comments on commit fe80b3d

Please sign in to comment.