8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b5bb610 commit f9e347cCopy full SHA for f9e347c
lib/commands/test.js
@@ -51,15 +51,17 @@ cmd.handler = function(argv) {
51
testcase = h.readStdin();
52
}
53
54
- if (!testcase || testcase === '')
55
- return console.log('ERROR: missing testcase?');
56
-
57
var keyword = h.getFilename(argv.filename);
58
core.getProblem(keyword, function(e, problem) {
59
if (e) return console.log('ERROR:', e);
60
+ if (testcase !== undefined)
+ problem.testcase = testcase.replace(/\\n/g, '\n');
+
61
+ if (!problem.testcase)
62
+ return console.log('ERROR: missing testcase?');
63
64
problem.file = argv.filename;
- problem.testcase = testcase.replace(/\\n/g, '\n');
65
66
console.log('\nInput data:');
67
console.log(problem.testcase);
0 commit comments