diff options
author | Florian Dold <florian.dold@gmail.com> | 2019-03-27 21:01:33 +0100 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2019-03-27 21:01:33 +0100 |
commit | cc97a4dd2a967e1c2273bd5f4c5f49a5bf2e2585 (patch) | |
tree | 92c5d88706a6ffc654d1b133618d357890e7096b /node_modules/gettext-parser/test | |
parent | 3771b4d6b67b34c130f3a9a1a15f42deefdb2eda (diff) |
remove node_modules
Diffstat (limited to 'node_modules/gettext-parser/test')
-rw-r--r-- | node_modules/gettext-parser/test/fixtures/latin13-mo.json | 69 | ||||
-rw-r--r-- | node_modules/gettext-parser/test/fixtures/latin13-po.json | 100 | ||||
-rw-r--r-- | node_modules/gettext-parser/test/fixtures/latin13.mo | bin | 697 -> 0 bytes | |||
-rw-r--r-- | node_modules/gettext-parser/test/fixtures/latin13.po | 60 | ||||
-rw-r--r-- | node_modules/gettext-parser/test/fixtures/utf8-mo.json | 69 | ||||
-rw-r--r-- | node_modules/gettext-parser/test/fixtures/utf8-po.json | 127 | ||||
-rw-r--r-- | node_modules/gettext-parser/test/fixtures/utf8.mo | bin | 691 -> 0 bytes | |||
-rw-r--r-- | node_modules/gettext-parser/test/fixtures/utf8.po | 75 | ||||
-rw-r--r-- | node_modules/gettext-parser/test/folder-test.js | 40 | ||||
-rw-r--r-- | node_modules/gettext-parser/test/mo-compiler-test.js | 30 | ||||
-rw-r--r-- | node_modules/gettext-parser/test/mo-parser-test.js | 29 | ||||
-rw-r--r-- | node_modules/gettext-parser/test/po-compiler-test.js | 30 | ||||
-rw-r--r-- | node_modules/gettext-parser/test/po-parser-test.js | 61 |
13 files changed, 0 insertions, 690 deletions
diff --git a/node_modules/gettext-parser/test/fixtures/latin13-mo.json b/node_modules/gettext-parser/test/fixtures/latin13-mo.json deleted file mode 100644 index c91b4f78e..000000000 --- a/node_modules/gettext-parser/test/fixtures/latin13-mo.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "charset": "iso-8859-13", - "headers": { - "project-id-version": "gettext-parser", - "report-msgid-bugs-to": "andris@node.ee", - "pot-creation-date": "2012-05-18 14:28:00+03:00", - "po-revision-date": "2012-05-18 14:44+0300", - "last-translator": "Andris Reinman <andris@kreata.ee>", - "language-team": "gettext-parser <andris@node.ee>", - "mime-version": "1.0", - "content-type": "text/plain; charset=iso-8859-13", - "content-transfer-encoding": "8bit", - "language": "", - "plural-forms": "nplurals=2; plural=(n!=1);", - "x-poedit-language": "Estonian", - "x-poedit-country": "ESTONIA", - "x-poedit-sourcecharset": "iso-8859-13" - }, - "translations": { - "": { - "": { - "msgid": "", - "msgstr": [ - "Project-Id-Version: gettext-parser\nReport-Msgid-Bugs-To: andris@node.ee\nPOT-Creation-Date: 2012-05-18 14:28:00+03:00\nPO-Revision-Date: 2012-05-18 14:44+0300\nLast-Translator: Andris Reinman <andris@kreata.ee>\nLanguage-Team: gettext-parser <andris@node.ee>\nMIME-Version: 1.0\nContent-Type: text/plain; charset=iso-8859-13\nContent-Transfer-Encoding: 8bit\nLanguage: \nPlural-Forms: nplurals=2; plural=(n!=1);\nX-Poedit-Language: Estonian\nX-Poedit-Country: ESTONIA\nX-Poedit-Sourcecharset: iso-8859-13\n" - ] - }, - "o1": { - "msgid": "o1", - "msgstr": [ - "t1" - ] - }, - "o2-1": { - "msgid": "o2-1", - "msgid_plural": "o2-2", - "msgstr": [ - "t2-1", - "t2-2" - ] - }, - "o3-õäöü": { - "msgid": "o3-õäöü", - "msgstr": [ - "t3-žš" - ] - } - }, - "c1": { - "co1": { - "msgctxt": "c1", - "msgid": "co1", - "msgstr": [ - "ct1" - ] - } - }, - "c2": { - "co2-1": { - "msgctxt": "c2", - "msgid": "co2-1", - "msgid_plural": "co2-2", - "msgstr": [ - "ct2-1", - "ct2-2" - ] - } - } - } -}
\ No newline at end of file diff --git a/node_modules/gettext-parser/test/fixtures/latin13-po.json b/node_modules/gettext-parser/test/fixtures/latin13-po.json deleted file mode 100644 index c4b394d0c..000000000 --- a/node_modules/gettext-parser/test/fixtures/latin13-po.json +++ /dev/null @@ -1,100 +0,0 @@ -{ - "charset": "iso-8859-13", - "headers": { - "project-id-version": "gettext-parser", - "report-msgid-bugs-to": "andris@node.ee", - "pot-creation-date": "2012-05-18 14:28:00+03:00", - "po-revision-date": "2012-05-18 14:44+0300", - "last-translator": "Andris Reinman <andris@kreata.ee>", - "language-team": "gettext-parser <andris@node.ee>", - "mime-version": "1.0", - "content-type": "text/plain; charset=iso-8859-13", - "content-transfer-encoding": "8bit", - "language": "", - "plural-forms": "nplurals=2; plural=(n!=1);", - "x-poedit-language": "Estonian", - "x-poedit-country": "ESTONIA", - "x-poedit-sourcecharset": "iso-8859-13" - }, - "translations": { - "": { - "": { - "msgid": "", - "comments": { - "translator": "gettext-parser test file.\nCopyright (C) 2012 Andris Reinman\nThis file is distributed under the same license as the gettext-parser package.\nANDRIS REINMAN <andris@node.ee>, 2012.\n" - }, - "msgstr": [ - "Project-Id-Version: gettext-parser\nReport-Msgid-Bugs-To: andris@node.ee\nPOT-Creation-Date: 2012-05-18 14:28:00+03:00\nPO-Revision-Date: 2012-05-18 14:44+0300\nLast-Translator: Andris Reinman <andris@kreata.ee>\nLanguage-Team: gettext-parser <andris@node.ee>\nMIME-Version: 1.0\nContent-Type: text/plain; charset=iso-8859-13\nContent-Transfer-Encoding: 8bit\nLanguage: \nPlural-Forms: nplurals=2; plural=(n!=1);\nX-Poedit-Language: Estonian\nX-Poedit-Country: ESTONIA\nX-Poedit-Sourcecharset: iso-8859-13\n" - ] - }, - "o1": { - "msgid": "o1", - "comments": { - "translator": "Normal string" - }, - "msgstr": [ - "t1" - ] - }, - "o2-1": { - "msgid": "o2-1", - "comments": { - "translator": "Plural string" - }, - "msgid_plural": "o2-2", - "msgstr": [ - "t2-1", - "t2-2" - ] - }, - "o3-õäöü": { - "msgid": "o3-õäöü", - "comments": { - "translator": "Normal string with special chars" - }, - "msgstr": [ - "t3-žš" - ] - }, - "test": { - "msgid": "test", - "comments": { - "translator": "Normal comment line 1\nNormal comment line 2", - "extracted": "Editors note line 1\nEditors note line 2", - "reference": "/absolute/path:13\n/absolute/path:14", - "flag": "line 1\nline 2", - "previous": "line 3\nline 4" - }, - "msgstr": [ - "test" - ] - } - }, - "c1": { - "co1": { - "msgid": "co1", - "msgctxt": "c1", - "comments": { - "translator": "Normal string in a context" - }, - "msgstr": [ - "ct1" - ] - } - }, - "c2": { - "co2-1": { - "msgid": "co2-1", - "msgctxt": "c2", - "comments": { - "translator": "Plural string in a context" - }, - "msgid_plural": "co2-2", - "msgstr": [ - "ct2-1", - "ct2-2" - ] - } - } - } -}
\ No newline at end of file diff --git a/node_modules/gettext-parser/test/fixtures/latin13.mo b/node_modules/gettext-parser/test/fixtures/latin13.mo Binary files differdeleted file mode 100644 index bbfd0eb09..000000000 --- a/node_modules/gettext-parser/test/fixtures/latin13.mo +++ /dev/null diff --git a/node_modules/gettext-parser/test/fixtures/latin13.po b/node_modules/gettext-parser/test/fixtures/latin13.po deleted file mode 100644 index d42a339bf..000000000 --- a/node_modules/gettext-parser/test/fixtures/latin13.po +++ /dev/null @@ -1,60 +0,0 @@ -# gettext-parser test file. -# Copyright (C) 2012 Andris Reinman -# This file is distributed under the same license as the gettext-parser package. -# ANDRIS REINMAN <andris@node.ee>, 2012. -# -msgid "" -msgstr "" -"Project-Id-Version: gettext-parser\n" -"Report-Msgid-Bugs-To: andris@node.ee\n" -"POT-Creation-Date: 2012-05-18 14:28:00+03:00\n" -"PO-Revision-Date: 2012-05-18 14:44+0300\n" -"Last-Translator: Andris Reinman <andris@kreata.ee>\n" -"Language-Team: gettext-parser <andris@node.ee>\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=iso-8859-13\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: \n" -"Plural-Forms: nplurals=2; plural=(n!=1);\n" -"X-Poedit-Language: Estonian\n" -"X-Poedit-Country: ESTONIA\n" -"X-Poedit-Sourcecharset: iso-8859-13\n" - -# Normal string -msgid "o1" -msgstr "t1" - -# Plural string -msgid "o2-1" -msgid_plural "o2-2" -msgstr[0] "t2-1" -msgstr[1] "t2-2" - -# Normal string with special chars -msgid "o3-õäöü" -msgstr "t3-þð" - -# Normal comment line 1 -# Normal comment line 2 -#: /absolute/path:13 -#: /absolute/path:14 -#. Editors note line 1 -#. Editors note line 2 -#, line 1 -#, line 2 -#| line 3 -#| line 4 -msgid "test" -msgstr "test" - -# Normal string in a context -msgctxt "c1" -msgid "co1" -msgstr "ct1" - -# Plural string in a context -msgctxt "c2" -msgid "co2-1" -msgid_plural "co2-2" -msgstr[0] "ct2-1" -msgstr[1] "ct2-2"
\ No newline at end of file diff --git a/node_modules/gettext-parser/test/fixtures/utf8-mo.json b/node_modules/gettext-parser/test/fixtures/utf8-mo.json deleted file mode 100644 index 29b2c0852..000000000 --- a/node_modules/gettext-parser/test/fixtures/utf8-mo.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "charset": "utf-8", - "headers": { - "project-id-version": "gettext-parser", - "report-msgid-bugs-to": "andris@node.ee", - "pot-creation-date": "2012-05-18 14:28:00+03:00", - "po-revision-date": "2012-05-18 14:37+0300", - "last-translator": "Andris Reinman <andris@kreata.ee>", - "language-team": "gettext-parser <andris@node.ee>", - "mime-version": "1.0", - "content-type": "text/plain; charset=utf-8", - "content-transfer-encoding": "8bit", - "language": "", - "plural-forms": "nplurals=2; plural=(n!=1);", - "x-poedit-language": "Estonian", - "x-poedit-country": "ESTONIA", - "x-poedit-sourcecharset": "utf-8" - }, - "translations": { - "": { - "": { - "msgid": "", - "msgstr": [ - "Project-Id-Version: gettext-parser\nReport-Msgid-Bugs-To: andris@node.ee\nPOT-Creation-Date: 2012-05-18 14:28:00+03:00\nPO-Revision-Date: 2012-05-18 14:37+0300\nLast-Translator: Andris Reinman <andris@kreata.ee>\nLanguage-Team: gettext-parser <andris@node.ee>\nMIME-Version: 1.0\nContent-Type: text/plain; charset=utf-8\nContent-Transfer-Encoding: 8bit\nLanguage: \nPlural-Forms: nplurals=2; plural=(n!=1);\nX-Poedit-Language: Estonian\nX-Poedit-Country: ESTONIA\nX-Poedit-Sourcecharset: utf-8\n" - ] - }, - "o1": { - "msgid": "o1", - "msgstr": [ - "t1" - ] - }, - "o2-1": { - "msgid": "o2-1", - "msgid_plural": "o2-2", - "msgstr": [ - "t2-1", - "t2-2" - ] - }, - "o3-õäöü": { - "msgid": "o3-õäöü", - "msgstr": [ - "t3-žš" - ] - } - }, - "c1": { - "co1": { - "msgctxt": "c1", - "msgid": "co1", - "msgstr": [ - "ct1" - ] - } - }, - "c2": { - "co2-1": { - "msgctxt": "c2", - "msgid": "co2-1", - "msgid_plural": "co2-2", - "msgstr": [ - "ct2-1", - "ct2-2" - ] - } - } - } -}
\ No newline at end of file diff --git a/node_modules/gettext-parser/test/fixtures/utf8-po.json b/node_modules/gettext-parser/test/fixtures/utf8-po.json deleted file mode 100644 index e5921b7e8..000000000 --- a/node_modules/gettext-parser/test/fixtures/utf8-po.json +++ /dev/null @@ -1,127 +0,0 @@ -{ - "charset": "utf-8", - "headers": { - "project-id-version": "gettext-parser", - "report-msgid-bugs-to": "andris@node.ee", - "pot-creation-date": "2012-05-18 14:28:00+03:00", - "po-revision-date": "2012-05-18 14:37+0300", - "last-translator": "Andris Reinman <andris@kreata.ee>", - "language-team": "gettext-parser <andris@node.ee>", - "mime-version": "1.0", - "content-type": "text/plain; charset=utf-8", - "content-transfer-encoding": "8bit", - "language": "", - "plural-forms": "nplurals=2; plural=(n!=1);", - "x-poedit-language": "Estonian", - "x-poedit-country": "ESTONIA", - "x-poedit-sourcecharset": "utf-8" - }, - "translations": { - "": { - "": { - "msgid": "", - "comments": { - "translator": "gettext-parser test file.\nCopyright (C) 2012 Andris Reinman\nThis file is distributed under the same license as the gettext-parser package.\nANDRIS REINMAN <andris@node.ee>, 2012.\n" - }, - "msgstr": [ - "Project-Id-Version: gettext-parser\nReport-Msgid-Bugs-To: andris@node.ee\nPOT-Creation-Date: 2012-05-18 14:28:00+03:00\nPO-Revision-Date: 2012-05-18 14:37+0300\nLast-Translator: Andris Reinman <andris@kreata.ee>\nLanguage-Team: gettext-parser <andris@node.ee>\nMIME-Version: 1.0\nContent-Type: text/plain; charset=utf-8\nContent-Transfer-Encoding: 8bit\nLanguage: \nPlural-Forms: nplurals=2; plural=(n!=1);\nX-Poedit-Language: Estonian\nX-Poedit-Country: ESTONIA\nX-Poedit-Sourcecharset: utf-8\n" - ] - }, - "o1": { - "msgid": "o1", - "comments": { - "translator": "Normal string" - }, - "msgstr": [ - "t1" - ] - }, - "o2-1": { - "msgid": "o2-1", - "comments": { - "translator": "Plural string" - }, - "msgid_plural": "o2-2\no2-3\no2-4", - "msgstr": [ - "t2-1", - "t2-2" - ] - }, - "o3-õäöü": { - "msgid": "o3-õäöü", - "comments": { - "translator": "Normal string with special chars" - }, - "msgstr": [ - "t3-žš" - ] - }, - "test": { - "msgid": "test", - "comments": { - "translator": "Normal comment line 1\nNormal comment line 2", - "extracted": "Editors note line 1\nEditors note line 2", - "reference": "/absolute/path:13\n/absolute/path:14", - "flag": "line 1\nline 2", - "previous": "line 3\nline 4" - }, - "msgstr": [ - "test" - ] - }, - "\"\\'\t": { - "msgid": "\"\\'\t", - "comments": { - "translator": "String with escapes" - }, - "msgstr": [ - "\"\\'\t" - ] - } - }, - "c1": { - "co1": { - "msgid": "co1", - "msgctxt": "c1", - "comments": { - "translator": "Normal string in a context" - }, - "msgstr": [ - "ct1" - ] - } - }, - "c2": { - "co2-1": { - "msgid": "co2-1", - "msgctxt": "c2", - "comments": { - "translator": "Plural string in a context" - }, - "msgid_plural": "co2-2", - "msgstr": [ - "ct2-1", - "ct2-2" - ] - } - }, - "Button label": { - "Log in": { - "msgid": "Log in", - "msgctxt": "Button label", - "msgstr": [ - "" - ] - } - }, - "Dialog title": { - "Log in": { - "msgid": "Log in", - "msgctxt": "Dialog title", - "msgstr": [ - "" - ] - } - } - } -}
\ No newline at end of file diff --git a/node_modules/gettext-parser/test/fixtures/utf8.mo b/node_modules/gettext-parser/test/fixtures/utf8.mo Binary files differdeleted file mode 100644 index efafe43e6..000000000 --- a/node_modules/gettext-parser/test/fixtures/utf8.mo +++ /dev/null diff --git a/node_modules/gettext-parser/test/fixtures/utf8.po b/node_modules/gettext-parser/test/fixtures/utf8.po deleted file mode 100644 index 3d879463a..000000000 --- a/node_modules/gettext-parser/test/fixtures/utf8.po +++ /dev/null @@ -1,75 +0,0 @@ -# gettext-parser test file. -# Copyright (C) 2012 Andris Reinman -# This file is distributed under the same license as the gettext-parser package. -# ANDRIS REINMAN <andris@node.ee>, 2012. -# -msgid "" -msgstr "" -"Project-Id-Version: gettext-parser\n" -"Report-Msgid-Bugs-To: andris@node.ee\n" -"POT-Creation-Date: 2012-05-18 14:28:00+03:00\n" -"PO-Revision-Date: 2012-05-18 14:37+0300\n" -"Last-Translator: Andris Reinman <andris@kreata.ee>\n" -"Language-Team: gettext-parser <andris@node.ee>\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=utf-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: \n" -"Plural-Forms: nplurals=2; plural=(n!=1);\n" -"X-Poedit-Language: Estonian\n" -"X-Poedit-Country: ESTONIA\n" -"X-Poedit-Sourcecharset: utf-8\n" - -# Normal string -msgid "o1" -msgstr "t1" - -# Plural string -msgid "o2-1" -msgid_plural "" -"o2-2\n" -"o2-3\n" -"o2-4" -msgstr[0] "t2-1" -msgstr[1] "t2-2" - -# Normal string with special chars -msgid "o3-õäöü" -msgstr "t3-žš" - -# Normal comment line 1 -# Normal comment line 2 -#: /absolute/path:13 -#: /absolute/path:14 -#. Editors note line 1 -#. Editors note line 2 -#, line 1 -#, line 2 -#| line 3 -#| line 4 -msgid "test" -msgstr "test" - -# String with escapes -msgid "\"\\'\t" -msgstr "\"\\'\t" - -# Normal string in a context -msgctxt "c1" -msgid "co1" -msgstr "ct1" - -# Plural string in a context -msgctxt "c2" -msgid "co2-1" -msgid_plural "co2-2" -msgstr[0] "ct2-1" -msgstr[1] "ct2-2" - -msgctxt "Button label" -msgid "Log in" -msgstr "" - -msgctxt "Dialog title" -msgid "Log in" -msgstr ""
\ No newline at end of file diff --git a/node_modules/gettext-parser/test/folder-test.js b/node_modules/gettext-parser/test/folder-test.js deleted file mode 100644 index 7f1bbecae..000000000 --- a/node_modules/gettext-parser/test/folder-test.js +++ /dev/null @@ -1,40 +0,0 @@ -'use strict'; - -var chai = require('chai'); -var sharedFuncs = require('../lib/shared'); - -var expect = chai.expect; -chai.config.includeStack = true; - -describe('Folding tests', function() { - - it('Short line, no folding', function() { - var line = 'abc def ghi'; - var folded = sharedFuncs.foldLine(line); - - expect(line).to.equal(folded.join('')); - expect(folded.length).to.equal(1); - }); - - it('Short line, force fold with newline', function() { - var line = 'abc \\ndef \\nghi'; - var folded = sharedFuncs.foldLine(line); - - expect(line).to.equal(folded.join('')); - expect(folded).to.deep.equal(['abc \\n', 'def \\n', 'ghi']); - }); - - it('Long line', function() { - var expected = ['Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum pretium ', - 'a nunc ac fringilla. Nulla laoreet tincidunt tincidunt. Proin tristique ', - 'vestibulum mauris non aliquam. Vivamus volutpat odio nisl, sed placerat ', - 'turpis sodales a. Vestibulum quis lectus ac elit sagittis sodales ac a ', - 'felis. Nulla iaculis, nisl ut mattis fringilla, tortor quam tincidunt ', - 'lorem, quis feugiat purus felis ut velit. Donec euismod eros ut leo ', - 'lobortis tristique.' - ]; - var folded = sharedFuncs.foldLine(expected.join('')); - expect(folded).to.deep.equal(expected); - }); - -});
\ No newline at end of file diff --git a/node_modules/gettext-parser/test/mo-compiler-test.js b/node_modules/gettext-parser/test/mo-compiler-test.js deleted file mode 100644 index 77b820f81..000000000 --- a/node_modules/gettext-parser/test/mo-compiler-test.js +++ /dev/null @@ -1,30 +0,0 @@ -'use strict'; - -var chai = require('chai'); -var gettextParser = require('..'); -var fs = require('fs'); - -var expect = chai.expect; -chai.config.includeStack = true; - -describe('MO Compiler', function() { - - describe('UTF-8', function() { - it('should compile', function() { - var json = JSON.parse(fs.readFileSync(__dirname + '/fixtures/utf8-mo.json', 'utf-8')); - var mo = fs.readFileSync(__dirname + '/fixtures/utf8.mo'); - - var compiled = gettextParser.mo.compile(json); - expect(compiled).to.deep.equal(mo); - }); - }); - - describe('Latin-13', function() { - it('should compile', function() { - var json = JSON.parse(fs.readFileSync(__dirname + '/fixtures/latin13-mo.json', 'utf-8')); - var mo = fs.readFileSync(__dirname + '/fixtures/latin13.mo'); - var compiled = gettextParser.mo.compile(json); - expect(compiled).to.deep.equal(mo); - }); - }); -});
\ No newline at end of file diff --git a/node_modules/gettext-parser/test/mo-parser-test.js b/node_modules/gettext-parser/test/mo-parser-test.js deleted file mode 100644 index a8d9895c4..000000000 --- a/node_modules/gettext-parser/test/mo-parser-test.js +++ /dev/null @@ -1,29 +0,0 @@ -'use strict'; - -var chai = require('chai'); -var gettextParser = require('..'); -var fs = require('fs'); - -var expect = chai.expect; -chai.config.includeStack = true; - -describe('MO Parser', function() { - - describe('UTF-8', function() { - it('should parse', function() { - var mo = fs.readFileSync(__dirname + '/fixtures/utf8.mo'); - var json = JSON.parse(fs.readFileSync(__dirname + '/fixtures/utf8-mo.json', 'utf-8')); - var parsed = gettextParser.mo.parse(mo); - expect(parsed).to.deep.equal(json); - }); - }); - - describe('Latin-13', function() { - it('should parse', function() { - var mo = fs.readFileSync(__dirname + '/fixtures/latin13.mo'); - var json = JSON.parse(fs.readFileSync(__dirname + '/fixtures/latin13-mo.json', 'utf-8')); - var parsed = gettextParser.mo.parse(mo); - expect(parsed).to.deep.equal(json); - }); - }); -});
\ No newline at end of file diff --git a/node_modules/gettext-parser/test/po-compiler-test.js b/node_modules/gettext-parser/test/po-compiler-test.js deleted file mode 100644 index d93ae825a..000000000 --- a/node_modules/gettext-parser/test/po-compiler-test.js +++ /dev/null @@ -1,30 +0,0 @@ -'use strict'; - -var chai = require('chai'); -var gettextParser = require('..'); -var fs = require('fs'); - -var expect = chai.expect; -chai.config.includeStack = true; - -describe('PO Compiler', function() { - - describe('UTF-8', function() { - it('should compile', function() { - var json = JSON.parse(fs.readFileSync(__dirname + '/fixtures/utf8-po.json', 'utf-8')); - var po = fs.readFileSync(__dirname + '/fixtures/utf8.po'); - - var compiled = gettextParser.po.compile(json); - expect(compiled).to.deep.equal(po); - }); - }); - - describe('Latin-13', function() { - it('should compile', function() { - var json = JSON.parse(fs.readFileSync(__dirname + '/fixtures/latin13-po.json', 'utf-8')); - var po = fs.readFileSync(__dirname + '/fixtures/latin13.po'); - var compiled = gettextParser.po.compile(json); - expect(compiled).to.deep.equal(po); - }); - }); -});
\ No newline at end of file diff --git a/node_modules/gettext-parser/test/po-parser-test.js b/node_modules/gettext-parser/test/po-parser-test.js deleted file mode 100644 index 8e908fec9..000000000 --- a/node_modules/gettext-parser/test/po-parser-test.js +++ /dev/null @@ -1,61 +0,0 @@ -'use strict'; - -var chai = require('chai'); -var gettextParser = require('..'); -var fs = require('fs'); - -var expect = chai.expect; -chai.config.includeStack = true; - -describe('PO Parser', function() { - - describe('UTF-8', function() { - it('should parse', function() { - var po = fs.readFileSync(__dirname + '/fixtures/utf8.po'); - var json = JSON.parse(fs.readFileSync(__dirname + '/fixtures/utf8-po.json', 'utf-8')); - var parsed = gettextParser.po.parse(po); - expect(parsed).to.deep.equal(json); - }); - }); - - describe('UTF-8 as a string', function() { - it('should parse', function() { - var po = fs.readFileSync(__dirname + '/fixtures/utf8.po', 'utf-8'); - var json = JSON.parse(fs.readFileSync(__dirname + '/fixtures/utf8-po.json', 'utf-8')); - var parsed = gettextParser.po.parse(po); - expect(parsed).to.deep.equal(json); - }); - }); - - describe('Stream input', function() { - it('should parse', function(done) { - var po = fs.createReadStream(__dirname + '/fixtures/utf8.po', { - highWaterMark: 1 // ensure that any utf-8 sequences will be broken when streaming - }); - var json = JSON.parse(fs.readFileSync(__dirname + '/fixtures/utf8-po.json', 'utf-8')); - - var parsed; - var stream = po.pipe(gettextParser.po.createParseStream({ - initialTreshold: 800 // home many bytes to cache for parsing the header - })); - stream.on('data', function(data) { - parsed = data; - }); - stream.on('end', function() { - expect(parsed).to.deep.equal(json); - done(); - }); - - }); - }); - - describe('Latin-13', function() { - it('should parse', function() { - var po = fs.readFileSync(__dirname + '/fixtures/latin13.po'); - var json = JSON.parse(fs.readFileSync(__dirname + '/fixtures/latin13-po.json', 'utf-8')); - var parsed = gettextParser.po.parse(po); - expect(parsed).to.deep.equal(json); - }); - }); - -});
\ No newline at end of file |