diff --git a/src/Extensions/JavaScript/Source/Main.ts b/src/Extensions/JavaScript/Source/Main.ts index cd565135..84510ac9 100644 --- a/src/Extensions/JavaScript/Source/Main.ts +++ b/src/Extensions/JavaScript/Source/Main.ts @@ -44,7 +44,7 @@ const server = net.createServer((client) => { const keys = extractKeysFromFile(f, callExpressionIdentifiers); files[f] = keys; } - write(rpc.id, JSON.stringify(files)); + write(rpc.id, JSON.stringify(files, null, 4)); break; } }); diff --git a/src/TestFramework/ProjectTestRunner.cpp b/src/TestFramework/ProjectTestRunner.cpp index ef753c9d..32f5a959 100644 --- a/src/TestFramework/ProjectTestRunner.cpp +++ b/src/TestFramework/ProjectTestRunner.cpp @@ -17,14 +17,14 @@ void addProjectTests() { for (auto const &p : paths) { auto command = read_file(p + "/Command.cmd"); - string current_dir = replace_string(p, "/Cases/", "/Current/"); + string current_dir = replace_string(p, "/Cases/", "/Currents/"); recursively_create_dir(current_dir); command = string(PROJECT_DIR) + "/bin/l10ns --rootDir " + current_dir + " " + command; string result = execute_command(command); write_file(current_dir + "/Output.txt", result); string test_name = p.substr(p.find_last_of("/") + 1); test(test_name, [result, p](Test* t) { - string reference_file = replace_string(p, "/Cases/", "/Reference/"); + string reference_file = replace_string(p, "/Cases/", "/References/"); string reference = read_file(reference_file + "/Output.txt"); if (result != reference) { throw runtime_error("Assertion Error!"); diff --git a/src/Tests/Current/Projects/Commands_DefaultHelp/Output.txt b/src/Tests/Currents/Projects/Commands_DefaultHelp/Output.txt similarity index 100% rename from src/Tests/Current/Projects/Commands_DefaultHelp/Output.txt rename to src/Tests/Currents/Projects/Commands_DefaultHelp/Output.txt diff --git a/src/Tests/Current/Projects/Commands_SeveralCommandsError/Output.txt b/src/Tests/Currents/Projects/Commands_SeveralCommandsError/Output.txt similarity index 100% rename from src/Tests/Current/Projects/Commands_SeveralCommandsError/Output.txt rename to src/Tests/Currents/Projects/Commands_SeveralCommandsError/Output.txt diff --git a/src/Tests/Reference/Projects/Commands_UnknownCommandFlagsMultipleError/Output.txt b/src/Tests/Currents/Projects/Commands_UnknownCommandFlagsMultipleError/Output.txt similarity index 100% rename from src/Tests/Reference/Projects/Commands_UnknownCommandFlagsMultipleError/Output.txt rename to src/Tests/Currents/Projects/Commands_UnknownCommandFlagsMultipleError/Output.txt diff --git a/src/Tests/Reference/Projects/Commands_UnknownCommandFlagsSingleError/Output.txt b/src/Tests/Currents/Projects/Commands_UnknownCommandFlagsSingleError/Output.txt similarity index 100% rename from src/Tests/Reference/Projects/Commands_UnknownCommandFlagsSingleError/Output.txt rename to src/Tests/Currents/Projects/Commands_UnknownCommandFlagsSingleError/Output.txt diff --git a/src/Tests/Reference/Projects/Commands_UnknownCommandsMultipleError/Output.txt b/src/Tests/Currents/Projects/Commands_UnknownCommandsMultipleError/Output.txt similarity index 100% rename from src/Tests/Reference/Projects/Commands_UnknownCommandsMultipleError/Output.txt rename to src/Tests/Currents/Projects/Commands_UnknownCommandsMultipleError/Output.txt diff --git a/src/Tests/Reference/Projects/Commands_UnknownCommandsSingleError/Output.txt b/src/Tests/Currents/Projects/Commands_UnknownCommandsSingleError/Output.txt similarity index 100% rename from src/Tests/Reference/Projects/Commands_UnknownCommandsSingleError/Output.txt rename to src/Tests/Currents/Projects/Commands_UnknownCommandsSingleError/Output.txt diff --git a/src/Tests/Reference/Projects/Commands_DefaultHelp/Output.txt b/src/Tests/References/Projects/Commands_DefaultHelp/Output.txt similarity index 100% rename from src/Tests/Reference/Projects/Commands_DefaultHelp/Output.txt rename to src/Tests/References/Projects/Commands_DefaultHelp/Output.txt diff --git a/src/Tests/Reference/Projects/Commands_SeveralCommandsError/Output.txt b/src/Tests/References/Projects/Commands_SeveralCommandsError/Output.txt similarity index 100% rename from src/Tests/Reference/Projects/Commands_SeveralCommandsError/Output.txt rename to src/Tests/References/Projects/Commands_SeveralCommandsError/Output.txt diff --git a/src/Tests/References/Projects/Commands_UnknownCommandFlagsMultipleError/Output.txt b/src/Tests/References/Projects/Commands_UnknownCommandFlagsMultipleError/Output.txt new file mode 100644 index 00000000..01475066 --- /dev/null +++ b/src/Tests/References/Projects/Commands_UnknownCommandFlagsMultipleError/Output.txt @@ -0,0 +1,3 @@ +Unknown command flag '--unknown1'. +Unknown command flag '--unknown2'. +You are not inside a L10ns project. diff --git a/src/Tests/References/Projects/Commands_UnknownCommandFlagsSingleError/Output.txt b/src/Tests/References/Projects/Commands_UnknownCommandFlagsSingleError/Output.txt new file mode 100644 index 00000000..c442d889 --- /dev/null +++ b/src/Tests/References/Projects/Commands_UnknownCommandFlagsSingleError/Output.txt @@ -0,0 +1,2 @@ +Unknown command flag '--unknown'. +You are not inside a L10ns project. diff --git a/src/Tests/References/Projects/Commands_UnknownCommandsMultipleError/Output.txt b/src/Tests/References/Projects/Commands_UnknownCommandsMultipleError/Output.txt new file mode 100644 index 00000000..d0e6bcd5 --- /dev/null +++ b/src/Tests/References/Projects/Commands_UnknownCommandsMultipleError/Output.txt @@ -0,0 +1,3 @@ +Unknown command 'unknown1'. +Unknown command 'unknown2'. +You are not inside a L10ns project. diff --git a/src/Tests/References/Projects/Commands_UnknownCommandsSingleError/Output.txt b/src/Tests/References/Projects/Commands_UnknownCommandsSingleError/Output.txt new file mode 100644 index 00000000..f1ac5f98 --- /dev/null +++ b/src/Tests/References/Projects/Commands_UnknownCommandsSingleError/Output.txt @@ -0,0 +1,2 @@ +Unknown command 'unknown'. +You are not inside a L10ns project.