mirror of
https://github.com/koreader/koreader.git
synced 2025-12-13 20:36:53 +01:00
tests: fix listing tests with busted --list
This commit is contained in:
committed by
Frans de Jonge
parent
fdd645af73
commit
f661726fef
@@ -214,7 +214,9 @@ describe("GetText module", function()
|
||||
end)
|
||||
|
||||
describe("language with standard plurals", function()
|
||||
GetText.changeLang("nl_NL")
|
||||
setup(function()
|
||||
GetText.changeLang("nl_NL")
|
||||
end)
|
||||
it("gettext should ignore fuzzy strings", function()
|
||||
assert.is_equal("Fuzzy", GetText("Fuzzy"))
|
||||
end)
|
||||
@@ -239,7 +241,9 @@ describe("GetText module", function()
|
||||
end)
|
||||
|
||||
describe("language with simple plurals n > 2", function()
|
||||
GetText.changeLang("simple")
|
||||
setup(function()
|
||||
GetText.changeLang("simple")
|
||||
end)
|
||||
it("gettext should ignore fuzzy strings", function()
|
||||
assert.is_equal("Fuzzy", GetText("Fuzzy"))
|
||||
end)
|
||||
@@ -266,7 +270,9 @@ describe("GetText module", function()
|
||||
end)
|
||||
|
||||
describe("language with no plurals", function()
|
||||
GetText.changeLang("none")
|
||||
setup(function()
|
||||
GetText.changeLang("none")
|
||||
end)
|
||||
it("gettext should ignore fuzzy strings", function()
|
||||
assert.is_equal("Fuzzy", GetText("Fuzzy"))
|
||||
end)
|
||||
@@ -293,7 +299,9 @@ describe("GetText module", function()
|
||||
end)
|
||||
|
||||
describe("language with complex plurals (Arabic)", function()
|
||||
GetText.changeLang("ar")
|
||||
setup(function()
|
||||
GetText.changeLang("ar")
|
||||
end)
|
||||
it("gettext should ignore fuzzy strings", function()
|
||||
assert.is_equal("Fuzzy", GetText("Fuzzy"))
|
||||
end)
|
||||
@@ -322,7 +330,9 @@ describe("GetText module", function()
|
||||
end)
|
||||
|
||||
describe("language with complex plurals (Russian)", function()
|
||||
GetText.changeLang("ru")
|
||||
setup(function()
|
||||
GetText.changeLang("ru")
|
||||
end)
|
||||
it("gettext should ignore fuzzy strings", function()
|
||||
assert.is_equal("Fuzzy", GetText("Fuzzy"))
|
||||
end)
|
||||
@@ -351,7 +361,9 @@ describe("GetText module", function()
|
||||
-- This one's mainly to test fallback stuff. Russian/Polish are hard
|
||||
-- to follow, so there we focus on algorithm correctness.
|
||||
describe("language with many plurals", function()
|
||||
GetText.changeLang("many")
|
||||
setup(function()
|
||||
GetText.changeLang("many")
|
||||
end)
|
||||
it("gettext should ignore fuzzy strings", function()
|
||||
assert.is_equal("Fuzzy", GetText("Fuzzy"))
|
||||
end)
|
||||
|
||||
@@ -68,7 +68,10 @@ describe("luadata module", function()
|
||||
end)
|
||||
|
||||
describe("table wrapper", function()
|
||||
Settings:delSetting("key")
|
||||
|
||||
setup(function()
|
||||
Settings:delSetting("key")
|
||||
end)
|
||||
|
||||
it("should add item to table", function()
|
||||
Settings:addTableItem("key", 1)
|
||||
@@ -89,8 +92,11 @@ describe("luadata module", function()
|
||||
end)
|
||||
|
||||
describe("backup data file", function()
|
||||
local file = "dummy-test-file"
|
||||
local d = Settings:open(file)
|
||||
local file, d
|
||||
setup(function()
|
||||
file = "dummy-test-file"
|
||||
d = Settings:open(file)
|
||||
end)
|
||||
it("should generate data file", function()
|
||||
d:saveSetting("a", "a")
|
||||
assert.Equals("file", lfs.attributes(d.file, "mode"))
|
||||
|
||||
@@ -67,7 +67,9 @@ describe("luasettings module", function()
|
||||
end)
|
||||
|
||||
describe("table wrapper", function()
|
||||
Settings:delSetting("key")
|
||||
setup(function()
|
||||
Settings:delSetting("key")
|
||||
end)
|
||||
|
||||
it("should add item to table", function()
|
||||
Settings:addTableItem("key", 1)
|
||||
|
||||
Reference in New Issue
Block a user