summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dev/dictionary-validate.js28
1 files changed, 17 insertions, 11 deletions
diff --git a/dev/dictionary-validate.js b/dev/dictionary-validate.js
index 83889fc8..a21fa5cb 100644
--- a/dev/dictionary-validate.js
+++ b/dev/dictionary-validate.js
@@ -84,16 +84,7 @@ function getSchemas() {
}
-async function main() {
- const dictionaryFileNames = process.argv.slice(2);
- if (dictionaryFileNames.length === 0) {
- console.log([
- 'Usage:',
- ' node dictionary-validate <dictionary-file-names>...'
- ].join('\n'));
- return;
- }
-
+async function testDictionaryFiles(dictionaryFileNames) {
const schemas = getSchemas();
for (const dictionaryFileName of dictionaryFileNames) {
@@ -114,10 +105,25 @@ async function main() {
}
+async function main() {
+ const dictionaryFileNames = process.argv.slice(2);
+ if (dictionaryFileNames.length === 0) {
+ console.log([
+ 'Usage:',
+ ' node dictionary-validate <dictionary-file-names>...'
+ ].join('\n'));
+ return;
+ }
+
+ await testDictionaryFiles(dictionaryFileNames);
+}
+
+
if (require.main === module) { main(); }
module.exports = {
getSchemas,
- validateDictionary
+ validateDictionary,
+ testDictionaryFiles
};