mol_plot_all 1.2.549 → 1.2.551
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/node.js +1 -1
- package/node.js.map +1 -1
- package/node.mjs +1 -1
- package/node.mjs.map +1 -1
- package/node.test.js +10 -4
- package/node.test.js.map +1 -1
- package/package.json +1 -1
package/node.test.js
CHANGED
|
@@ -1732,7 +1732,7 @@ var $;
|
|
|
1732
1732
|
let line_end = str.indexOf('\n', pos);
|
|
1733
1733
|
if (line_end === -1)
|
|
1734
1734
|
line_end = str.length;
|
|
1735
|
-
const sp = span.span(row, error_start - line_start, pos - error_start
|
|
1735
|
+
const sp = span.span(row, error_start - line_start + 1, pos - error_start);
|
|
1736
1736
|
this.$mol_fail(new this.$mol_error_syntax(`Wrong nodes separator`, str.substring(line_start, line_end), sp));
|
|
1737
1737
|
}
|
|
1738
1738
|
var type_start = pos;
|
|
@@ -8455,11 +8455,17 @@ var $;
|
|
|
8455
8455
|
$.$mol_tree2_from_string(tree, 'test');
|
|
8456
8456
|
}, 'Too few tabs\ntest#3:1/4\n!!!!\n\t\t\t\tbar');
|
|
8457
8457
|
},
|
|
8458
|
-
'Wrong nodes separator'($) {
|
|
8458
|
+
'Wrong nodes separator at start'($) {
|
|
8459
|
+
const tree = `foo\n \tbar\n`;
|
|
8460
|
+
$mol_assert_fail(() => {
|
|
8461
|
+
$.$mol_tree2_from_string(tree, 'test');
|
|
8462
|
+
}, 'Wrong nodes separator\ntest#2:1/2\n!!\n \tbar');
|
|
8463
|
+
},
|
|
8464
|
+
'Wrong nodes separator in the middle'($) {
|
|
8459
8465
|
const tree = `foo bar\n`;
|
|
8460
8466
|
$mol_assert_fail(() => {
|
|
8461
8467
|
$.$mol_tree2_from_string(tree, 'test');
|
|
8462
|
-
}, 'Wrong nodes separator\ntest#1:
|
|
8468
|
+
}, 'Wrong nodes separator\ntest#1:5/1\n !\nfoo bar');
|
|
8463
8469
|
},
|
|
8464
8470
|
'Unexpected EOF, LF required'($) {
|
|
8465
8471
|
const tree = ` foo`;
|
|
@@ -8478,7 +8484,7 @@ var $;
|
|
|
8478
8484
|
});
|
|
8479
8485
|
const res = $$.$mol_tree2_from_string(tree, 'test');
|
|
8480
8486
|
$mol_assert_like(errors, [
|
|
8481
|
-
'Wrong nodes separator\ntest#1:
|
|
8487
|
+
'Wrong nodes separator\ntest#1:5/1\n !\nfoo bar',
|
|
8482
8488
|
'Unexpected EOF, LF required\ntest#1:9/1\n !\nfoo bar',
|
|
8483
8489
|
]);
|
|
8484
8490
|
$mol_assert_equal(res.toString(), 'foo bar\n');
|