Skip to content
This repository was archived by the owner on Jun 7, 2023. It is now read-only.

Commit 7d99809

Browse files
committed
Fix - correctly test expected result with spaces
1 parent 9dc73a2 commit 7d99809

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

runestone/activecode/js/activecode.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2515,7 +2515,11 @@ SQLActiveCode.prototype.autograde = function(result_table) {
25152515
return s.indexOf('assert') > -1
25162516
})
25172517
for (let test of tests) {
2518-
[assert, loc, oper, expected] = test.split(/\s+/);
2518+
let wlist = test.split(/\s+/);
2519+
wlist.shift();
2520+
loc = wlist.shift()
2521+
oper = wlist.shift();
2522+
expected = wlist.join(' ');
25192523
[row,col] = loc.split(',');
25202524
result += this.testOneAssert(row, col, oper, expected, result_table);
25212525
result += "\n"

0 commit comments

Comments
 (0)