Index: test/filterStorage_readwrite.js |
=================================================================== |
--- a/test/filterStorage_readwrite.js |
+++ b/test/filterStorage_readwrite.js |
@@ -131,81 +131,16 @@ exports.testReadAndSaveToFile = function |
testReadWrite(test, false); |
}; |
exports.testReadAndSaveToFileWithExternalSubscription = function(test) |
{ |
testReadWrite(test, true); |
}; |
-exports.testLegacyGroups = {}; |
- |
-for (let url of ["~wl~", "~fl~", "~eh~"]) |
-{ |
- exports.testLegacyGroups["read empty " + url] = function(test) |
- { |
- IO._setFileContents(FilterStorage.sourceFile, [ |
- "[Subscription]", "url=" + url |
- ]); |
- |
- FilterStorage.loadFromDisk().then(() => |
- { |
- test.equal(FilterStorage.subscriptions.length, 0, "Number of filter subscriptions"); |
- }).catch(unexpectedError.bind(test)).then(() => test.done()); |
- }; |
- |
- exports.testLegacyGroups["read non-empty " + url] = function(test) |
- { |
- IO._setFileContents(FilterStorage.sourceFile, [ |
- "[Subscription]", "url=" + url, |
- "[Subscription filters]", "foo" |
- ]); |
- |
- FilterStorage.loadFromDisk().then(() => |
- { |
- test.equal(FilterStorage.subscriptions.length, 1, "Number of filter subscriptions"); |
- if (FilterStorage.subscriptions.length == 1) |
- { |
- let subscription = FilterStorage.subscriptions[0]; |
- test.equal(subscription.url, url, "Subscription ID"); |
- test.equal(subscription.title, null, "Subscription title"); |
- test.deepEqual(subscription.defaults, null, "Default types"); |
- test.equal(subscription.filters.length, 1, "Number of subscription filters"); |
- if (subscription.filters.length == 1) |
- test.equal(subscription.filters[0].text, "foo", "First filter"); |
- } |
- }).catch(unexpectedError.bind(test)).then(() => test.done()); |
- }; |
-} |
- |
-exports.testReadLegacyFilters = function(test) |
-{ |
- IO._setFileContents(FilterStorage.sourceFile, [ |
- "[Subscription]", "url=~user~1234", "title=Foo", |
- "[Subscription filters]", |
- "[User patterns]", "foo", "\\[bar]", "foo#bar" |
- ]); |
- |
- FilterStorage.loadFromDisk().then(() => |
- { |
- test.equal(FilterStorage.subscriptions.length, 1, "Number of filter subscriptions"); |
- if (FilterStorage.subscriptions.length == 1) |
- { |
- let subscription = FilterStorage.subscriptions[0]; |
- test.equal(subscription.filters.length, 3, "Number of subscription filters"); |
- if (subscription.filters.length == 3) |
- { |
- test.equal(subscription.filters[0].text, "foo", "First filter"); |
- test.equal(subscription.filters[1].text, "[bar]", "Second filter"); |
- test.equal(subscription.filters[2].text, "foo#bar", "Third filter"); |
- } |
- } |
- }).catch(unexpectedError.bind(test)).then(() => test.done()); |
-}; |
- |
exports.testImportExport = function(test) |
{ |
testData.then(lines => |
{ |
if (lines.length && lines[lines.length - 1] == "") |
lines.pop(); |
let importer = FilterStorage.importData(); |