Move Zotero.getString() test to Zotero.Intl tests
This commit is contained in:
parent
143fdd5f2b
commit
8e6896c27d
2 changed files with 16 additions and 17 deletions
16
test/tests/zoteroIntlTest.js
Normal file
16
test/tests/zoteroIntlTest.js
Normal file
|
@ -0,0 +1,16 @@
|
|||
"use strict";
|
||||
|
||||
describe("Zotero.Intl", function() {
|
||||
describe("#getString()", function () {
|
||||
it("should return the right plural form", function* () {
|
||||
if (Zotero.locale != 'en-US') {
|
||||
this.skip();
|
||||
}
|
||||
var str1 = Zotero.getString('fileInterface.itemsWereImported')
|
||||
.split(/;/)[1]
|
||||
.replace('%1$S', 2);
|
||||
var str2 = Zotero.getString('fileInterface.itemsWereImported', 2, 2);
|
||||
assert.equal(str1, str2);
|
||||
});
|
||||
});
|
||||
});
|
|
@ -1,23 +1,6 @@
|
|||
"use strict";
|
||||
|
||||
describe("Zotero", function() {
|
||||
describe("#getString()", function () {
|
||||
it("should return the right plural form", function* () {
|
||||
if (Zotero.locale != 'en-US') {
|
||||
this.skip();
|
||||
}
|
||||
Components.utils.import("resource://gre/modules/PluralForm.jsm");
|
||||
var str1 = Zotero.getString('fileInterface.itemsWereImported')
|
||||
.split(/;/)[1]
|
||||
.replace('%1$S', 2);
|
||||
var str2 = Zotero.getString('fileInterface.itemsWereImported', 2, 2);
|
||||
Zotero.debug(str1);
|
||||
Zotero.debug(str2);
|
||||
assert.equal(str1, str2);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
describe("#localeCompare", function () {
|
||||
it("shouldn't ignore whitespace", function () {
|
||||
assert.equal(Zotero.localeCompare("Chang", "Chan H"), 1);
|
||||
|
|
Loading…
Add table
Reference in a new issue