Skip to content

Commit

Permalink
Print stdout result in submit.
Browse files Browse the repository at this point in the history
refs #110

Signed-off-by: Eric Wang <skygragon@gmail.com>
  • Loading branch information
skygragon committed Jul 3, 2018
1 parent c7e81c1 commit 318983c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/commands/submit.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ cmd.handler = function(argv) {
printResult(result, 'testcase');
printResult(result, 'answer');
printResult(result, 'expected_answer');
printResult(result, 'stdout');
}

// update this problem status in local cache
Expand Down
1 change: 1 addition & 0 deletions lib/plugins/leetcode.js
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,7 @@ function formatResult(result) {
if (result.judge_type === 'large') {
x.answer = result.code_output;
x.expected_answer = result.expected_output;
x.stdout = result.std_output;
} else {
x.stdout = util.inspect((result.code_output || []).join('\n'));
}
Expand Down

0 comments on commit 318983c

Please sign in to comment.