diff options
author | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2020-02-17 22:39:25 -0500 |
---|---|---|
committer | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2020-02-17 22:39:25 -0500 |
commit | f2f4081d4572c48ebbe6685b8f89889823da0a69 (patch) | |
tree | 96897dac732978adcbcb67cbd59129a6db482cf1 /test | |
parent | dce5f7e1e532240a2ce3ab8cb8a2ee846572c0b9 (diff) |
Use ? instead of %s
Diffstat (limited to 'test')
-rw-r--r-- | test/dictionary-validate.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/test/dictionary-validate.js b/test/dictionary-validate.js index ccbd4ae4..25a5de88 100644 --- a/test/dictionary-validate.js +++ b/test/dictionary-validate.js @@ -16,7 +16,7 @@ function readSchema(relativeFileName) { async function validateDictionaryBanks(zip, fileNameFormat, schema) { let index = 1; while (true) { - const fileName = fileNameFormat.replace(/%s/, index); + const fileName = fileNameFormat.replace(/\?/, index); const file = zip.files[fileName]; if (!file) { break; } @@ -39,11 +39,11 @@ async function validateDictionary(archive, schemas) { JsonSchema.validate(index, schemas.index); - await validateDictionaryBanks(archive, 'term_bank_%s.json', version === 1 ? schemas.termBankV1 : schemas.termBankV3); - await validateDictionaryBanks(archive, 'term_meta_bank_%s.json', schemas.termMetaBankV3); - await validateDictionaryBanks(archive, 'kanji_bank_%s.json', version === 1 ? schemas.kanjiBankV1 : schemas.kanjiBankV3); - await validateDictionaryBanks(archive, 'kanji_meta_bank_%s.json', schemas.kanjiMetaBankV3); - await validateDictionaryBanks(archive, 'tag_bank_%s.json', schemas.tagBankV3); + await validateDictionaryBanks(archive, 'term_bank_?.json', version === 1 ? schemas.termBankV1 : schemas.termBankV3); + await validateDictionaryBanks(archive, 'term_meta_bank_?.json', schemas.termMetaBankV3); + await validateDictionaryBanks(archive, 'kanji_bank_?.json', version === 1 ? schemas.kanjiBankV1 : schemas.kanjiBankV3); + await validateDictionaryBanks(archive, 'kanji_meta_bank_?.json', schemas.kanjiMetaBankV3); + await validateDictionaryBanks(archive, 'tag_bank_?.json', schemas.tagBankV3); } function getSchemas() { |