diff --git a/.gitignore b/.gitignore index 869df07..2d86629 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /target -Cargo.lock \ No newline at end of file +Cargo.lock +*.pending-snap diff --git a/src/.write.rs.pending-snap b/src/.write.rs.pending-snap deleted file mode 100644 index 66cf58c..0000000 --- a/src/.write.rs.pending-snap +++ /dev/null @@ -1,252 +0,0 @@ -{"run_id":"1730154368-841895824","line":1139,"new":{"module_name":"ariadne__write__tests","snapshot_name":"empty_input","metadata":{"source":"src/write.rs","assertion_line":1139,"expression":"msg"},"snapshot":"Error: unexpected end of file\n ,-[:1:1]\n |\n 1 | \n | | \n | `- No more fruit!\n---'\n"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error: unexpected end of file\n ,-[:1:1]\n |\n 1 |\n | |\n | `- No more fruit!\n---'"}} -{"run_id":"1730154368-841895824","line":1072,"new":{"module_name":"ariadne__write__tests","snapshot_name":"byte_column","metadata":{"source":"src/write.rs","assertion_line":1072,"expression":"msg"},"snapshot":"Error: can't compare äpplës with örängës\n ,-[:1:10]\n |\n 1 | äpplë == örängë;\n | ^^|^^ ^^^|^^ \n | `-------------- This is an äpplë\n | | \n | `---- This is an örängë\n---'\n"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error: can't compare äpplës with örängës\n ,-[:1:10]\n |\n 1 | äpplë == örängë;\n | ^^|^^ ^^^|^^\n | `-------------- This is an äpplë\n | |\n | `---- This is an örängë\n---'"}} -{"run_id":"1730154368-841895824","line":1185,"new":{"module_name":"ariadne__write__tests","snapshot_name":"empty_input_note","metadata":{"source":"src/write.rs","assertion_line":1185,"expression":"msg"},"snapshot":"Error: unexpected end of file\n ,-[:1:1]\n |\n 1 | \n | | \n | `- No more fruit!\n | \n | Note: eat your greens!\n---'\n"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error: unexpected end of file\n ,-[:1:1]\n |\n 1 |\n | |\n | `- No more fruit!\n |\n | Note: eat your greens!\n---'"}} -{"run_id":"1730154368-841895824","line":1161,"new":{"module_name":"ariadne__write__tests","snapshot_name":"empty_input_help","metadata":{"source":"src/write.rs","assertion_line":1161,"expression":"msg"},"snapshot":"Error: unexpected end of file\n ,-[:1:1]\n |\n 1 | \n | | \n | `- No more fruit!\n | \n | Help: have you tried going to the farmer's market?\n---'\n"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error: unexpected end of file\n ,-[:1:1]\n |\n 1 |\n | |\n | `- No more fruit!\n |\n | Help: have you tried going to the farmer's market?\n---'"}} -{"run_id":"1730154368-841895824","line":1048,"new":{"module_name":"ariadne__write__tests","snapshot_name":"byte_label","metadata":{"source":"src/write.rs","assertion_line":1048,"expression":"msg"},"snapshot":"Error: can't compare äpplës with örängës\n ,-[:1:1]\n |\n 1 | äpplë == örängë;\n | ^^|^^ ^^^|^^ \n | `-------------- This is an äpplë\n | | \n | `---- This is an örängë\n---'\n"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error: can't compare äpplës with örängës\n ,-[:1:1]\n |\n 1 | äpplë == örängë;\n | ^^|^^ ^^^|^^\n | `-------------- This is an äpplë\n | |\n | `---- This is an örängë\n---'"}} -{"run_id":"1730154368-841895824","line":1332,"new":{"module_name":"ariadne__write__tests","snapshot_name":"note","metadata":{"source":"src/write.rs","assertion_line":1332,"expression":"msg"},"snapshot":"Error: can't compare apples with oranges\n ,-[:1:1]\n |\n 1 | apple == orange;\n | ^^|^^ ^^^|^^ \n | `-------------- This is an apple\n | | \n | `---- This is an orange\n | \n | Note: stop trying ... this is a fruitless endeavor\n---'\n"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error: can't compare apples with oranges\n ,-[:1:1]\n |\n 1 | apple == orange;\n | ^^|^^ ^^^|^^\n | `-------------- This is an apple\n | |\n | `---- This is an orange\n |\n | Note: stop trying ... this is a fruitless endeavor\n---'"}} -{"run_id":"1730154368-841895824","line":1250,"new":{"module_name":"ariadne__write__tests","snapshot_name":"multiline_label","metadata":{"source":"src/write.rs","assertion_line":1250,"expression":"msg"},"snapshot":"Error: \n ,-[:1:1]\n |\n 1 | ,-> apple\n : : \n 3 | |-> orange\n | | \n | `----------- illegal comparison\n---'\n"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error:\n ,-[:1:1]\n |\n 1 | ,-> apple\n : :\n 3 | |-> orange\n | |\n | `----------- illegal comparison\n---'"}} -{"run_id":"1730154368-841895824","line":1385,"new":{"module_name":"ariadne__write__tests","snapshot_name":"help_and_note","metadata":{"source":"src/write.rs","assertion_line":1385,"expression":"msg"},"snapshot":"Error: can't compare apples with oranges\n ,-[:1:1]\n |\n 1 | apple == orange;\n | ^^|^^ ^^^|^^ \n | `-------------- This is an apple\n | | \n | `---- This is an orange\n | \n | Help: have you tried peeling the orange?\n | \n | Note: stop trying ... this is a fruitless endeavor\n---'\n"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error: can't compare apples with oranges\n ,-[:1:1]\n |\n 1 | apple == orange;\n | ^^|^^ ^^^|^^\n | `-------------- This is an apple\n | |\n | `---- This is an orange\n |\n | Help: have you tried peeling the orange?\n |\n | Note: stop trying ... this is a fruitless endeavor\n---'"}} -{"run_id":"1730154368-841895824","line":1358,"new":{"module_name":"ariadne__write__tests","snapshot_name":"help","metadata":{"source":"src/write.rs","assertion_line":1358,"expression":"msg"},"snapshot":"Error: can't compare apples with oranges\n ,-[:1:1]\n |\n 1 | apple == orange;\n | ^^|^^ ^^^|^^ \n | `-------------- This is an apple\n | | \n | `---- This is an orange\n | \n | Help: have you tried peeling the orange?\n---'\n"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error: can't compare apples with oranges\n ,-[:1:1]\n |\n 1 | apple == orange;\n | ^^|^^ ^^^|^^\n | `-------------- This is an apple\n | |\n | `---- This is an orange\n |\n | Help: have you tried peeling the orange?\n---'"}} -{"run_id":"1730154368-841895824","line":1462,"new":{"module_name":"ariadne__write__tests","snapshot_name":"multi_notes_multi_lines","metadata":{"source":"src/write.rs","assertion_line":1462,"expression":"msg"},"snapshot":"Error: can't compare apples with oranges\n ,-[:1:1]\n |\n 1 | apple == orange;\n | ^^^^^^^|^^^^^^^ \n | `--------- This is a strange comparison\n | \n | Note 1: No need to try, they can't be compared.\n | \n | Note 2: Yeah, really, please stop.\n | It has no resemblance.\n---'\n"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error: can't compare apples with oranges\n ,-[:1:1]\n |\n 1 | apple == orange;\n | ^^^^^^^|^^^^^^^\n | `--------- This is a strange comparison\n |\n | Note 1: No need to try, they can't be compared.\n |\n | Note 2: Yeah, really, please stop.\n | It has no resemblance.\n---'"}} -{"run_id":"1730154368-841895824","line":1118,"new":{"module_name":"ariadne__write__tests","snapshot_name":"label_of_width_zero_at_end_of_line","metadata":{"source":"src/write.rs","assertion_line":1118,"expression":"msg"},"snapshot":"Error: unexpected end of file\n ,-[:1:1]\n |\n 1 | apple ==\n | | \n | `- Unexpected end of file\n---'\n"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error: unexpected end of file\n ,-[:1:1]\n |\n 1 | apple ==\n | |\n | `- Unexpected end of file\n---'"}} -{"run_id":"1730154368-841895824","line":1210,"new":{"module_name":"ariadne__write__tests","snapshot_name":"empty_input_help_note","metadata":{"source":"src/write.rs","assertion_line":1210,"expression":"msg"},"snapshot":"Error: unexpected end of file\n ,-[:1:1]\n |\n 1 | \n | | \n | `- No more fruit!\n | \n | Help: have you tried going to the farmer's market?\n | \n | Note: eat your greens!\n---'\n"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error: unexpected end of file\n ,-[:1:1]\n |\n 1 |\n | |\n | `- No more fruit!\n |\n | Help: have you tried going to the farmer's market?\n |\n | Note: eat your greens!\n---'"}} -{"run_id":"1730154368-841895824","line":1436,"new":{"module_name":"ariadne__write__tests","snapshot_name":"multi_notes_single_lines","metadata":{"source":"src/write.rs","assertion_line":1436,"expression":"msg"},"snapshot":"Error: can't compare apples with oranges\n ,-[:1:1]\n |\n 1 | apple == orange;\n | ^^^^^^^|^^^^^^^ \n | `--------- This is a strange comparison\n | \n | Note 1: No need to try, they can't be compared.\n | \n | Note 2: Yeah, really, please stop.\n---'\n"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error: can't compare apples with oranges\n ,-[:1:1]\n |\n 1 | apple == orange;\n | ^^^^^^^|^^^^^^^\n | `--------- This is a strange comparison\n |\n | Note 1: No need to try, they can't be compared.\n |\n | Note 2: Yeah, really, please stop.\n---'"}} -{"run_id":"1730154368-841895824","line":964,"new":null,"old":null} -{"run_id":"1730154368-841895824","line":1097,"new":{"module_name":"ariadne__write__tests","snapshot_name":"label_at_end_of_long_line","metadata":{"source":"src/write.rs","assertion_line":1097,"expression":"msg"},"snapshot":"Error: can't compare apples with oranges\n ,-[:1:1]\n |\n 1 | apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == orange\n | ^^|^^ \n | `---- This is an orange\n---'\n"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error: can't compare apples with oranges\n ,-[:1:1]\n |\n 1 | apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == orange\n | ^^|^^\n | `---- This is an orange\n---'"}} -{"run_id":"1730154368-841895824","line":980,"new":null,"old":null} -{"run_id":"1730154368-841895824","line":1024,"new":{"module_name":"ariadne__write__tests","snapshot_name":"multi_byte_chars","metadata":{"source":"src/write.rs","assertion_line":1024,"expression":"msg"},"snapshot":"Error: can't compare äpplës with örängës\n ,-[:1:1]\n |\n 1 | äpplë == örängë;\n | ^^|^^ ^^^|^^ \n | `-------------- This is an äpplë\n | | \n | `---- This is an örängë\n---'\n"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error: can't compare äpplës with örängës\n ,-[:1:1]\n |\n 1 | äpplë == örängë;\n | ^^|^^ ^^^|^^\n | `-------------- This is an äpplë\n | |\n | `---- This is an örängë\n---'"}} -{"run_id":"1730154368-841895824","line":1300,"new":{"module_name":"ariadne__write__tests","snapshot_name":"multiple_labels_same_span","metadata":{"source":"src/write.rs","assertion_line":1300,"expression":"msg"},"snapshot":"Error: can't compare apples with oranges\n ,-[:1:1]\n |\n 1 | apple == orange;\n | ^^|^^ ^^^|^^ \n | `-------------- This is an apple\n | | | \n | `-------------- Have I mentioned that this is an apple?\n | | | \n | `-------------- No really, have I mentioned that?\n | | \n | `---- This is an orange\n | | \n | `---- Have I mentioned that this is an orange?\n | | \n | `---- No really, have I mentioned that?\n---'\n"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error: can't compare apples with oranges\n ,-[:1:1]\n |\n 1 | apple == orange;\n | ^^|^^ ^^^|^^\n | `-------------- This is an apple\n | | |\n | `-------------- Have I mentioned that this is an apple?\n | | |\n | `-------------- No really, have I mentioned that?\n | |\n | `---- This is an orange\n | |\n | `---- Have I mentioned that this is an orange?\n | |\n | `---- No really, have I mentioned that?\n---'"}} -{"run_id":"1730154368-841895824","line":1273,"new":{"module_name":"ariadne__write__tests","snapshot_name":"partially_overlapping_labels","metadata":{"source":"src/write.rs","assertion_line":1273,"expression":"msg"},"snapshot":"Error: \n ,-[:1:1]\n |\n 1 | https://example.com/\n | ^^|^^^^^^^|^^^^^^^^^ \n | `------------------- scheme\n | | \n | `----------- URL\n---'\n"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error:\n ,-[:1:1]\n |\n 1 | https://example.com/\n | ^^|^^^^^^^|^^^^^^^^^\n | `------------------- scheme\n | |\n | `----------- URL\n---'"}} -{"run_id":"1730154368-841895824","line":1412,"new":{"module_name":"ariadne__write__tests","snapshot_name":"single_note_single_line","metadata":{"source":"src/write.rs","assertion_line":1412,"expression":"msg"},"snapshot":"Error: can't compare apples with oranges\n ,-[:1:1]\n |\n 1 | apple == orange;\n | ^^^^^^^|^^^^^^^ \n | `--------- This is a strange comparison\n | \n | Note: No need to try, they can't be compared.\n---'\n"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error: can't compare apples with oranges\n ,-[:1:1]\n |\n 1 | apple == orange;\n | ^^^^^^^|^^^^^^^\n | `--------- This is a strange comparison\n |\n | Note: No need to try, they can't be compared.\n---'"}} -{"run_id":"1730154368-841895824","line":1000,"new":{"module_name":"ariadne__write__tests","snapshot_name":"two_labels_with_messages","metadata":{"source":"src/write.rs","assertion_line":1000,"expression":"msg"},"snapshot":"Error: can't compare apples with oranges\n ,-[:1:1]\n |\n 1 | apple == orange;\n | ^^|^^ ^^^|^^ \n | `-------------- This is an apple\n | | \n | `---- This is an orange\n---'\n"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error: can't compare apples with oranges\n ,-[:1:1]\n |\n 1 | apple == orange;\n | ^^|^^ ^^^|^^\n | `-------------- This is an apple\n | |\n | `---- This is an orange\n---'"}} -{"run_id":"1730154463-339062648","line":1139,"new":null,"old":null} -{"run_id":"1730154463-339062648","line":1072,"new":null,"old":null} -{"run_id":"1730154463-339062648","line":1048,"new":null,"old":null} -{"run_id":"1730154463-339062648","line":1210,"new":null,"old":null} -{"run_id":"1730154463-339062648","line":1185,"new":null,"old":null} -{"run_id":"1730154463-339062648","line":1161,"new":null,"old":null} -{"run_id":"1730154463-339062648","line":1358,"new":null,"old":null} -{"run_id":"1730154463-339062648","line":1385,"new":null,"old":null} -{"run_id":"1730154463-339062648","line":1436,"new":null,"old":null} -{"run_id":"1730154463-339062648","line":1118,"new":null,"old":null} -{"run_id":"1730154463-339062648","line":1024,"new":null,"old":null} -{"run_id":"1730154463-339062648","line":1332,"new":null,"old":null} -{"run_id":"1730154463-339062648","line":1462,"new":null,"old":null} -{"run_id":"1730154463-339062648","line":1097,"new":null,"old":null} -{"run_id":"1730154463-339062648","line":1300,"new":null,"old":null} -{"run_id":"1730154463-339062648","line":964,"new":null,"old":null} -{"run_id":"1730154463-339062648","line":1250,"new":null,"old":null} -{"run_id":"1730154463-339062648","line":1273,"new":null,"old":null} -{"run_id":"1730154463-339062648","line":1412,"new":null,"old":null} -{"run_id":"1730154463-339062648","line":980,"new":null,"old":null} -{"run_id":"1730154463-339062648","line":1000,"new":null,"old":null} -{"run_id":"1730154470-722757339","line":1139,"new":{"module_name":"ariadne__write__tests","snapshot_name":"empty_input","metadata":{"source":"src/write.rs","assertion_line":1139,"expression":"msg"},"snapshot":"Error: unexpected end of file\n ,-[:1:1]\n |\n 1 | \n | | \n | `- No more fruit!\n---'\n"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error: unexpected end of file\n ,-[:1:1]\n |\n 1 |\n | |\n | `- No more fruit!\n---'"}} -{"run_id":"1730154470-722757339","line":1118,"new":{"module_name":"ariadne__write__tests","snapshot_name":"label_of_width_zero_at_end_of_line","metadata":{"source":"src/write.rs","assertion_line":1118,"expression":"msg"},"snapshot":"Error: unexpected end of file\n ,-[:1:1]\n |\n 1 | apple ==\n | | \n | `- Unexpected end of file\n---'\n"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error: unexpected end of file\n ,-[:1:1]\n |\n 1 | apple ==\n | |\n | `- Unexpected end of file\n---'"}} -{"run_id":"1730154470-722757339","line":1185,"new":{"module_name":"ariadne__write__tests","snapshot_name":"empty_input_note","metadata":{"source":"src/write.rs","assertion_line":1185,"expression":"msg"},"snapshot":"Error: unexpected end of file\n ,-[:1:1]\n |\n 1 | \n | | \n | `- No more fruit!\n | \n | Note: eat your greens!\n---'\n"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error: unexpected end of file\n ,-[:1:1]\n |\n 1 |\n | |\n | `- No more fruit!\n |\n | Note: eat your greens!\n---'"}} -{"run_id":"1730154470-722757339","line":1048,"new":{"module_name":"ariadne__write__tests","snapshot_name":"byte_label","metadata":{"source":"src/write.rs","assertion_line":1048,"expression":"msg"},"snapshot":"Error: can't compare äpplës with örängës\n ,-[:1:1]\n |\n 1 | äpplë == örängë;\n | ^^|^^ ^^^|^^ \n | `-------------- This is an äpplë\n | | \n | `---- This is an örängë\n---'\n"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error: can't compare äpplës with örängës\n ,-[:1:1]\n |\n 1 | äpplë == örängë;\n | ^^|^^ ^^^|^^\n | `-------------- This is an äpplë\n | |\n | `---- This is an örängë\n---'"}} -{"run_id":"1730154470-722757339","line":1072,"new":{"module_name":"ariadne__write__tests","snapshot_name":"byte_column","metadata":{"source":"src/write.rs","assertion_line":1072,"expression":"msg"},"snapshot":"Error: can't compare äpplës with örängës\n ,-[:1:10]\n |\n 1 | äpplë == örängë;\n | ^^|^^ ^^^|^^ \n | `-------------- This is an äpplë\n | | \n | `---- This is an örängë\n---'\n"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error: can't compare äpplës with örängës\n ,-[:1:10]\n |\n 1 | äpplë == örängë;\n | ^^|^^ ^^^|^^\n | `-------------- This is an äpplë\n | |\n | `---- This is an örängë\n---'"}} -{"run_id":"1730154470-722757339","line":1024,"new":{"module_name":"ariadne__write__tests","snapshot_name":"multi_byte_chars","metadata":{"source":"src/write.rs","assertion_line":1024,"expression":"msg"},"snapshot":"Error: can't compare äpplës with örängës\n ,-[:1:1]\n |\n 1 | äpplë == örängë;\n | ^^|^^ ^^^|^^ \n | `-------------- This is an äpplë\n | | \n | `---- This is an örängë\n---'\n"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error: can't compare äpplës with örängës\n ,-[:1:1]\n |\n 1 | äpplë == örängë;\n | ^^|^^ ^^^|^^\n | `-------------- This is an äpplë\n | |\n | `---- This is an örängë\n---'"}} -{"run_id":"1730154470-722757339","line":1161,"new":{"module_name":"ariadne__write__tests","snapshot_name":"empty_input_help","metadata":{"source":"src/write.rs","assertion_line":1161,"expression":"msg"},"snapshot":"Error: unexpected end of file\n ,-[:1:1]\n |\n 1 | \n | | \n | `- No more fruit!\n | \n | Help: have you tried going to the farmer's market?\n---'\n"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error: unexpected end of file\n ,-[:1:1]\n |\n 1 |\n | |\n | `- No more fruit!\n |\n | Help: have you tried going to the farmer's market?\n---'"}} -{"run_id":"1730154470-722757339","line":1462,"new":{"module_name":"ariadne__write__tests","snapshot_name":"multi_notes_multi_lines","metadata":{"source":"src/write.rs","assertion_line":1462,"expression":"msg"},"snapshot":"Error: can't compare apples with oranges\n ,-[:1:1]\n |\n 1 | apple == orange;\n | ^^^^^^^|^^^^^^^ \n | `--------- This is a strange comparison\n | \n | Note 1: No need to try, they can't be compared.\n | \n | Note 2: Yeah, really, please stop.\n | It has no resemblance.\n---'\n"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error: can't compare apples with oranges\n ,-[:1:1]\n |\n 1 | apple == orange;\n | ^^^^^^^|^^^^^^^\n | `--------- This is a strange comparison\n |\n | Note 1: No need to try, they can't be compared.\n |\n | Note 2: Yeah, really, please stop.\n | It has no resemblance.\n---'"}} -{"run_id":"1730154470-722757339","line":1436,"new":{"module_name":"ariadne__write__tests","snapshot_name":"multi_notes_single_lines","metadata":{"source":"src/write.rs","assertion_line":1436,"expression":"msg"},"snapshot":"Error: can't compare apples with oranges\n ,-[:1:1]\n |\n 1 | apple == orange;\n | ^^^^^^^|^^^^^^^ \n | `--------- This is a strange comparison\n | \n | Note 1: No need to try, they can't be compared.\n | \n | Note 2: Yeah, really, please stop.\n---'\n"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error: can't compare apples with oranges\n ,-[:1:1]\n |\n 1 | apple == orange;\n | ^^^^^^^|^^^^^^^\n | `--------- This is a strange comparison\n |\n | Note 1: No need to try, they can't be compared.\n |\n | Note 2: Yeah, really, please stop.\n---'"}} -{"run_id":"1730154470-722757339","line":1358,"new":{"module_name":"ariadne__write__tests","snapshot_name":"help","metadata":{"source":"src/write.rs","assertion_line":1358,"expression":"msg"},"snapshot":"Error: can't compare apples with oranges\n ,-[:1:1]\n |\n 1 | apple == orange;\n | ^^|^^ ^^^|^^ \n | `-------------- This is an apple\n | | \n | `---- This is an orange\n | \n | Help: have you tried peeling the orange?\n---'\n"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error: can't compare apples with oranges\n ,-[:1:1]\n |\n 1 | apple == orange;\n | ^^|^^ ^^^|^^\n | `-------------- This is an apple\n | |\n | `---- This is an orange\n |\n | Help: have you tried peeling the orange?\n---'"}} -{"run_id":"1730154470-722757339","line":1332,"new":{"module_name":"ariadne__write__tests","snapshot_name":"note","metadata":{"source":"src/write.rs","assertion_line":1332,"expression":"msg"},"snapshot":"Error: can't compare apples with oranges\n ,-[:1:1]\n |\n 1 | apple == orange;\n | ^^|^^ ^^^|^^ \n | `-------------- This is an apple\n | | \n | `---- This is an orange\n | \n | Note: stop trying ... this is a fruitless endeavor\n---'\n"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error: can't compare apples with oranges\n ,-[:1:1]\n |\n 1 | apple == orange;\n | ^^|^^ ^^^|^^\n | `-------------- This is an apple\n | |\n | `---- This is an orange\n |\n | Note: stop trying ... this is a fruitless endeavor\n---'"}} -{"run_id":"1730154470-722757339","line":1210,"new":{"module_name":"ariadne__write__tests","snapshot_name":"empty_input_help_note","metadata":{"source":"src/write.rs","assertion_line":1210,"expression":"msg"},"snapshot":"Error: unexpected end of file\n ,-[:1:1]\n |\n 1 | \n | | \n | `- No more fruit!\n | \n | Help: have you tried going to the farmer's market?\n | \n | Note: eat your greens!\n---'\n"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error: unexpected end of file\n ,-[:1:1]\n |\n 1 |\n | |\n | `- No more fruit!\n |\n | Help: have you tried going to the farmer's market?\n |\n | Note: eat your greens!\n---'"}} -{"run_id":"1730154470-722757339","line":1300,"new":{"module_name":"ariadne__write__tests","snapshot_name":"multiple_labels_same_span","metadata":{"source":"src/write.rs","assertion_line":1300,"expression":"msg"},"snapshot":"Error: can't compare apples with oranges\n ,-[:1:1]\n |\n 1 | apple == orange;\n | ^^|^^ ^^^|^^ \n | `-------------- This is an apple\n | | | \n | `-------------- Have I mentioned that this is an apple?\n | | | \n | `-------------- No really, have I mentioned that?\n | | \n | `---- This is an orange\n | | \n | `---- Have I mentioned that this is an orange?\n | | \n | `---- No really, have I mentioned that?\n---'\n"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error: can't compare apples with oranges\n ,-[:1:1]\n |\n 1 | apple == orange;\n | ^^|^^ ^^^|^^\n | `-------------- This is an apple\n | | |\n | `-------------- Have I mentioned that this is an apple?\n | | |\n | `-------------- No really, have I mentioned that?\n | |\n | `---- This is an orange\n | |\n | `---- Have I mentioned that this is an orange?\n | |\n | `---- No really, have I mentioned that?\n---'"}} -{"run_id":"1730154470-722757339","line":964,"new":null,"old":null} -{"run_id":"1730154470-722757339","line":1097,"new":{"module_name":"ariadne__write__tests","snapshot_name":"label_at_end_of_long_line","metadata":{"source":"src/write.rs","assertion_line":1097,"expression":"msg"},"snapshot":"Error: can't compare apples with oranges\n ,-[:1:1]\n |\n 1 | apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == orange\n | ^^|^^ \n | `---- This is an orange\n---'\n"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error: can't compare apples with oranges\n ,-[:1:1]\n |\n 1 | apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == orange\n | ^^|^^\n | `---- This is an orange\n---'"}} -{"run_id":"1730154470-722757339","line":980,"new":null,"old":null} -{"run_id":"1730154470-722757339","line":1385,"new":{"module_name":"ariadne__write__tests","snapshot_name":"help_and_note","metadata":{"source":"src/write.rs","assertion_line":1385,"expression":"msg"},"snapshot":"Error: can't compare apples with oranges\n ,-[:1:1]\n |\n 1 | apple == orange;\n | ^^|^^ ^^^|^^ \n | `-------------- This is an apple\n | | \n | `---- This is an orange\n | \n | Help: have you tried peeling the orange?\n | \n | Note: stop trying ... this is a fruitless endeavor\n---'\n"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error: can't compare apples with oranges\n ,-[:1:1]\n |\n 1 | apple == orange;\n | ^^|^^ ^^^|^^\n | `-------------- This is an apple\n | |\n | `---- This is an orange\n |\n | Help: have you tried peeling the orange?\n |\n | Note: stop trying ... this is a fruitless endeavor\n---'"}} -{"run_id":"1730154470-722757339","line":1250,"new":{"module_name":"ariadne__write__tests","snapshot_name":"multiline_label","metadata":{"source":"src/write.rs","assertion_line":1250,"expression":"msg"},"snapshot":"Error: \n ,-[:1:1]\n |\n 1 | ,-> apple\n : : \n 3 | |-> orange\n | | \n | `----------- illegal comparison\n---'\n"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error:\n ,-[:1:1]\n |\n 1 | ,-> apple\n : :\n 3 | |-> orange\n | |\n | `----------- illegal comparison\n---'"}} -{"run_id":"1730154470-722757339","line":1000,"new":{"module_name":"ariadne__write__tests","snapshot_name":"two_labels_with_messages","metadata":{"source":"src/write.rs","assertion_line":1000,"expression":"msg"},"snapshot":"Error: can't compare apples with oranges\n ,-[:1:1]\n |\n 1 | apple == orange;\n | ^^|^^ ^^^|^^ \n | `-------------- This is an apple\n | | \n | `---- This is an orange\n---'\n"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error: can't compare apples with oranges\n ,-[:1:1]\n |\n 1 | apple == orange;\n | ^^|^^ ^^^|^^\n | `-------------- This is an apple\n | |\n | `---- This is an orange\n---'"}} -{"run_id":"1730154470-722757339","line":1273,"new":{"module_name":"ariadne__write__tests","snapshot_name":"partially_overlapping_labels","metadata":{"source":"src/write.rs","assertion_line":1273,"expression":"msg"},"snapshot":"Error: \n ,-[:1:1]\n |\n 1 | https://example.com/\n | ^^|^^^^^^^|^^^^^^^^^ \n | `------------------- scheme\n | | \n | `----------- URL\n---'\n"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error:\n ,-[:1:1]\n |\n 1 | https://example.com/\n | ^^|^^^^^^^|^^^^^^^^^\n | `------------------- scheme\n | |\n | `----------- URL\n---'"}} -{"run_id":"1730154470-722757339","line":1412,"new":{"module_name":"ariadne__write__tests","snapshot_name":"single_note_single_line","metadata":{"source":"src/write.rs","assertion_line":1412,"expression":"msg"},"snapshot":"Error: can't compare apples with oranges\n ,-[:1:1]\n |\n 1 | apple == orange;\n | ^^^^^^^|^^^^^^^ \n | `--------- This is a strange comparison\n | \n | Note: No need to try, they can't be compared.\n---'\n"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error: can't compare apples with oranges\n ,-[:1:1]\n |\n 1 | apple == orange;\n | ^^^^^^^|^^^^^^^\n | `--------- This is a strange comparison\n |\n | Note: No need to try, they can't be compared.\n---'"}} -{"run_id":"1730154580-873153354","line":1048,"new":{"module_name":"ariadne__write__tests","snapshot_name":"byte_label","metadata":{"source":"src/write.rs","assertion_line":1048,"expression":"msg"},"snapshot":"Error: can't compare äpplës with örängës\n ,-[:1:1]\n |\n 1 | äpplë == örängë;\n | ^^|^^ ^^^|^^ \n | `-------------- This is an äpplë\n | | \n | `---- This is an örängë\n---'\n"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error: can't compare äpplës with örängës\n ,-[:1:1]\n |\n 1 | äpplë == örängë;\n | ^^|^^ ^^^|^^\n | `-------------- This is an äpplë\n | |\n | `---- This is an örängë\n---'"}} -{"run_id":"1730154580-873153354","line":964,"new":null,"old":null} -{"run_id":"1730154580-873153354","line":1024,"new":{"module_name":"ariadne__write__tests","snapshot_name":"multi_byte_chars","metadata":{"source":"src/write.rs","assertion_line":1024,"expression":"msg"},"snapshot":"Error: can't compare äpplës with örängës\n ,-[:1:1]\n |\n 1 | äpplë == örängë;\n | ^^|^^ ^^^|^^ \n | `-------------- This is an äpplë\n | | \n | `---- This is an örängë\n---'\n"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error: can't compare äpplës with örängës\n ,-[:1:1]\n |\n 1 | äpplë == örängë;\n | ^^|^^ ^^^|^^\n | `-------------- This is an äpplë\n | |\n | `---- This is an örängë\n---'"}} -{"run_id":"1730154580-873153354","line":1358,"new":{"module_name":"ariadne__write__tests","snapshot_name":"help","metadata":{"source":"src/write.rs","assertion_line":1358,"expression":"msg"},"snapshot":"Error: can't compare apples with oranges\n ,-[:1:1]\n |\n 1 | apple == orange;\n | ^^|^^ ^^^|^^ \n | `-------------- This is an apple\n | | \n | `---- This is an orange\n | \n | Help: have you tried peeling the orange?\n---'\n"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error: can't compare apples with oranges\n ,-[:1:1]\n |\n 1 | apple == orange;\n | ^^|^^ ^^^|^^\n | `-------------- This is an apple\n | |\n | `---- This is an orange\n |\n | Help: have you tried peeling the orange?\n---'"}} -{"run_id":"1730154580-873153354","line":1385,"new":{"module_name":"ariadne__write__tests","snapshot_name":"help_and_note","metadata":{"source":"src/write.rs","assertion_line":1385,"expression":"msg"},"snapshot":"Error: can't compare apples with oranges\n ,-[:1:1]\n |\n 1 | apple == orange;\n | ^^|^^ ^^^|^^ \n | `-------------- This is an apple\n | | \n | `---- This is an orange\n | \n | Help: have you tried peeling the orange?\n | \n | Note: stop trying ... this is a fruitless endeavor\n---'\n"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error: can't compare apples with oranges\n ,-[:1:1]\n |\n 1 | apple == orange;\n | ^^|^^ ^^^|^^\n | `-------------- This is an apple\n | |\n | `---- This is an orange\n |\n | Help: have you tried peeling the orange?\n |\n | Note: stop trying ... this is a fruitless endeavor\n---'"}} -{"run_id":"1730154580-873153354","line":980,"new":null,"old":null} -{"run_id":"1730154580-873153354","line":1118,"new":{"module_name":"ariadne__write__tests","snapshot_name":"label_of_width_zero_at_end_of_line","metadata":{"source":"src/write.rs","assertion_line":1118,"expression":"msg"},"snapshot":"Error: unexpected end of file\n ,-[:1:1]\n |\n 1 | apple ==\n | | \n | `- Unexpected end of file\n---'\n"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error: unexpected end of file\n ,-[:1:1]\n |\n 1 | apple ==\n | |\n | `- Unexpected end of file\n---'"}} -{"run_id":"1730154580-873153354","line":1139,"new":{"module_name":"ariadne__write__tests","snapshot_name":"empty_input","metadata":{"source":"src/write.rs","assertion_line":1139,"expression":"msg"},"snapshot":"Error: unexpected end of file\n ,-[:1:1]\n |\n 1 | \n | | \n | `- No more fruit!\n---'\n"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error: unexpected end of file\n ,-[:1:1]\n |\n 1 |\n | |\n | `- No more fruit!\n---'"}} -{"run_id":"1730154580-873153354","line":1161,"new":{"module_name":"ariadne__write__tests","snapshot_name":"empty_input_help","metadata":{"source":"src/write.rs","assertion_line":1161,"expression":"msg"},"snapshot":"Error: unexpected end of file\n ,-[:1:1]\n |\n 1 | \n | | \n | `- No more fruit!\n | \n | Help: have you tried going to the farmer's market?\n---'\n"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error: unexpected end of file\n ,-[:1:1]\n |\n 1 |\n | |\n | `- No more fruit!\n |\n | Help: have you tried going to the farmer's market?\n---'"}} -{"run_id":"1730154580-873153354","line":1462,"new":{"module_name":"ariadne__write__tests","snapshot_name":"multi_notes_multi_lines","metadata":{"source":"src/write.rs","assertion_line":1462,"expression":"msg"},"snapshot":"Error: can't compare apples with oranges\n ,-[:1:1]\n |\n 1 | apple == orange;\n | ^^^^^^^|^^^^^^^ \n | `--------- This is a strange comparison\n | \n | Note 1: No need to try, they can't be compared.\n | \n | Note 2: Yeah, really, please stop.\n | It has no resemblance.\n---'\n"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error: can't compare apples with oranges\n ,-[:1:1]\n |\n 1 | apple == orange;\n | ^^^^^^^|^^^^^^^\n | `--------- This is a strange comparison\n |\n | Note 1: No need to try, they can't be compared.\n |\n | Note 2: Yeah, really, please stop.\n | It has no resemblance.\n---'"}} -{"run_id":"1730154580-873153354","line":1210,"new":{"module_name":"ariadne__write__tests","snapshot_name":"empty_input_help_note","metadata":{"source":"src/write.rs","assertion_line":1210,"expression":"msg"},"snapshot":"Error: unexpected end of file\n ,-[:1:1]\n |\n 1 | \n | | \n | `- No more fruit!\n | \n | Help: have you tried going to the farmer's market?\n | \n | Note: eat your greens!\n---'\n"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error: unexpected end of file\n ,-[:1:1]\n |\n 1 |\n | |\n | `- No more fruit!\n |\n | Help: have you tried going to the farmer's market?\n |\n | Note: eat your greens!\n---'"}} -{"run_id":"1730154580-873153354","line":1300,"new":{"module_name":"ariadne__write__tests","snapshot_name":"multiple_labels_same_span","metadata":{"source":"src/write.rs","assertion_line":1300,"expression":"msg"},"snapshot":"Error: can't compare apples with oranges\n ,-[:1:1]\n |\n 1 | apple == orange;\n | ^^|^^ ^^^|^^ \n | `-------------- This is an apple\n | | | \n | `-------------- Have I mentioned that this is an apple?\n | | | \n | `-------------- No really, have I mentioned that?\n | | \n | `---- This is an orange\n | | \n | `---- Have I mentioned that this is an orange?\n | | \n | `---- No really, have I mentioned that?\n---'\n"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error: can't compare apples with oranges\n ,-[:1:1]\n |\n 1 | apple == orange;\n | ^^|^^ ^^^|^^\n | `-------------- This is an apple\n | | |\n | `-------------- Have I mentioned that this is an apple?\n | | |\n | `-------------- No really, have I mentioned that?\n | |\n | `---- This is an orange\n | |\n | `---- Have I mentioned that this is an orange?\n | |\n | `---- No really, have I mentioned that?\n---'"}} -{"run_id":"1730154580-873153354","line":1332,"new":{"module_name":"ariadne__write__tests","snapshot_name":"note","metadata":{"source":"src/write.rs","assertion_line":1332,"expression":"msg"},"snapshot":"Error: can't compare apples with oranges\n ,-[:1:1]\n |\n 1 | apple == orange;\n | ^^|^^ ^^^|^^ \n | `-------------- This is an apple\n | | \n | `---- This is an orange\n | \n | Note: stop trying ... this is a fruitless endeavor\n---'\n"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error: can't compare apples with oranges\n ,-[:1:1]\n |\n 1 | apple == orange;\n | ^^|^^ ^^^|^^\n | `-------------- This is an apple\n | |\n | `---- This is an orange\n |\n | Note: stop trying ... this is a fruitless endeavor\n---'"}} -{"run_id":"1730154580-873153354","line":1436,"new":{"module_name":"ariadne__write__tests","snapshot_name":"multi_notes_single_lines","metadata":{"source":"src/write.rs","assertion_line":1436,"expression":"msg"},"snapshot":"Error: can't compare apples with oranges\n ,-[:1:1]\n |\n 1 | apple == orange;\n | ^^^^^^^|^^^^^^^ \n | `--------- This is a strange comparison\n | \n | Note 1: No need to try, they can't be compared.\n | \n | Note 2: Yeah, really, please stop.\n---'\n"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error: can't compare apples with oranges\n ,-[:1:1]\n |\n 1 | apple == orange;\n | ^^^^^^^|^^^^^^^\n | `--------- This is a strange comparison\n |\n | Note 1: No need to try, they can't be compared.\n |\n | Note 2: Yeah, really, please stop.\n---'"}} -{"run_id":"1730154580-873153354","line":1250,"new":{"module_name":"ariadne__write__tests","snapshot_name":"multiline_label","metadata":{"source":"src/write.rs","assertion_line":1250,"expression":"msg"},"snapshot":"Error: \n ,-[:1:1]\n |\n 1 | ,-> apple\n : : \n 3 | |-> orange\n | | \n | `----------- illegal comparison\n---'\n"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error:\n ,-[:1:1]\n |\n 1 | ,-> apple\n : :\n 3 | |-> orange\n | |\n | `----------- illegal comparison\n---'"}} -{"run_id":"1730154580-873153354","line":1185,"new":{"module_name":"ariadne__write__tests","snapshot_name":"empty_input_note","metadata":{"source":"src/write.rs","assertion_line":1185,"expression":"msg"},"snapshot":"Error: unexpected end of file\n ,-[:1:1]\n |\n 1 | \n | | \n | `- No more fruit!\n | \n | Note: eat your greens!\n---'\n"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error: unexpected end of file\n ,-[:1:1]\n |\n 1 |\n | |\n | `- No more fruit!\n |\n | Note: eat your greens!\n---'"}} -{"run_id":"1730154580-873153354","line":1072,"new":{"module_name":"ariadne__write__tests","snapshot_name":"byte_column","metadata":{"source":"src/write.rs","assertion_line":1072,"expression":"msg"},"snapshot":"Error: can't compare äpplës with örängës\n ,-[:1:10]\n |\n 1 | äpplë == örängë;\n | ^^|^^ ^^^|^^ \n | `-------------- This is an äpplë\n | | \n | `---- This is an örängë\n---'\n"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error: can't compare äpplës with örängës\n ,-[:1:10]\n |\n 1 | äpplë == örängë;\n | ^^|^^ ^^^|^^\n | `-------------- This is an äpplë\n | |\n | `---- This is an örängë\n---'"}} -{"run_id":"1730154580-873153354","line":1412,"new":{"module_name":"ariadne__write__tests","snapshot_name":"single_note_single_line","metadata":{"source":"src/write.rs","assertion_line":1412,"expression":"msg"},"snapshot":"Error: can't compare apples with oranges\n ,-[:1:1]\n |\n 1 | apple == orange;\n | ^^^^^^^|^^^^^^^ \n | `--------- This is a strange comparison\n | \n | Note: No need to try, they can't be compared.\n---'\n"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error: can't compare apples with oranges\n ,-[:1:1]\n |\n 1 | apple == orange;\n | ^^^^^^^|^^^^^^^\n | `--------- This is a strange comparison\n |\n | Note: No need to try, they can't be compared.\n---'"}} -{"run_id":"1730154580-873153354","line":1000,"new":{"module_name":"ariadne__write__tests","snapshot_name":"two_labels_with_messages","metadata":{"source":"src/write.rs","assertion_line":1000,"expression":"msg"},"snapshot":"Error: can't compare apples with oranges\n ,-[:1:1]\n |\n 1 | apple == orange;\n | ^^|^^ ^^^|^^ \n | `-------------- This is an apple\n | | \n | `---- This is an orange\n---'\n"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error: can't compare apples with oranges\n ,-[:1:1]\n |\n 1 | apple == orange;\n | ^^|^^ ^^^|^^\n | `-------------- This is an apple\n | |\n | `---- This is an orange\n---'"}} -{"run_id":"1730154580-873153354","line":1273,"new":{"module_name":"ariadne__write__tests","snapshot_name":"partially_overlapping_labels","metadata":{"source":"src/write.rs","assertion_line":1273,"expression":"msg"},"snapshot":"Error: \n ,-[:1:1]\n |\n 1 | https://example.com/\n | ^^|^^^^^^^|^^^^^^^^^ \n | `------------------- scheme\n | | \n | `----------- URL\n---'\n"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error:\n ,-[:1:1]\n |\n 1 | https://example.com/\n | ^^|^^^^^^^|^^^^^^^^^\n | `------------------- scheme\n | |\n | `----------- URL\n---'"}} -{"run_id":"1730154580-873153354","line":1097,"new":{"module_name":"ariadne__write__tests","snapshot_name":"label_at_end_of_long_line","metadata":{"source":"src/write.rs","assertion_line":1097,"expression":"msg"},"snapshot":"Error: can't compare apples with oranges\n ,-[:1:1]\n |\n 1 | apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == orange\n | ^^|^^ \n | `---- This is an orange\n---'\n"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error: can't compare apples with oranges\n ,-[:1:1]\n |\n 1 | apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == orange\n | ^^|^^\n | `---- This is an orange\n---'"}} -{"run_id":"1730154746-396557371","line":1139,"new":{"module_name":"ariadne__write__tests","snapshot_name":"empty_input","metadata":{"source":"src/write.rs","assertion_line":1139,"expression":"msg"},"snapshot":"Error: unexpected end of file\n ,-[:1:1]\n |\n 1 | \n | | \n | `- No more fruit!\n---'\n"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error: unexpected end of file\n ,-[:1:1]\n |\n 1 |\n | |\n | `- No more fruit!\n---'"}} -{"run_id":"1730154746-396557371","line":1118,"new":{"module_name":"ariadne__write__tests","snapshot_name":"label_of_width_zero_at_end_of_line","metadata":{"source":"src/write.rs","assertion_line":1118,"expression":"msg"},"snapshot":"Error: unexpected end of file\n ,-[:1:1]\n |\n 1 | apple ==\n | | \n | `- Unexpected end of file\n---'\n"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error: unexpected end of file\n ,-[:1:1]\n |\n 1 | apple ==\n | |\n | `- Unexpected end of file\n---'"}} -{"run_id":"1730154746-396557371","line":1185,"new":{"module_name":"ariadne__write__tests","snapshot_name":"empty_input_note","metadata":{"source":"src/write.rs","assertion_line":1185,"expression":"msg"},"snapshot":"Error: unexpected end of file\n ,-[:1:1]\n |\n 1 | \n | | \n | `- No more fruit!\n | \n | Note: eat your greens!\n---'\n"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error: unexpected end of file\n ,-[:1:1]\n |\n 1 |\n | |\n | `- No more fruit!\n |\n | Note: eat your greens!\n---'"}} -{"run_id":"1730154746-396557371","line":1161,"new":{"module_name":"ariadne__write__tests","snapshot_name":"empty_input_help","metadata":{"source":"src/write.rs","assertion_line":1161,"expression":"msg"},"snapshot":"Error: unexpected end of file\n ,-[:1:1]\n |\n 1 | \n | | \n | `- No more fruit!\n | \n | Help: have you tried going to the farmer's market?\n---'\n"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error: unexpected end of file\n ,-[:1:1]\n |\n 1 |\n | |\n | `- No more fruit!\n |\n | Help: have you tried going to the farmer's market?\n---'"}} -{"run_id":"1730154746-396557371","line":1024,"new":{"module_name":"ariadne__write__tests","snapshot_name":"multi_byte_chars","metadata":{"source":"src/write.rs","assertion_line":1024,"expression":"msg"},"snapshot":"Error: can't compare äpplës with örängës\n ,-[:1:1]\n |\n 1 | äpplë == örängë;\n | ^^|^^ ^^^|^^ \n | `-------------- This is an äpplë\n | | \n | `---- This is an örängë\n---'\n"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error: can't compare äpplës with örängës\n ,-[:1:1]\n |\n 1 | äpplë == örängë;\n | ^^|^^ ^^^|^^\n | `-------------- This is an äpplë\n | |\n | `---- This is an örängë\n---'"}} -{"run_id":"1730154746-396557371","line":1332,"new":{"module_name":"ariadne__write__tests","snapshot_name":"note","metadata":{"source":"src/write.rs","assertion_line":1332,"expression":"msg"},"snapshot":"Error: can't compare apples with oranges\n ,-[:1:1]\n |\n 1 | apple == orange;\n | ^^|^^ ^^^|^^ \n | `-------------- This is an apple\n | | \n | `---- This is an orange\n | \n | Note: stop trying ... this is a fruitless endeavor\n---'\n"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error: can't compare apples with oranges\n ,-[:1:1]\n |\n 1 | apple == orange;\n | ^^|^^ ^^^|^^\n | `-------------- This is an apple\n | |\n | `---- This is an orange\n |\n | Note: stop trying ... this is a fruitless endeavor\n---'"}} -{"run_id":"1730154746-396557371","line":964,"new":null,"old":null} -{"run_id":"1730154746-396557371","line":1097,"new":{"module_name":"ariadne__write__tests","snapshot_name":"label_at_end_of_long_line","metadata":{"source":"src/write.rs","assertion_line":1097,"expression":"msg"},"snapshot":"Error: can't compare apples with oranges\n ,-[:1:1]\n |\n 1 | apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == orange\n | ^^|^^ \n | `---- This is an orange\n---'\n"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error: can't compare apples with oranges\n ,-[:1:1]\n |\n 1 | apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == orange\n | ^^|^^\n | `---- This is an orange\n---'"}} -{"run_id":"1730154746-396557371","line":980,"new":null,"old":null} -{"run_id":"1730154746-396557371","line":1048,"new":{"module_name":"ariadne__write__tests","snapshot_name":"byte_label","metadata":{"source":"src/write.rs","assertion_line":1048,"expression":"msg"},"snapshot":"Error: can't compare äpplës with örängës\n ,-[:1:1]\n |\n 1 | äpplë == örängë;\n | ^^|^^ ^^^|^^ \n | `-------------- This is an äpplë\n | | \n | `---- This is an örängë\n---'\n"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error: can't compare äpplës with örängës\n ,-[:1:1]\n |\n 1 | äpplë == örängë;\n | ^^|^^ ^^^|^^\n | `-------------- This is an äpplë\n | |\n | `---- This is an örängë\n---'"}} -{"run_id":"1730154746-396557371","line":1462,"new":{"module_name":"ariadne__write__tests","snapshot_name":"multi_notes_multi_lines","metadata":{"source":"src/write.rs","assertion_line":1462,"expression":"msg"},"snapshot":"Error: can't compare apples with oranges\n ,-[:1:1]\n |\n 1 | apple == orange;\n | ^^^^^^^|^^^^^^^ \n | `--------- This is a strange comparison\n | \n | Note 1: No need to try, they can't be compared.\n | \n | Note 2: Yeah, really, please stop.\n | It has no resemblance.\n---'\n"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error: can't compare apples with oranges\n ,-[:1:1]\n |\n 1 | apple == orange;\n | ^^^^^^^|^^^^^^^\n | `--------- This is a strange comparison\n |\n | Note 1: No need to try, they can't be compared.\n |\n | Note 2: Yeah, really, please stop.\n | It has no resemblance.\n---'"}} -{"run_id":"1730154746-396557371","line":1210,"new":{"module_name":"ariadne__write__tests","snapshot_name":"empty_input_help_note","metadata":{"source":"src/write.rs","assertion_line":1210,"expression":"msg"},"snapshot":"Error: unexpected end of file\n ,-[:1:1]\n |\n 1 | \n | | \n | `- No more fruit!\n | \n | Help: have you tried going to the farmer's market?\n | \n | Note: eat your greens!\n---'\n"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error: unexpected end of file\n ,-[:1:1]\n |\n 1 |\n | |\n | `- No more fruit!\n |\n | Help: have you tried going to the farmer's market?\n |\n | Note: eat your greens!\n---'"}} -{"run_id":"1730154746-396557371","line":1436,"new":{"module_name":"ariadne__write__tests","snapshot_name":"multi_notes_single_lines","metadata":{"source":"src/write.rs","assertion_line":1436,"expression":"msg"},"snapshot":"Error: can't compare apples with oranges\n ,-[:1:1]\n |\n 1 | apple == orange;\n | ^^^^^^^|^^^^^^^ \n | `--------- This is a strange comparison\n | \n | Note 1: No need to try, they can't be compared.\n | \n | Note 2: Yeah, really, please stop.\n---'\n"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error: can't compare apples with oranges\n ,-[:1:1]\n |\n 1 | apple == orange;\n | ^^^^^^^|^^^^^^^\n | `--------- This is a strange comparison\n |\n | Note 1: No need to try, they can't be compared.\n |\n | Note 2: Yeah, really, please stop.\n---'"}} -{"run_id":"1730154746-396557371","line":1358,"new":{"module_name":"ariadne__write__tests","snapshot_name":"help","metadata":{"source":"src/write.rs","assertion_line":1358,"expression":"msg"},"snapshot":"Error: can't compare apples with oranges\n ,-[:1:1]\n |\n 1 | apple == orange;\n | ^^|^^ ^^^|^^ \n | `-------------- This is an apple\n | | \n | `---- This is an orange\n | \n | Help: have you tried peeling the orange?\n---'\n"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error: can't compare apples with oranges\n ,-[:1:1]\n |\n 1 | apple == orange;\n | ^^|^^ ^^^|^^\n | `-------------- This is an apple\n | |\n | `---- This is an orange\n |\n | Help: have you tried peeling the orange?\n---'"}} -{"run_id":"1730154746-396557371","line":1250,"new":{"module_name":"ariadne__write__tests","snapshot_name":"multiline_label","metadata":{"source":"src/write.rs","assertion_line":1250,"expression":"msg"},"snapshot":"Error: \n ,-[:1:1]\n |\n 1 | ,-> apple\n : : \n 3 | |-> orange\n | | \n | `----------- illegal comparison\n---'\n"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error:\n ,-[:1:1]\n |\n 1 | ,-> apple\n : :\n 3 | |-> orange\n | |\n | `----------- illegal comparison\n---'"}} -{"run_id":"1730154746-396557371","line":1385,"new":{"module_name":"ariadne__write__tests","snapshot_name":"help_and_note","metadata":{"source":"src/write.rs","assertion_line":1385,"expression":"msg"},"snapshot":"Error: can't compare apples with oranges\n ,-[:1:1]\n |\n 1 | apple == orange;\n | ^^|^^ ^^^|^^ \n | `-------------- This is an apple\n | | \n | `---- This is an orange\n | \n | Help: have you tried peeling the orange?\n | \n | Note: stop trying ... this is a fruitless endeavor\n---'\n"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error: can't compare apples with oranges\n ,-[:1:1]\n |\n 1 | apple == orange;\n | ^^|^^ ^^^|^^\n | `-------------- This is an apple\n | |\n | `---- This is an orange\n |\n | Help: have you tried peeling the orange?\n |\n | Note: stop trying ... this is a fruitless endeavor\n---'"}} -{"run_id":"1730154746-396557371","line":1300,"new":{"module_name":"ariadne__write__tests","snapshot_name":"multiple_labels_same_span","metadata":{"source":"src/write.rs","assertion_line":1300,"expression":"msg"},"snapshot":"Error: can't compare apples with oranges\n ,-[:1:1]\n |\n 1 | apple == orange;\n | ^^|^^ ^^^|^^ \n | `-------------- This is an apple\n | | | \n | `-------------- Have I mentioned that this is an apple?\n | | | \n | `-------------- No really, have I mentioned that?\n | | \n | `---- This is an orange\n | | \n | `---- Have I mentioned that this is an orange?\n | | \n | `---- No really, have I mentioned that?\n---'\n"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error: can't compare apples with oranges\n ,-[:1:1]\n |\n 1 | apple == orange;\n | ^^|^^ ^^^|^^\n | `-------------- This is an apple\n | | |\n | `-------------- Have I mentioned that this is an apple?\n | | |\n | `-------------- No really, have I mentioned that?\n | |\n | `---- This is an orange\n | |\n | `---- Have I mentioned that this is an orange?\n | |\n | `---- No really, have I mentioned that?\n---'"}} -{"run_id":"1730154746-396557371","line":1072,"new":{"module_name":"ariadne__write__tests","snapshot_name":"byte_column","metadata":{"source":"src/write.rs","assertion_line":1072,"expression":"msg"},"snapshot":"Error: can't compare äpplës with örängës\n ,-[:1:10]\n |\n 1 | äpplë == örängë;\n | ^^|^^ ^^^|^^ \n | `-------------- This is an äpplë\n | | \n | `---- This is an örängë\n---'\n"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error: can't compare äpplës with örängës\n ,-[:1:10]\n |\n 1 | äpplë == örängë;\n | ^^|^^ ^^^|^^\n | `-------------- This is an äpplë\n | |\n | `---- This is an örängë\n---'"}} -{"run_id":"1730154746-396557371","line":1412,"new":{"module_name":"ariadne__write__tests","snapshot_name":"single_note_single_line","metadata":{"source":"src/write.rs","assertion_line":1412,"expression":"msg"},"snapshot":"Error: can't compare apples with oranges\n ,-[:1:1]\n |\n 1 | apple == orange;\n | ^^^^^^^|^^^^^^^ \n | `--------- This is a strange comparison\n | \n | Note: No need to try, they can't be compared.\n---'\n"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error: can't compare apples with oranges\n ,-[:1:1]\n |\n 1 | apple == orange;\n | ^^^^^^^|^^^^^^^\n | `--------- This is a strange comparison\n |\n | Note: No need to try, they can't be compared.\n---'"}} -{"run_id":"1730154746-396557371","line":1273,"new":{"module_name":"ariadne__write__tests","snapshot_name":"partially_overlapping_labels","metadata":{"source":"src/write.rs","assertion_line":1273,"expression":"msg"},"snapshot":"Error: \n ,-[:1:1]\n |\n 1 | https://example.com/\n | ^^|^^^^^^^|^^^^^^^^^ \n | `------------------- scheme\n | | \n | `----------- URL\n---'\n"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error:\n ,-[:1:1]\n |\n 1 | https://example.com/\n | ^^|^^^^^^^|^^^^^^^^^\n | `------------------- scheme\n | |\n | `----------- URL\n---'"}} -{"run_id":"1730154746-396557371","line":1000,"new":{"module_name":"ariadne__write__tests","snapshot_name":"two_labels_with_messages","metadata":{"source":"src/write.rs","assertion_line":1000,"expression":"msg"},"snapshot":"Error: can't compare apples with oranges\n ,-[:1:1]\n |\n 1 | apple == orange;\n | ^^|^^ ^^^|^^ \n | `-------------- This is an apple\n | | \n | `---- This is an orange\n---'\n"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error: can't compare apples with oranges\n ,-[:1:1]\n |\n 1 | apple == orange;\n | ^^|^^ ^^^|^^\n | `-------------- This is an apple\n | |\n | `---- This is an orange\n---'"}} -{"run_id":"1730154821-476337710","line":1048,"new":null,"old":null} -{"run_id":"1730154821-476337710","line":1139,"new":null,"old":null} -{"run_id":"1730154821-476337710","line":1358,"new":null,"old":null} -{"run_id":"1730154821-476337710","line":1185,"new":null,"old":null} -{"run_id":"1730154821-476337710","line":1072,"new":null,"old":null} -{"run_id":"1730154821-476337710","line":1385,"new":null,"old":null} -{"run_id":"1730154821-476337710","line":1436,"new":null,"old":null} -{"run_id":"1730154821-476337710","line":1161,"new":null,"old":null} -{"run_id":"1730154821-476337710","line":1250,"new":null,"old":null} -{"run_id":"1730154821-476337710","line":1118,"new":null,"old":null} -{"run_id":"1730154821-476337710","line":1210,"new":null,"old":null} -{"run_id":"1730154821-476337710","line":1024,"new":null,"old":null} -{"run_id":"1730154821-476337710","line":1332,"new":null,"old":null} -{"run_id":"1730154821-476337710","line":1462,"new":null,"old":null} -{"run_id":"1730154821-476337710","line":1097,"new":null,"old":null} -{"run_id":"1730154821-476337710","line":1300,"new":null,"old":null} -{"run_id":"1730154821-476337710","line":964,"new":null,"old":null} -{"run_id":"1730154821-476337710","line":1273,"new":null,"old":null} -{"run_id":"1730154821-476337710","line":1000,"new":null,"old":null} -{"run_id":"1730154821-476337710","line":980,"new":null,"old":null} -{"run_id":"1730154821-476337710","line":1412,"new":null,"old":null} -{"run_id":"1730154827-858030734","line":1161,"new":null,"old":null} -{"run_id":"1730154827-858030734","line":1139,"new":null,"old":null} -{"run_id":"1730154827-858030734","line":1072,"new":null,"old":null} -{"run_id":"1730154827-858030734","line":1048,"new":null,"old":null} -{"run_id":"1730154827-858030734","line":1118,"new":null,"old":null} -{"run_id":"1730154827-858030734","line":1185,"new":null,"old":null} -{"run_id":"1730154827-858030734","line":1210,"new":null,"old":null} -{"run_id":"1730154827-858030734","line":1385,"new":null,"old":null} -{"run_id":"1730154827-858030734","line":1358,"new":null,"old":null} -{"run_id":"1730154827-858030734","line":1436,"new":null,"old":null} -{"run_id":"1730154827-858030734","line":1250,"new":null,"old":null} -{"run_id":"1730154827-858030734","line":1462,"new":null,"old":null} -{"run_id":"1730154827-858030734","line":1024,"new":null,"old":null} -{"run_id":"1730154827-858030734","line":1332,"new":null,"old":null} -{"run_id":"1730154827-858030734","line":1097,"new":null,"old":null} -{"run_id":"1730154827-858030734","line":1300,"new":null,"old":null} -{"run_id":"1730154827-858030734","line":964,"new":null,"old":null} -{"run_id":"1730154827-858030734","line":1000,"new":null,"old":null} -{"run_id":"1730154827-858030734","line":1412,"new":null,"old":null} -{"run_id":"1730154827-858030734","line":1273,"new":null,"old":null} -{"run_id":"1730154827-858030734","line":980,"new":null,"old":null} -{"run_id":"1730157055-637288002","line":1116,"new":{"module_name":"ariadne__write__tests","snapshot_name":"label_of_width_zero_at_end_of_line","metadata":{"source":"src/write.rs","assertion_line":1116,"expression":"msg"},"snapshot":"Error: unexpected end of file\n ,-[ :1:1 ]\n |\n 1 | apple ==\n | | \n | `- Unexpected end of file\n---'\n"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error: unexpected end of file\n ,-[:1:1]\n |\n 1 | apple ==\n | |\n | `- Unexpected end of file\n---'"}} -{"run_id":"1730157055-637288002","line":1070,"new":{"module_name":"ariadne__write__tests","snapshot_name":"byte_column","metadata":{"source":"src/write.rs","assertion_line":1070,"expression":"msg"},"snapshot":"Error: can't compare äpplës with örängës\n ,-[ :1:10 ]\n |\n 1 | äpplë == örängë;\n | ^^|^^ ^^^|^^ \n | `-------------- This is an äpplë\n | | \n | `---- This is an örängë\n---'\n"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error: can't compare äpplës with örängës\n ,-[:1:10]\n |\n 1 | äpplë == örängë;\n | ^^|^^ ^^^|^^\n | `-------------- This is an äpplë\n | |\n | `---- This is an örängë\n---'"}} -{"run_id":"1730157055-637288002","line":1248,"new":{"module_name":"ariadne__write__tests","snapshot_name":"multiline_label","metadata":{"source":"src/write.rs","assertion_line":1248,"expression":"msg"},"snapshot":"Error: \n ,-[ :1:1 ]\n |\n 1 | ,-> apple\n : : \n 3 | |-> orange\n | | \n | `----------- illegal comparison\n---'\n"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error:\n ,-[:1:1]\n |\n 1 | ,-> apple\n : :\n 3 | |-> orange\n | |\n | `----------- illegal comparison\n---'"}} -{"run_id":"1730157055-637288002","line":1434,"new":{"module_name":"ariadne__write__tests","snapshot_name":"multi_notes_single_lines","metadata":{"source":"src/write.rs","assertion_line":1434,"expression":"msg"},"snapshot":"Error: can't compare apples with oranges\n ,-[ :1:1 ]\n |\n 1 | apple == orange;\n | ^^^^^^^|^^^^^^^ \n | `--------- This is a strange comparison\n | \n | Note 1: No need to try, they can't be compared.\n | \n | Note 2: Yeah, really, please stop.\n---'\n"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error: can't compare apples with oranges\n ,-[:1:1]\n |\n 1 | apple == orange;\n | ^^^^^^^|^^^^^^^\n | `--------- This is a strange comparison\n |\n | Note 1: No need to try, they can't be compared.\n |\n | Note 2: Yeah, really, please stop.\n---'"}} -{"run_id":"1730157055-637288002","line":1159,"new":{"module_name":"ariadne__write__tests","snapshot_name":"empty_input_help","metadata":{"source":"src/write.rs","assertion_line":1159,"expression":"msg"},"snapshot":"Error: unexpected end of file\n ,-[ :1:1 ]\n |\n 1 | \n | | \n | `- No more fruit!\n | \n | Help: have you tried going to the farmer's market?\n---'\n"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error: unexpected end of file\n ,-[:1:1]\n |\n 1 |\n | |\n | `- No more fruit!\n |\n | Help: have you tried going to the farmer's market?\n---'"}} -{"run_id":"1730157055-637288002","line":1330,"new":{"module_name":"ariadne__write__tests","snapshot_name":"note","metadata":{"source":"src/write.rs","assertion_line":1330,"expression":"msg"},"snapshot":"Error: can't compare apples with oranges\n ,-[ :1:1 ]\n |\n 1 | apple == orange;\n | ^^|^^ ^^^|^^ \n | `-------------- This is an apple\n | | \n | `---- This is an orange\n | \n | Note: stop trying ... this is a fruitless endeavor\n---'\n"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error: can't compare apples with oranges\n ,-[:1:1]\n |\n 1 | apple == orange;\n | ^^|^^ ^^^|^^\n | `-------------- This is an apple\n | |\n | `---- This is an orange\n |\n | Note: stop trying ... this is a fruitless endeavor\n---'"}} -{"run_id":"1730157055-637288002","line":1046,"new":{"module_name":"ariadne__write__tests","snapshot_name":"byte_label","metadata":{"source":"src/write.rs","assertion_line":1046,"expression":"msg"},"snapshot":"Error: can't compare äpplës with örängës\n ,-[ :1:1 ]\n |\n 1 | äpplë == örängë;\n | ^^|^^ ^^^|^^ \n | `-------------- This is an äpplë\n | | \n | `---- This is an örängë\n---'\n"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error: can't compare äpplës with örängës\n ,-[:1:1]\n |\n 1 | äpplë == örängë;\n | ^^|^^ ^^^|^^\n | `-------------- This is an äpplë\n | |\n | `---- This is an örängë\n---'"}} -{"run_id":"1730157055-637288002","line":1356,"new":{"module_name":"ariadne__write__tests","snapshot_name":"help","metadata":{"source":"src/write.rs","assertion_line":1356,"expression":"msg"},"snapshot":"Error: can't compare apples with oranges\n ,-[ :1:1 ]\n |\n 1 | apple == orange;\n | ^^|^^ ^^^|^^ \n | `-------------- This is an apple\n | | \n | `---- This is an orange\n | \n | Help: have you tried peeling the orange?\n---'\n"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error: can't compare apples with oranges\n ,-[:1:1]\n |\n 1 | apple == orange;\n | ^^|^^ ^^^|^^\n | `-------------- This is an apple\n | |\n | `---- This is an orange\n |\n | Help: have you tried peeling the orange?\n---'"}} -{"run_id":"1730157055-637288002","line":1460,"new":{"module_name":"ariadne__write__tests","snapshot_name":"multi_notes_multi_lines","metadata":{"source":"src/write.rs","assertion_line":1460,"expression":"msg"},"snapshot":"Error: can't compare apples with oranges\n ,-[ :1:1 ]\n |\n 1 | apple == orange;\n | ^^^^^^^|^^^^^^^ \n | `--------- This is a strange comparison\n | \n | Note 1: No need to try, they can't be compared.\n | \n | Note 2: Yeah, really, please stop.\n | It has no resemblance.\n---'\n"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error: can't compare apples with oranges\n ,-[:1:1]\n |\n 1 | apple == orange;\n | ^^^^^^^|^^^^^^^\n | `--------- This is a strange comparison\n |\n | Note 1: No need to try, they can't be compared.\n |\n | Note 2: Yeah, really, please stop.\n | It has no resemblance.\n---'"}} -{"run_id":"1730157055-637288002","line":1208,"new":{"module_name":"ariadne__write__tests","snapshot_name":"empty_input_help_note","metadata":{"source":"src/write.rs","assertion_line":1208,"expression":"msg"},"snapshot":"Error: unexpected end of file\n ,-[ :1:1 ]\n |\n 1 | \n | | \n | `- No more fruit!\n | \n | Help: have you tried going to the farmer's market?\n | \n | Note: eat your greens!\n---'\n"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error: unexpected end of file\n ,-[:1:1]\n |\n 1 |\n | |\n | `- No more fruit!\n |\n | Help: have you tried going to the farmer's market?\n |\n | Note: eat your greens!\n---'"}} -{"run_id":"1730157055-637288002","line":1183,"new":{"module_name":"ariadne__write__tests","snapshot_name":"empty_input_note","metadata":{"source":"src/write.rs","assertion_line":1183,"expression":"msg"},"snapshot":"Error: unexpected end of file\n ,-[ :1:1 ]\n |\n 1 | \n | | \n | `- No more fruit!\n | \n | Note: eat your greens!\n---'\n"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error: unexpected end of file\n ,-[:1:1]\n |\n 1 |\n | |\n | `- No more fruit!\n |\n | Note: eat your greens!\n---'"}} -{"run_id":"1730157055-637288002","line":1137,"new":{"module_name":"ariadne__write__tests","snapshot_name":"empty_input","metadata":{"source":"src/write.rs","assertion_line":1137,"expression":"msg"},"snapshot":"Error: unexpected end of file\n ,-[ :1:1 ]\n |\n 1 | \n | | \n | `- No more fruit!\n---'\n"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error: unexpected end of file\n ,-[:1:1]\n |\n 1 |\n | |\n | `- No more fruit!\n---'"}} -{"run_id":"1730157055-637288002","line":962,"new":null,"old":null} -{"run_id":"1730157055-637288002","line":1383,"new":{"module_name":"ariadne__write__tests","snapshot_name":"help_and_note","metadata":{"source":"src/write.rs","assertion_line":1383,"expression":"msg"},"snapshot":"Error: can't compare apples with oranges\n ,-[ :1:1 ]\n |\n 1 | apple == orange;\n | ^^|^^ ^^^|^^ \n | `-------------- This is an apple\n | | \n | `---- This is an orange\n | \n | Help: have you tried peeling the orange?\n | \n | Note: stop trying ... this is a fruitless endeavor\n---'\n"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error: can't compare apples with oranges\n ,-[:1:1]\n |\n 1 | apple == orange;\n | ^^|^^ ^^^|^^\n | `-------------- This is an apple\n | |\n | `---- This is an orange\n |\n | Help: have you tried peeling the orange?\n |\n | Note: stop trying ... this is a fruitless endeavor\n---'"}} -{"run_id":"1730157055-637288002","line":1022,"new":{"module_name":"ariadne__write__tests","snapshot_name":"multi_byte_chars","metadata":{"source":"src/write.rs","assertion_line":1022,"expression":"msg"},"snapshot":"Error: can't compare äpplës with örängës\n ,-[ :1:1 ]\n |\n 1 | äpplë == örängë;\n | ^^|^^ ^^^|^^ \n | `-------------- This is an äpplë\n | | \n | `---- This is an örängë\n---'\n"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error: can't compare äpplës with örängës\n ,-[:1:1]\n |\n 1 | äpplë == örängë;\n | ^^|^^ ^^^|^^\n | `-------------- This is an äpplë\n | |\n | `---- This is an örängë\n---'"}} -{"run_id":"1730157055-637288002","line":1095,"new":{"module_name":"ariadne__write__tests","snapshot_name":"label_at_end_of_long_line","metadata":{"source":"src/write.rs","assertion_line":1095,"expression":"msg"},"snapshot":"Error: can't compare apples with oranges\n ,-[ :1:1 ]\n |\n 1 | apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == orange\n | ^^|^^ \n | `---- This is an orange\n---'\n"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error: can't compare apples with oranges\n ,-[:1:1]\n |\n 1 | apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == orange\n | ^^|^^\n | `---- This is an orange\n---'"}} -{"run_id":"1730157055-637288002","line":1410,"new":{"module_name":"ariadne__write__tests","snapshot_name":"single_note_single_line","metadata":{"source":"src/write.rs","assertion_line":1410,"expression":"msg"},"snapshot":"Error: can't compare apples with oranges\n ,-[ :1:1 ]\n |\n 1 | apple == orange;\n | ^^^^^^^|^^^^^^^ \n | `--------- This is a strange comparison\n | \n | Note: No need to try, they can't be compared.\n---'\n"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error: can't compare apples with oranges\n ,-[:1:1]\n |\n 1 | apple == orange;\n | ^^^^^^^|^^^^^^^\n | `--------- This is a strange comparison\n |\n | Note: No need to try, they can't be compared.\n---'"}} -{"run_id":"1730157055-637288002","line":1298,"new":{"module_name":"ariadne__write__tests","snapshot_name":"multiple_labels_same_span","metadata":{"source":"src/write.rs","assertion_line":1298,"expression":"msg"},"snapshot":"Error: can't compare apples with oranges\n ,-[ :1:1 ]\n |\n 1 | apple == orange;\n | ^^|^^ ^^^|^^ \n | `-------------- This is an apple\n | | | \n | `-------------- Have I mentioned that this is an apple?\n | | | \n | `-------------- No really, have I mentioned that?\n | | \n | `---- This is an orange\n | | \n | `---- Have I mentioned that this is an orange?\n | | \n | `---- No really, have I mentioned that?\n---'\n"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error: can't compare apples with oranges\n ,-[:1:1]\n |\n 1 | apple == orange;\n | ^^|^^ ^^^|^^\n | `-------------- This is an apple\n | | |\n | `-------------- Have I mentioned that this is an apple?\n | | |\n | `-------------- No really, have I mentioned that?\n | |\n | `---- This is an orange\n | |\n | `---- Have I mentioned that this is an orange?\n | |\n | `---- No really, have I mentioned that?\n---'"}} -{"run_id":"1730157055-637288002","line":978,"new":{"module_name":"ariadne__write__tests","snapshot_name":"two_labels_without_messages","metadata":{"source":"src/write.rs","assertion_line":978,"expression":"msg"},"snapshot":"Error: can't compare apples with oranges\n ,-[ :1:1 ]\n |\n 1 | apple == orange;\n---'\n"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error: can't compare apples with oranges\n ,-[:1:1]\n |\n 1 | apple == orange;\n---'"}} -{"run_id":"1730157055-637288002","line":1271,"new":{"module_name":"ariadne__write__tests","snapshot_name":"partially_overlapping_labels","metadata":{"source":"src/write.rs","assertion_line":1271,"expression":"msg"},"snapshot":"Error: \n ,-[ :1:1 ]\n |\n 1 | https://example.com/\n | ^^|^^^^^^^|^^^^^^^^^ \n | `------------------- scheme\n | | \n | `----------- URL\n---'\n"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error:\n ,-[:1:1]\n |\n 1 | https://example.com/\n | ^^|^^^^^^^|^^^^^^^^^\n | `------------------- scheme\n | |\n | `----------- URL\n---'"}} -{"run_id":"1730157055-637288002","line":998,"new":{"module_name":"ariadne__write__tests","snapshot_name":"two_labels_with_messages","metadata":{"source":"src/write.rs","assertion_line":998,"expression":"msg"},"snapshot":"Error: can't compare apples with oranges\n ,-[ :1:1 ]\n |\n 1 | apple == orange;\n | ^^|^^ ^^^|^^ \n | `-------------- This is an apple\n | | \n | `---- This is an orange\n---'\n"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error: can't compare apples with oranges\n ,-[:1:1]\n |\n 1 | apple == orange;\n | ^^|^^ ^^^|^^\n | `-------------- This is an apple\n | |\n | `---- This is an orange\n---'"}} -{"run_id":"1730157606-811403410","line":1337,"new":{"module_name":"ariadne__write__tests","snapshot_name":"note","metadata":{"source":"src/write.rs","assertion_line":1337,"expression":"msg"},"snapshot":"Error: can't compare apples with oranges ,-[ :1:1 ] | 1 | apple == orange; | ^^|^^ ^^^|^^ | `-------------- This is an apple | | | `---- This is an orange | | Note: stop trying ... this is a fruitless endeavor---'"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error: can't compare apples with oranges\n ,-[:1:1]\n |\n 1 | apple == orange;\n | ^^|^^ ^^^|^^\n | `-------------- This is an apple\n | |\n | `---- This is an orange\n |\n | Note: stop trying ... this is a fruitless endeavor\n---'"}} -{"run_id":"1730157606-811403410","line":969,"new":null,"old":null} -{"run_id":"1730157606-811403410","line":1053,"new":{"module_name":"ariadne__write__tests","snapshot_name":"byte_label","metadata":{"source":"src/write.rs","assertion_line":1053,"expression":"msg"},"snapshot":"Error: can't compare äpplës with örängës ,-[ :1:1 ] | 1 | äpplë == örängë; | ^^|^^ ^^^|^^ | `-------------- This is an äpplë | | | `---- This is an örängë---'"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error: can't compare äpplës with örängës\n ,-[:1:1]\n |\n 1 | äpplë == örängë;\n | ^^|^^ ^^^|^^\n | `-------------- This is an äpplë\n | |\n | `---- This is an örängë\n---'"}} -{"run_id":"1730157606-811403410","line":1441,"new":{"module_name":"ariadne__write__tests","snapshot_name":"multi_notes_single_lines","metadata":{"source":"src/write.rs","assertion_line":1441,"expression":"msg"},"snapshot":"Error: can't compare apples with oranges ,-[ :1:1 ] | 1 | apple == orange; | ^^^^^^^|^^^^^^^ | `--------- This is a strange comparison | | Note 1: No need to try, they can't be compared. | | Note 2: Yeah, really, please stop.---'"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error: can't compare apples with oranges\n ,-[:1:1]\n |\n 1 | apple == orange;\n | ^^^^^^^|^^^^^^^\n | `--------- This is a strange comparison\n |\n | Note 1: No need to try, they can't be compared.\n |\n | Note 2: Yeah, really, please stop.\n---'"}} -{"run_id":"1730157606-811403410","line":1144,"new":{"module_name":"ariadne__write__tests","snapshot_name":"empty_input","metadata":{"source":"src/write.rs","assertion_line":1144,"expression":"msg"},"snapshot":"Error: unexpected end of file ,-[ :1:1 ] | 1 | | | | `- No more fruit!---'"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error: unexpected end of file\n ,-[:1:1]\n |\n 1 |\n | |\n | `- No more fruit!\n---'"}} -{"run_id":"1730157606-811403410","line":1363,"new":{"module_name":"ariadne__write__tests","snapshot_name":"help","metadata":{"source":"src/write.rs","assertion_line":1363,"expression":"msg"},"snapshot":"Error: can't compare apples with oranges ,-[ :1:1 ] | 1 | apple == orange; | ^^|^^ ^^^|^^ | `-------------- This is an apple | | | `---- This is an orange | | Help: have you tried peeling the orange?---'"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error: can't compare apples with oranges\n ,-[:1:1]\n |\n 1 | apple == orange;\n | ^^|^^ ^^^|^^\n | `-------------- This is an apple\n | |\n | `---- This is an orange\n |\n | Help: have you tried peeling the orange?\n---'"}} -{"run_id":"1730157606-811403410","line":1102,"new":{"module_name":"ariadne__write__tests","snapshot_name":"label_at_end_of_long_line","metadata":{"source":"src/write.rs","assertion_line":1102,"expression":"msg"},"snapshot":"Error: can't compare apples with oranges ,-[ :1:1 ] | 1 | apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == orange | ^^|^^ | `---- This is an orange---'"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error: can't compare apples with oranges\n ,-[:1:1]\n |\n 1 | apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == orange\n | ^^|^^\n | `---- This is an orange\n---'"}} -{"run_id":"1730157606-811403410","line":1255,"new":{"module_name":"ariadne__write__tests","snapshot_name":"multiline_label","metadata":{"source":"src/write.rs","assertion_line":1255,"expression":"msg"},"snapshot":"Error: ,-[ :1:1 ] | 1 | ,-> apple : : 3 | |-> orange | | | `----------- illegal comparison---'"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error:\n ,-[:1:1]\n |\n 1 | ,-> apple\n : :\n 3 | |-> orange\n | |\n | `----------- illegal comparison\n---'"}} -{"run_id":"1730157606-811403410","line":1166,"new":{"module_name":"ariadne__write__tests","snapshot_name":"empty_input_help","metadata":{"source":"src/write.rs","assertion_line":1166,"expression":"msg"},"snapshot":"Error: unexpected end of file ,-[ :1:1 ] | 1 | | | | `- No more fruit! | | Help: have you tried going to the farmer's market?---'"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error: unexpected end of file\n ,-[:1:1]\n |\n 1 |\n | |\n | `- No more fruit!\n |\n | Help: have you tried going to the farmer's market?\n---'"}} -{"run_id":"1730157606-811403410","line":1215,"new":{"module_name":"ariadne__write__tests","snapshot_name":"empty_input_help_note","metadata":{"source":"src/write.rs","assertion_line":1215,"expression":"msg"},"snapshot":"Error: unexpected end of file ,-[ :1:1 ] | 1 | | | | `- No more fruit! | | Help: have you tried going to the farmer's market? | | Note: eat your greens!---'"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error: unexpected end of file\n ,-[:1:1]\n |\n 1 |\n | |\n | `- No more fruit!\n |\n | Help: have you tried going to the farmer's market?\n |\n | Note: eat your greens!\n---'"}} -{"run_id":"1730157606-811403410","line":1390,"new":{"module_name":"ariadne__write__tests","snapshot_name":"help_and_note","metadata":{"source":"src/write.rs","assertion_line":1390,"expression":"msg"},"snapshot":"Error: can't compare apples with oranges ,-[ :1:1 ] | 1 | apple == orange; | ^^|^^ ^^^|^^ | `-------------- This is an apple | | | `---- This is an orange | | Help: have you tried peeling the orange? | | Note: stop trying ... this is a fruitless endeavor---'"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error: can't compare apples with oranges\n ,-[:1:1]\n |\n 1 | apple == orange;\n | ^^|^^ ^^^|^^\n | `-------------- This is an apple\n | |\n | `---- This is an orange\n |\n | Help: have you tried peeling the orange?\n |\n | Note: stop trying ... this is a fruitless endeavor\n---'"}} -{"run_id":"1730157606-811403410","line":1077,"new":{"module_name":"ariadne__write__tests","snapshot_name":"byte_column","metadata":{"source":"src/write.rs","assertion_line":1077,"expression":"msg"},"snapshot":"Error: can't compare äpplës with örängës ,-[ :1:10 ] | 1 | äpplë == örängë; | ^^|^^ ^^^|^^ | `-------------- This is an äpplë | | | `---- This is an örängë---'"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error: can't compare äpplës with örängës\n ,-[:1:10]\n |\n 1 | äpplë == örängë;\n | ^^|^^ ^^^|^^\n | `-------------- This is an äpplë\n | |\n | `---- This is an örängë\n---'"}} -{"run_id":"1730157606-811403410","line":1190,"new":{"module_name":"ariadne__write__tests","snapshot_name":"empty_input_note","metadata":{"source":"src/write.rs","assertion_line":1190,"expression":"msg"},"snapshot":"Error: unexpected end of file ,-[ :1:1 ] | 1 | | | | `- No more fruit! | | Note: eat your greens!---'"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error: unexpected end of file\n ,-[:1:1]\n |\n 1 |\n | |\n | `- No more fruit!\n |\n | Note: eat your greens!\n---'"}} -{"run_id":"1730157606-811403410","line":1029,"new":{"module_name":"ariadne__write__tests","snapshot_name":"multi_byte_chars","metadata":{"source":"src/write.rs","assertion_line":1029,"expression":"msg"},"snapshot":"Error: can't compare äpplës with örängës ,-[ :1:1 ] | 1 | äpplë == örängë; | ^^|^^ ^^^|^^ | `-------------- This is an äpplë | | | `---- This is an örängë---'"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error: can't compare äpplës with örängës\n ,-[:1:1]\n |\n 1 | äpplë == örängë;\n | ^^|^^ ^^^|^^\n | `-------------- This is an äpplë\n | |\n | `---- This is an örängë\n---'"}} -{"run_id":"1730157606-811403410","line":1467,"new":{"module_name":"ariadne__write__tests","snapshot_name":"multi_notes_multi_lines","metadata":{"source":"src/write.rs","assertion_line":1467,"expression":"msg"},"snapshot":"Error: can't compare apples with oranges ,-[ :1:1 ] | 1 | apple == orange; | ^^^^^^^|^^^^^^^ | `--------- This is a strange comparison | | Note 1: No need to try, they can't be compared. | | Note 2: Yeah, really, please stop. | It has no resemblance.---'"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error: can't compare apples with oranges\n ,-[:1:1]\n |\n 1 | apple == orange;\n | ^^^^^^^|^^^^^^^\n | `--------- This is a strange comparison\n |\n | Note 1: No need to try, they can't be compared.\n |\n | Note 2: Yeah, really, please stop.\n | It has no resemblance.\n---'"}} -{"run_id":"1730157606-811403410","line":1123,"new":{"module_name":"ariadne__write__tests","snapshot_name":"label_of_width_zero_at_end_of_line","metadata":{"source":"src/write.rs","assertion_line":1123,"expression":"msg"},"snapshot":"Error: unexpected end of file ,-[ :1:1 ] | 1 | apple == | | | `- Unexpected end of file---'"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error: unexpected end of file\n ,-[:1:1]\n |\n 1 | apple ==\n | |\n | `- Unexpected end of file\n---'"}} -{"run_id":"1730157606-811403410","line":1305,"new":{"module_name":"ariadne__write__tests","snapshot_name":"multiple_labels_same_span","metadata":{"source":"src/write.rs","assertion_line":1305,"expression":"msg"},"snapshot":"Error: can't compare apples with oranges ,-[ :1:1 ] | 1 | apple == orange; | ^^|^^ ^^^|^^ | `-------------- This is an apple | | | | `-------------- Have I mentioned that this is an apple? | | | | `-------------- No really, have I mentioned that? | | | `---- This is an orange | | | `---- Have I mentioned that this is an orange? | | | `---- No really, have I mentioned that?---'"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error: can't compare apples with oranges\n ,-[:1:1]\n |\n 1 | apple == orange;\n | ^^|^^ ^^^|^^\n | `-------------- This is an apple\n | | |\n | `-------------- Have I mentioned that this is an apple?\n | | |\n | `-------------- No really, have I mentioned that?\n | |\n | `---- This is an orange\n | |\n | `---- Have I mentioned that this is an orange?\n | |\n | `---- No really, have I mentioned that?\n---'"}} -{"run_id":"1730157606-811403410","line":1278,"new":{"module_name":"ariadne__write__tests","snapshot_name":"partially_overlapping_labels","metadata":{"source":"src/write.rs","assertion_line":1278,"expression":"msg"},"snapshot":"Error: ,-[ :1:1 ] | 1 | https://example.com/ | ^^|^^^^^^^|^^^^^^^^^ | `------------------- scheme | | | `----------- URL---'"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error:\n ,-[:1:1]\n |\n 1 | https://example.com/\n | ^^|^^^^^^^|^^^^^^^^^\n | `------------------- scheme\n | |\n | `----------- URL\n---'"}} -{"run_id":"1730157606-811403410","line":1005,"new":{"module_name":"ariadne__write__tests","snapshot_name":"two_labels_with_messages","metadata":{"source":"src/write.rs","assertion_line":1005,"expression":"msg"},"snapshot":"Error: can't compare apples with oranges ,-[ :1:1 ] | 1 | apple == orange; | ^^|^^ ^^^|^^ | `-------------- This is an apple | | | `---- This is an orange---'"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error: can't compare apples with oranges\n ,-[:1:1]\n |\n 1 | apple == orange;\n | ^^|^^ ^^^|^^\n | `-------------- This is an apple\n | |\n | `---- This is an orange\n---'"}} -{"run_id":"1730157606-811403410","line":985,"new":{"module_name":"ariadne__write__tests","snapshot_name":"two_labels_without_messages","metadata":{"source":"src/write.rs","assertion_line":985,"expression":"msg"},"snapshot":"Error: can't compare apples with oranges ,-[ :1:1 ] | 1 | apple == orange;---'"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error: can't compare apples with oranges\n ,-[:1:1]\n |\n 1 | apple == orange;\n---'"}} -{"run_id":"1730157606-811403410","line":1417,"new":{"module_name":"ariadne__write__tests","snapshot_name":"single_note_single_line","metadata":{"source":"src/write.rs","assertion_line":1417,"expression":"msg"},"snapshot":"Error: can't compare apples with oranges ,-[ :1:1 ] | 1 | apple == orange; | ^^^^^^^|^^^^^^^ | `--------- This is a strange comparison | | Note: No need to try, they can't be compared.---'"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error: can't compare apples with oranges\n ,-[:1:1]\n |\n 1 | apple == orange;\n | ^^^^^^^|^^^^^^^\n | `--------- This is a strange comparison\n |\n | Note: No need to try, they can't be compared.\n---'"}} -{"run_id":"1730157623-892722616","line":1337,"new":{"module_name":"ariadne__write__tests","snapshot_name":"note","metadata":{"source":"src/write.rs","assertion_line":1337,"expression":"msg"},"snapshot":"Error: can't compare apples with oranges\n ,-[ :1:1 ]\n |\n 1 | apple == orange;\n | ^^|^^ ^^^|^^\n | `-------------- This is an apple\n | |\n | `---- This is an orange\n |\n | Note: stop trying ... this is a fruitless endeavor\n---'\n"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error: can't compare apples with oranges\n ,-[:1:1]\n |\n 1 | apple == orange;\n | ^^|^^ ^^^|^^\n | `-------------- This is an apple\n | |\n | `---- This is an orange\n |\n | Note: stop trying ... this is a fruitless endeavor\n---'"}} -{"run_id":"1730157623-892722616","line":969,"new":null,"old":null} -{"run_id":"1730157623-892722616","line":1029,"new":{"module_name":"ariadne__write__tests","snapshot_name":"multi_byte_chars","metadata":{"source":"src/write.rs","assertion_line":1029,"expression":"msg"},"snapshot":"Error: can't compare äpplës with örängës\n ,-[ :1:1 ]\n |\n 1 | äpplë == örängë;\n | ^^|^^ ^^^|^^\n | `-------------- This is an äpplë\n | |\n | `---- This is an örängë\n---'\n"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error: can't compare äpplës with örängës\n ,-[:1:1]\n |\n 1 | äpplë == örängë;\n | ^^|^^ ^^^|^^\n | `-------------- This is an äpplë\n | |\n | `---- This is an örängë\n---'"}} -{"run_id":"1730157623-892722616","line":1255,"new":{"module_name":"ariadne__write__tests","snapshot_name":"multiline_label","metadata":{"source":"src/write.rs","assertion_line":1255,"expression":"msg"},"snapshot":"Error:\n ,-[ :1:1 ]\n |\n 1 | ,-> apple\n : :\n 3 | |-> orange\n | |\n | `----------- illegal comparison\n---'\n"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error:\n ,-[:1:1]\n |\n 1 | ,-> apple\n : :\n 3 | |-> orange\n | |\n | `----------- illegal comparison\n---'"}} -{"run_id":"1730157623-892722616","line":1077,"new":{"module_name":"ariadne__write__tests","snapshot_name":"byte_column","metadata":{"source":"src/write.rs","assertion_line":1077,"expression":"msg"},"snapshot":"Error: can't compare äpplës with örängës\n ,-[ :1:10 ]\n |\n 1 | äpplë == örängë;\n | ^^|^^ ^^^|^^\n | `-------------- This is an äpplë\n | |\n | `---- This is an örängë\n---'\n"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error: can't compare äpplës with örängës\n ,-[:1:10]\n |\n 1 | äpplë == örängë;\n | ^^|^^ ^^^|^^\n | `-------------- This is an äpplë\n | |\n | `---- This is an örängë\n---'"}} -{"run_id":"1730157623-892722616","line":1390,"new":{"module_name":"ariadne__write__tests","snapshot_name":"help_and_note","metadata":{"source":"src/write.rs","assertion_line":1390,"expression":"msg"},"snapshot":"Error: can't compare apples with oranges\n ,-[ :1:1 ]\n |\n 1 | apple == orange;\n | ^^|^^ ^^^|^^\n | `-------------- This is an apple\n | |\n | `---- This is an orange\n |\n | Help: have you tried peeling the orange?\n |\n | Note: stop trying ... this is a fruitless endeavor\n---'\n"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error: can't compare apples with oranges\n ,-[:1:1]\n |\n 1 | apple == orange;\n | ^^|^^ ^^^|^^\n | `-------------- This is an apple\n | |\n | `---- This is an orange\n |\n | Help: have you tried peeling the orange?\n |\n | Note: stop trying ... this is a fruitless endeavor\n---'"}} -{"run_id":"1730157623-892722616","line":1102,"new":{"module_name":"ariadne__write__tests","snapshot_name":"label_at_end_of_long_line","metadata":{"source":"src/write.rs","assertion_line":1102,"expression":"msg"},"snapshot":"Error: can't compare apples with oranges\n ,-[ :1:1 ]\n |\n 1 | apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == orange\n | ^^|^^\n | `---- This is an orange\n---'\n"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error: can't compare apples with oranges\n ,-[:1:1]\n |\n 1 | apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == orange\n | ^^|^^\n | `---- This is an orange\n---'"}} -{"run_id":"1730157623-892722616","line":1053,"new":{"module_name":"ariadne__write__tests","snapshot_name":"byte_label","metadata":{"source":"src/write.rs","assertion_line":1053,"expression":"msg"},"snapshot":"Error: can't compare äpplës with örängës\n ,-[ :1:1 ]\n |\n 1 | äpplë == örängë;\n | ^^|^^ ^^^|^^\n | `-------------- This is an äpplë\n | |\n | `---- This is an örängë\n---'\n"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error: can't compare äpplës with örängës\n ,-[:1:1]\n |\n 1 | äpplë == örängë;\n | ^^|^^ ^^^|^^\n | `-------------- This is an äpplë\n | |\n | `---- This is an örängë\n---'"}} -{"run_id":"1730157623-892722616","line":1190,"new":{"module_name":"ariadne__write__tests","snapshot_name":"empty_input_note","metadata":{"source":"src/write.rs","assertion_line":1190,"expression":"msg"},"snapshot":"Error: unexpected end of file\n ,-[ :1:1 ]\n |\n 1 |\n | |\n | `- No more fruit!\n |\n | Note: eat your greens!\n---'\n"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error: unexpected end of file\n ,-[:1:1]\n |\n 1 |\n | |\n | `- No more fruit!\n |\n | Note: eat your greens!\n---'"}} -{"run_id":"1730157623-892722616","line":1144,"new":{"module_name":"ariadne__write__tests","snapshot_name":"empty_input","metadata":{"source":"src/write.rs","assertion_line":1144,"expression":"msg"},"snapshot":"Error: unexpected end of file\n ,-[ :1:1 ]\n |\n 1 |\n | |\n | `- No more fruit!\n---'\n"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error: unexpected end of file\n ,-[:1:1]\n |\n 1 |\n | |\n | `- No more fruit!\n---'"}} -{"run_id":"1730157623-892722616","line":1441,"new":{"module_name":"ariadne__write__tests","snapshot_name":"multi_notes_single_lines","metadata":{"source":"src/write.rs","assertion_line":1441,"expression":"msg"},"snapshot":"Error: can't compare apples with oranges\n ,-[ :1:1 ]\n |\n 1 | apple == orange;\n | ^^^^^^^|^^^^^^^\n | `--------- This is a strange comparison\n |\n | Note 1: No need to try, they can't be compared.\n |\n | Note 2: Yeah, really, please stop.\n---'\n"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error: can't compare apples with oranges\n ,-[:1:1]\n |\n 1 | apple == orange;\n | ^^^^^^^|^^^^^^^\n | `--------- This is a strange comparison\n |\n | Note 1: No need to try, they can't be compared.\n |\n | Note 2: Yeah, really, please stop.\n---'"}} -{"run_id":"1730157623-892722616","line":1363,"new":{"module_name":"ariadne__write__tests","snapshot_name":"help","metadata":{"source":"src/write.rs","assertion_line":1363,"expression":"msg"},"snapshot":"Error: can't compare apples with oranges\n ,-[ :1:1 ]\n |\n 1 | apple == orange;\n | ^^|^^ ^^^|^^\n | `-------------- This is an apple\n | |\n | `---- This is an orange\n |\n | Help: have you tried peeling the orange?\n---'\n"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error: can't compare apples with oranges\n ,-[:1:1]\n |\n 1 | apple == orange;\n | ^^|^^ ^^^|^^\n | `-------------- This is an apple\n | |\n | `---- This is an orange\n |\n | Help: have you tried peeling the orange?\n---'"}} -{"run_id":"1730157623-892722616","line":1166,"new":{"module_name":"ariadne__write__tests","snapshot_name":"empty_input_help","metadata":{"source":"src/write.rs","assertion_line":1166,"expression":"msg"},"snapshot":"Error: unexpected end of file\n ,-[ :1:1 ]\n |\n 1 |\n | |\n | `- No more fruit!\n |\n | Help: have you tried going to the farmer's market?\n---'\n"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error: unexpected end of file\n ,-[:1:1]\n |\n 1 |\n | |\n | `- No more fruit!\n |\n | Help: have you tried going to the farmer's market?\n---'"}} -{"run_id":"1730157623-892722616","line":1123,"new":{"module_name":"ariadne__write__tests","snapshot_name":"label_of_width_zero_at_end_of_line","metadata":{"source":"src/write.rs","assertion_line":1123,"expression":"msg"},"snapshot":"Error: unexpected end of file\n ,-[ :1:1 ]\n |\n 1 | apple ==\n | |\n | `- Unexpected end of file\n---'\n"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error: unexpected end of file\n ,-[:1:1]\n |\n 1 | apple ==\n | |\n | `- Unexpected end of file\n---'"}} -{"run_id":"1730157623-892722616","line":1215,"new":{"module_name":"ariadne__write__tests","snapshot_name":"empty_input_help_note","metadata":{"source":"src/write.rs","assertion_line":1215,"expression":"msg"},"snapshot":"Error: unexpected end of file\n ,-[ :1:1 ]\n |\n 1 |\n | |\n | `- No more fruit!\n |\n | Help: have you tried going to the farmer's market?\n |\n | Note: eat your greens!\n---'\n"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error: unexpected end of file\n ,-[:1:1]\n |\n 1 |\n | |\n | `- No more fruit!\n |\n | Help: have you tried going to the farmer's market?\n |\n | Note: eat your greens!\n---'"}} -{"run_id":"1730157623-892722616","line":1467,"new":{"module_name":"ariadne__write__tests","snapshot_name":"multi_notes_multi_lines","metadata":{"source":"src/write.rs","assertion_line":1467,"expression":"msg"},"snapshot":"Error: can't compare apples with oranges\n ,-[ :1:1 ]\n |\n 1 | apple == orange;\n | ^^^^^^^|^^^^^^^\n | `--------- This is a strange comparison\n |\n | Note 1: No need to try, they can't be compared.\n |\n | Note 2: Yeah, really, please stop.\n | It has no resemblance.\n---'\n"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error: can't compare apples with oranges\n ,-[:1:1]\n |\n 1 | apple == orange;\n | ^^^^^^^|^^^^^^^\n | `--------- This is a strange comparison\n |\n | Note 1: No need to try, they can't be compared.\n |\n | Note 2: Yeah, really, please stop.\n | It has no resemblance.\n---'"}} -{"run_id":"1730157623-892722616","line":1305,"new":{"module_name":"ariadne__write__tests","snapshot_name":"multiple_labels_same_span","metadata":{"source":"src/write.rs","assertion_line":1305,"expression":"msg"},"snapshot":"Error: can't compare apples with oranges\n ,-[ :1:1 ]\n |\n 1 | apple == orange;\n | ^^|^^ ^^^|^^\n | `-------------- This is an apple\n | | |\n | `-------------- Have I mentioned that this is an apple?\n | | |\n | `-------------- No really, have I mentioned that?\n | |\n | `---- This is an orange\n | |\n | `---- Have I mentioned that this is an orange?\n | |\n | `---- No really, have I mentioned that?\n---'\n"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error: can't compare apples with oranges\n ,-[:1:1]\n |\n 1 | apple == orange;\n | ^^|^^ ^^^|^^\n | `-------------- This is an apple\n | | |\n | `-------------- Have I mentioned that this is an apple?\n | | |\n | `-------------- No really, have I mentioned that?\n | |\n | `---- This is an orange\n | |\n | `---- Have I mentioned that this is an orange?\n | |\n | `---- No really, have I mentioned that?\n---'"}} -{"run_id":"1730157623-892722616","line":1278,"new":{"module_name":"ariadne__write__tests","snapshot_name":"partially_overlapping_labels","metadata":{"source":"src/write.rs","assertion_line":1278,"expression":"msg"},"snapshot":"Error:\n ,-[ :1:1 ]\n |\n 1 | https://example.com/\n | ^^|^^^^^^^|^^^^^^^^^\n | `------------------- scheme\n | |\n | `----------- URL\n---'\n"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error:\n ,-[:1:1]\n |\n 1 | https://example.com/\n | ^^|^^^^^^^|^^^^^^^^^\n | `------------------- scheme\n | |\n | `----------- URL\n---'"}} -{"run_id":"1730157623-892722616","line":985,"new":{"module_name":"ariadne__write__tests","snapshot_name":"two_labels_without_messages","metadata":{"source":"src/write.rs","assertion_line":985,"expression":"msg"},"snapshot":"Error: can't compare apples with oranges\n ,-[ :1:1 ]\n |\n 1 | apple == orange;\n---'\n"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error: can't compare apples with oranges\n ,-[:1:1]\n |\n 1 | apple == orange;\n---'"}} -{"run_id":"1730157623-892722616","line":1417,"new":{"module_name":"ariadne__write__tests","snapshot_name":"single_note_single_line","metadata":{"source":"src/write.rs","assertion_line":1417,"expression":"msg"},"snapshot":"Error: can't compare apples with oranges\n ,-[ :1:1 ]\n |\n 1 | apple == orange;\n | ^^^^^^^|^^^^^^^\n | `--------- This is a strange comparison\n |\n | Note: No need to try, they can't be compared.\n---'\n"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error: can't compare apples with oranges\n ,-[:1:1]\n |\n 1 | apple == orange;\n | ^^^^^^^|^^^^^^^\n | `--------- This is a strange comparison\n |\n | Note: No need to try, they can't be compared.\n---'"}} -{"run_id":"1730157623-892722616","line":1005,"new":{"module_name":"ariadne__write__tests","snapshot_name":"two_labels_with_messages","metadata":{"source":"src/write.rs","assertion_line":1005,"expression":"msg"},"snapshot":"Error: can't compare apples with oranges\n ,-[ :1:1 ]\n |\n 1 | apple == orange;\n | ^^|^^ ^^^|^^\n | `-------------- This is an apple\n | |\n | `---- This is an orange\n---'\n"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error: can't compare apples with oranges\n ,-[:1:1]\n |\n 1 | apple == orange;\n | ^^|^^ ^^^|^^\n | `-------------- This is an apple\n | |\n | `---- This is an orange\n---'"}} -{"run_id":"1730157656-864763666","line":1144,"new":null,"old":null} -{"run_id":"1730157656-864763666","line":1166,"new":null,"old":null} -{"run_id":"1730157656-864763666","line":1053,"new":null,"old":null} -{"run_id":"1730157656-864763666","line":1190,"new":null,"old":null} -{"run_id":"1730157656-864763666","line":1467,"new":null,"old":null} -{"run_id":"1730157656-864763666","line":1390,"new":null,"old":null} -{"run_id":"1730157656-864763666","line":1255,"new":null,"old":null} -{"run_id":"1730157656-864763666","line":1441,"new":null,"old":null} -{"run_id":"1730157656-864763666","line":1363,"new":null,"old":null} -{"run_id":"1730157656-864763666","line":1029,"new":null,"old":null} -{"run_id":"1730157656-864763666","line":1123,"new":null,"old":null} -{"run_id":"1730157656-864763666","line":1337,"new":null,"old":null} -{"run_id":"1730157656-864763666","line":1305,"new":null,"old":null} -{"run_id":"1730157656-864763666","line":1215,"new":null,"old":null} -{"run_id":"1730157656-864763666","line":1102,"new":null,"old":null} -{"run_id":"1730157656-864763666","line":1417,"new":null,"old":null} -{"run_id":"1730157656-864763666","line":969,"new":null,"old":null} -{"run_id":"1730157656-864763666","line":1278,"new":null,"old":null} -{"run_id":"1730157656-864763666","line":1005,"new":null,"old":null} -{"run_id":"1730157656-864763666","line":985,"new":null,"old":null} -{"run_id":"1730157656-864763666","line":1077,"new":{"module_name":"ariadne__write__tests","snapshot_name":"byte_column","metadata":{"source":"src/write.rs","assertion_line":1077,"expression":"msg"},"snapshot":"Error: can't compare äpplës with örängës\n ,-[ :1:10 ]\n |\n 1 | äpplë == örängë;\n | ^^|^^ ^^^|^^\n | `-------------- This is an äpplë\n | |\n | `---- This is an örängë\n---'\n"},"old":{"module_name":"ariadne__write__tests","metadata":{},"snapshot":"Error: can't compare äpplës with örängës\n ,-[:1:10]\n |\n 1 | äpplë == örängë;\n | ^^|^^ ^^^|^^\n | `-------------- This is an äpplë\n | |\n | `---- This is an örängë\n---'"}} -{"run_id":"1730157667-704746756","line":1077,"new":null,"old":null} -{"run_id":"1730157667-704746756","line":1053,"new":null,"old":null} -{"run_id":"1730157667-704746756","line":1144,"new":null,"old":null} -{"run_id":"1730157667-704746756","line":1166,"new":null,"old":null} -{"run_id":"1730157667-704746756","line":1190,"new":null,"old":null} -{"run_id":"1730157667-704746756","line":1363,"new":null,"old":null} -{"run_id":"1730157667-704746756","line":1390,"new":null,"old":null} -{"run_id":"1730157667-704746756","line":1123,"new":null,"old":null} -{"run_id":"1730157667-704746756","line":1441,"new":null,"old":null} -{"run_id":"1730157667-704746756","line":1467,"new":null,"old":null} -{"run_id":"1730157667-704746756","line":1215,"new":null,"old":null} -{"run_id":"1730157667-704746756","line":1337,"new":null,"old":null} -{"run_id":"1730157667-704746756","line":1255,"new":null,"old":null} -{"run_id":"1730157667-704746756","line":1305,"new":null,"old":null} -{"run_id":"1730157667-704746756","line":1029,"new":null,"old":null} -{"run_id":"1730157667-704746756","line":1102,"new":null,"old":null} -{"run_id":"1730157667-704746756","line":969,"new":null,"old":null} -{"run_id":"1730157667-704746756","line":1278,"new":null,"old":null} -{"run_id":"1730157667-704746756","line":1005,"new":null,"old":null} -{"run_id":"1730157667-704746756","line":1417,"new":null,"old":null} -{"run_id":"1730157667-704746756","line":985,"new":null,"old":null} diff --git a/src/display.rs b/src/display.rs index d074009..d37a015 100644 --- a/src/display.rs +++ b/src/display.rs @@ -1,30 +1,24 @@ use std::fmt::{self, Display}; #[derive(Copy, Clone, Debug)] -pub struct Show(pub T); +pub(crate) struct Show(pub Option); -impl Display for Show> { +impl Display for Show { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { match &self.0 { - Some(x) => write!(f, "{}", x), + Some(x) => write!(f, "{x}"), None => Ok(()), } } } -impl<'a, T, F: Fn(&mut fmt::Formatter, &'a T) -> fmt::Result> Display for Show<(&'a [T], F)> { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - for x in self.0 .0 { - (self.0 .1)(f, x)?; - } - Ok(()) - } -} +#[derive(Copy, Clone, Debug)] +pub(crate) struct Rept(pub T, pub usize); -impl Display for Show<(T, usize)> { +impl Display for Rept { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - for _ in 0..self.0 .1 { - write!(f, "{}", self.0 .0)?; + for _ in 0..self.1 { + write!(f, "{}", self.0)?; } Ok(()) } diff --git a/src/draw.rs b/src/draw.rs index d732dec..fd1abcd 100644 --- a/src/draw.rs +++ b/src/draw.rs @@ -76,6 +76,22 @@ impl Characters { underline: '^', } } + + pub(crate) fn arrow_bend(&self, is_top: bool) -> char { + if is_top { + self.ltop + } else { + self.lbot + } + } + + pub(crate) fn vbar(&self, is_gap: bool) -> char { + if is_gap { + self.vbar_gap + } else { + self.vbar + } + } } /// Output stream to check for whether color is enabled. diff --git a/src/lib.rs b/src/lib.rs index ededa5f..130612f 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -267,13 +267,24 @@ pub enum ReportKind<'a> { Custom(&'a str, Color), } +impl ReportKind<'_> { + fn color(&self, config: &Config) -> Option { + match self { + ReportKind::Error => config.error_color(), + ReportKind::Warning => config.warning_color(), + ReportKind::Advice => config.advice_color(), + ReportKind::Custom(_, color) => Some(*color), + } + } +} + impl fmt::Display for ReportKind<'_> { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { match self { ReportKind::Error => write!(f, "Error"), ReportKind::Warning => write!(f, "Warning"), ReportKind::Advice => write!(f, "Advice"), - ReportKind::Custom(s, _) => write!(f, "{}", s), + ReportKind::Custom(s, _) => write!(f, "{s}"), } } } diff --git a/src/source.rs b/src/source.rs index eb0b8c3..ab22b9f 100644 --- a/src/source.rs +++ b/src/source.rs @@ -209,7 +209,7 @@ impl> Source { /// Get the line that the given offset appears on, and the line/column numbers of the offset. /// /// Note that the line/column numbers are zero-indexed. - pub fn get_offset_line(&self, offset: usize) -> Option<(Line, usize, usize)> { + pub fn get_offset_line(&self, offset: usize) -> Option { if offset <= self.len { let idx = self .lines @@ -222,7 +222,11 @@ impl> Source { offset, line.offset ); - Some((line, idx, offset - line.offset)) + Some(Location { + line, + line_idx: idx, + col_idx: offset - line.offset, + }) } else { None } @@ -231,7 +235,7 @@ impl> Source { /// Get the line that the given byte offset appears on, and the line/byte column numbers of the offset. /// /// Note that the line/column numbers are zero-indexed. - pub fn get_byte_line(&self, byte_offset: usize) -> Option<(Line, usize, usize)> { + pub fn get_byte_line(&self, byte_offset: usize) -> Option { if byte_offset <= self.byte_len { let idx = self .lines @@ -244,7 +248,11 @@ impl> Source { byte_offset, line.byte_offset ); - Some((line, idx, byte_offset - line.byte_offset)) + Some(Location { + line, + line_idx: idx, + col_idx: byte_offset - line.byte_offset, + }) } else { None } @@ -255,10 +263,12 @@ impl> Source { /// The resulting range is guaranteed to contain valid line indices (i.e: those that can be used for /// [`Source::line`]). pub fn get_line_range(&self, span: &S) -> Range { - let start = self.get_offset_line(span.start()).map_or(0, |(_, l, _)| l); + let start = self + .get_offset_line(span.start()) + .map_or(0, |location| location.line_idx); let end = self .get_offset_line(span.end().saturating_sub(1).max(span.start())) - .map_or(self.lines.len(), |(_, l, _)| l + 1); + .map_or(self.lines.len(), |location| location.line_idx + 1); start..end } @@ -268,6 +278,13 @@ impl> Source { } } +#[derive(Debug, Clone, PartialEq, Eq, Hash)] +pub struct Location { + pub line: Line, + pub line_idx: usize, + pub col_idx: usize, +} + impl> Cache<()> for Source { type Storage = I; diff --git a/src/write.rs b/src/write.rs index ee7b1d7..4b79255 100644 --- a/src/write.rs +++ b/src/write.rs @@ -1,10 +1,12 @@ +use std::fmt::Display; use std::io; use std::ops::Range; -use crate::{IndexType, LabelDisplay}; +use crate::source::Location; +use crate::{IndexType, LabelDisplay, Source}; use super::draw::{self, StreamAwareFmt, StreamType}; -use super::{Cache, CharSet, LabelAttach, Report, ReportKind, Show, Span, Write}; +use super::{Cache, CharSet, LabelAttach, Report, Rept, Show, Span, Write}; // A WARNING, FOR ALL YE WHO VENTURE IN HERE // @@ -46,13 +48,8 @@ impl Report<'_, S> { for label in self.labels.iter() { let label_source = label.span.source(); - let src_display = cache.display(label_source); - let src = match cache.fetch(label_source) { - Ok(src) => src, - Err(e) => { - eprintln!("Unable to fetch source '{}': {:?}", Show(src_display), e); - continue; - } + let Some((src, _)) = fetch_source(cache, label_source) else { + continue; }; let given_label_span = label.span.start()..label.span.end(); @@ -63,45 +60,50 @@ impl Report<'_, S> { continue; }; let end_line = if given_label_span.start >= given_label_span.end { - start_line.1 + start_line.line_idx } else { let Some(end_line) = src.get_offset_line(given_label_span.end - 1) else { continue; }; - end_line.1 + end_line.line_idx }; - (given_label_span, start_line.1, end_line) + (given_label_span, start_line.line_idx, end_line) } IndexType::Byte => { - let Some((start_line_obj, start_line, start_byte_col)) = - src.get_byte_line(given_label_span.start) - else { + let Some(start_location) = src.get_byte_line(given_label_span.start) else { continue; }; - let line_text = src.get_line_text(start_line_obj).unwrap(); + let line_text = src.get_line_text(start_location.line).unwrap(); - let num_chars_before_start = line_text[..start_byte_col.min(line_text.len())] + let num_chars_before_start = line_text + [..start_location.col_idx.min(line_text.len())] .chars() .count(); - let start_char_offset = start_line_obj.offset() + num_chars_before_start; + let start_char_offset = start_location.line.offset() + num_chars_before_start; if given_label_span.start >= given_label_span.end { - (start_char_offset..start_char_offset, start_line, start_line) + ( + start_char_offset..start_char_offset, + start_location.line_idx, + start_location.line_idx, + ) } else { // We can subtract 1 from end, because get_byte_line doesn't actually index into the text. let end_pos = given_label_span.end - 1; - let Some((end_line_obj, end_line, end_byte_col)) = - src.get_byte_line(end_pos) - else { + let Some(end_location) = src.get_byte_line(end_pos) else { continue; }; - let end_line_text = src.get_line_text(end_line_obj).unwrap(); + let end_line_text = src.get_line_text(end_location.line).unwrap(); // Have to add 1 back now, so we don't cut a char in two. let num_chars_before_end = - end_line_text[..end_byte_col + 1].chars().count(); - let end_char_offset = end_line_obj.offset() + num_chars_before_end; - - (start_char_offset..end_char_offset, start_line, end_line) + end_line_text[..end_location.col_idx + 1].chars().count(); + let end_char_offset = end_location.line.offset() + num_chars_before_end; + + ( + start_char_offset..end_char_offset, + start_location.line_idx, + end_location.line_idx, + ) } } }; @@ -169,301 +171,234 @@ impl Report<'_, S> { // --- Header --- - let code = self.code.as_ref().map(|c| format!("[{}] ", c)); - let id = format!("{}{}:", Show(code), self.kind); - let kind_color = match self.kind { - ReportKind::Error => self.config.error_color(), - ReportKind::Warning => self.config.warning_color(), - ReportKind::Advice => self.config.advice_color(), - ReportKind::Custom(_, color) => Some(color), - }; - writeln!(w, "{} {}", id.fg(kind_color, s), Show(self.msg.as_ref()))?; + let code = self.code.as_ref().map(|c| format!("[{c}] ")); + let kind_color = self.kind.color(&self.config); + writeln!( + w, + "{}: {}", + format_args!("{}{}", Show(code), self.kind).fg(kind_color, s), + Show(self.msg.as_ref()) + )?; let groups = self.get_source_groups(&mut cache); // Line number maximum width - let line_no_width = groups - .iter() - .filter_map( - |SourceGroup { - char_span, src_id, .. - }| { - let src_name = cache - .display(src_id) - .map(|d| d.to_string()) - .unwrap_or_else(|| "".to_string()); - - let src = match cache.fetch(src_id) { - Ok(src) => src, - Err(e) => { - eprintln!("Unable to fetch source {}: {:?}", src_name, e); - return None; - } - }; + let line_num_width = max_line_num(&groups, &mut cache).map_or(0, nb_digits); - let line_range = src.get_line_range(char_span); - Some( - (1..) - .map(|x| 10u32.pow(x)) - .take_while(|x| line_range.end as u32 / x != 0) - .count() - + 1, - ) - }, + let margin_char = |c: char| c.fg(self.config.margin_color(), s); + + let write_margin = |w: &mut W, idx: usize, is_src_line: bool, is_ellipsis: bool| { + let line_num_margin = if is_src_line && !is_ellipsis { + format!("{:line_num_width$} {}", idx + 1, draw.vbar) + .fg(self.config.margin_color(), s) + } else { + format!( + "{}{}", + Rept(' ', line_num_width + 1), + draw.vbar(is_ellipsis) + ) + .fg(self.config.skipped_margin_color(), s) + }; + + write!( + w, + " {line_num_margin}{}", + Show((!self.config.compact).then_some(' ')), ) - .max() - .unwrap_or(0); + }; + let write_spacer_line = |w: &mut W| { + if !self.config.compact { + writeln!( + w, + "{}{}", + Rept(' ', line_num_width + 2), + margin_char(draw.vbar) + ) + } else { + Ok(()) + } + }; // --- Source sections --- - let groups_len = groups.len(); - for ( - group_idx, - SourceGroup { - src_id, - char_span, - labels, - }, - ) in groups.into_iter().enumerate() - { - let src_name = cache - .display(src_id) - .map(|d| d.to_string()) - .unwrap_or_else(|| "".to_string()); - - let src = match cache.fetch(src_id) { - Ok(src) => src, - Err(e) => { - eprintln!("Unable to fetch source {}: {:?}", src_name, e); - continue; - } + for (group_idx, group) in groups.iter().enumerate() { + let Some((src, src_name)) = fetch_source(&mut cache, group.src_id) else { + // `fetch_source` should have reported the error. + continue; }; - let line_range = src.get_line_range(&char_span); + let line_range = src.get_line_range(&group.char_span); // File name & reference - let location = if src_id == self.span.source() { + let location = if group.src_id == self.span.source() { self.span.start() } else { - labels[0].char_span.start + group.labels[0].char_span.start }; - let line_and_col = match self.config.index_type { - IndexType::Char => src.get_offset_line(location), - IndexType::Byte => src.get_byte_line(location).map(|(line_obj, idx, col)| { - let line_text = src.get_line_text(line_obj).unwrap(); - - let col = line_text[..col.min(line_text.len())].chars().count(); - - (line_obj, idx, col) - }), + let location = Loc( + src, + src_name, + match self.config.index_type { + IndexType::Char => src.get_offset_line(location), + IndexType::Byte => src.get_byte_line(location).map(|location| { + let line_text = src.get_line_text(location.line).unwrap(); + + let col = line_text[..location.col_idx.min(line_text.len())] + .chars() + .count(); + + Location { + line: location.line, + line_idx: location.line_idx, + col_idx: col, + } + }), + }, + ); + let corner_char = if group_idx == 0 { + draw.ltop + } else { + write_spacer_line(&mut w)?; + draw.lcross }; - let (line_no, col_no) = line_and_col - .map(|(_, idx, col)| { - ( - format!("{}", idx + 1 + src.display_line_offset()), - format!("{}", col + 1), - ) - }) - .unwrap_or_else(|| ('?'.to_string(), '?'.to_string())); - let line_ref = format!("{}:{}:{}", src_name, line_no, col_no); writeln!( w, - "{}{}{}{} {} {}", - Show((' ', line_no_width + 2)), - if group_idx == 0 { - draw.ltop - } else { - draw.lcross - } - .fg(self.config.margin_color(), s), - draw.hbar.fg(self.config.margin_color(), s), - draw.lbox.fg(self.config.margin_color(), s), - line_ref, - draw.rbox.fg(self.config.margin_color(), s), + "{}{}{}{} {location} {}", + Rept(' ', line_num_width + 2), + margin_char(corner_char), + margin_char(draw.hbar), + margin_char(draw.lbox), + margin_char(draw.rbox), )?; if !self.config.compact { - writeln!( - w, - "{}{}", - Show((' ', line_no_width + 2)), - draw.vbar.fg(self.config.margin_color(), s) - )?; - } - - struct LineLabel<'a> { - col: usize, - label: &'a LabelInfo<'a>, - multi: bool, - draw_msg: bool, + write_spacer_line(&mut w)?; } // Generate a list of multi-line labels - let mut multi_labels = Vec::new(); - let mut multi_labels_with_message = Vec::new(); - for label_info in &labels { - if matches!(label_info.kind, LabelKind::Multiline) { - multi_labels.push(label_info); - if label_info.display_info.msg.is_some() { - multi_labels_with_message.push(label_info); - } - } - } - - // Sort multiline labels by length - multi_labels.sort_by_key(|m| -(Span::len(&m.char_span) as isize)); - multi_labels_with_message.sort_by_key(|m| -(Span::len(&m.char_span) as isize)); - - let write_margin = |w: &mut W, - idx: usize, - is_line: bool, - is_ellipsis: bool, - draw_labels: bool, - report_row: Option<(usize, bool)>, - line_labels: &[LineLabel], - margin_label: &Option| + let mut multi_labels: Vec<_> = group + .labels + .iter() + .filter(|label_info| matches!(label_info.kind, LabelKind::Multiline)) + .collect(); + // Sort them by length; this also ensures that the next array is sorted. + multi_labels.sort_unstable_by_key(|label_info| !Span::len(&label_info.char_span)); + let multi_labels_with_message: Vec<_> = multi_labels + .iter() + .copied() + .filter(|label_info| label_info.display_info.msg.is_some()) + .collect(); + + let write_margin_and_arrows = |w: &mut W, + idx: usize, + is_src_line: bool, + is_ellipsis: bool, + report_row: Option<(usize, bool)>, + line_labels: &[LineLabel], + margin_label: &Option| -> std::io::Result<()> { - let line_no_margin = if is_line && !is_ellipsis { - let line_no = format!("{}", idx + 1); - format!( - "{}{} {}", - Show((' ', line_no_width - line_no.chars().count())), - line_no, - draw.vbar, - ) - .fg(self.config.margin_color(), s) - } else { - format!( - "{}{}", - Show((' ', line_no_width + 1)), - if is_ellipsis { - draw.vbar_gap - } else { - draw.vbar - } - ) - .fg(self.config.skipped_margin_color(), s) - }; - - write!( - w, - " {}{}", - line_no_margin, - Show(Some(' ').filter(|_| !self.config.compact)), - )?; + write_margin(w, idx, is_src_line, is_ellipsis)?; // Multi-line margins - if draw_labels { - for col in 0..multi_labels_with_message.len() - + (!multi_labels_with_message.is_empty()) as usize + for col in 0..multi_labels_with_message.len() + + (!multi_labels_with_message.is_empty()) as usize + { + let mut corner = None; + let mut hbar: Option<&LabelInfo> = None; + let mut vbar: Option<&LabelInfo> = None; + let mut margin_ptr = None; + + let multi_label = multi_labels_with_message.get(col); + let line_span = src.line(idx).unwrap().span(); + + for (i, label) in multi_labels_with_message + [0..(col + 1).min(multi_labels_with_message.len())] + .iter() + .enumerate() { - let mut corner = None; - let mut hbar: Option<&LabelInfo> = None; - let mut vbar: Option<&LabelInfo> = None; - let mut margin_ptr = None; - - let multi_label = multi_labels_with_message.get(col); - let line_span = src.line(idx).unwrap().span(); + let margin = margin_label.as_ref().filter(|m| m.is_referencing(label)); - for (i, label) in multi_labels_with_message - [0..(col + 1).min(multi_labels_with_message.len())] - .iter() - .enumerate() + if label.char_span.start <= line_span.end + && label.char_span.end > line_span.start { - let margin = margin_label - .as_ref() - .filter(|m| std::ptr::eq(*label, m.label)); - - if label.char_span.start <= line_span.end - && label.char_span.end > line_span.start - { - let is_parent = i != col; - let is_start = line_span.contains(&label.char_span.start); - let is_end = line_span.contains(&label.last_offset()); - - if let Some(margin) = margin.filter(|_| is_line) { - margin_ptr = Some((margin, is_start)); - } else if !is_start && (!is_end || is_line) { - vbar = vbar.or(Some(*label).filter(|_| !is_parent)); - } else if let Some((report_row, is_arrow)) = report_row { - let label_row = line_labels - .iter() - .enumerate() - .find(|(_, l)| std::ptr::eq(*label, l.label)) - .map_or(0, |(r, _)| r); - if report_row == label_row { - if let Some(margin) = margin { - vbar = Some(margin.label).filter(|_| col == i); - if is_start { - continue; - } + let is_parent = i != col; + let is_start = line_span.contains(&label.char_span.start); + let is_end = line_span.contains(&label.last_offset()); + + if let (Some(margin), true) = (margin, is_src_line) { + margin_ptr = Some((margin, is_start)); + } else if !is_start && (!is_end || is_src_line) { + vbar = vbar.or((!is_parent).then_some(*label)); + } else if let Some((report_row, is_arrow)) = report_row { + let label_row = line_labels + .iter() + .enumerate() + .find(|(_, l)| l.is_referencing(label)) + .map_or(0, |(r, _)| r); + if report_row == label_row { + if let Some(margin) = margin { + vbar = (col == i).then_some(margin.label); + if is_start { + continue; } + } - if is_arrow { - hbar = Some(*label); - if !is_parent { - corner = Some((label, is_start)); - } - } else if !is_start { - vbar = vbar.or(Some(*label).filter(|_| !is_parent)); + if is_arrow { + hbar = Some(*label); + if !is_parent { + corner = Some((label, is_start)); } - } else { - vbar = vbar.or(Some(*label).filter(|_| { - !is_parent && (is_start ^ (report_row < label_row)) - })); + } else if !is_start { + vbar = vbar.or((!is_parent).then_some(*label)); } + } else { + vbar = vbar + .or((!is_parent && (is_start ^ (report_row < label_row))) + .then_some(*label)); } } } + } - if let (Some((margin, _is_start)), true) = (margin_ptr, is_line) { - let is_col = - multi_label.map_or(false, |ml| std::ptr::eq(*ml, margin.label)); - let is_limit = col + 1 == multi_labels_with_message.len(); - if !is_col && !is_limit { - hbar = hbar.or(Some(margin.label)); - } + if let (Some((margin, _is_start)), true) = (margin_ptr, is_src_line) { + let is_col = multi_label.map_or(false, |ml| margin.is_referencing(ml)); + let is_limit = col + 1 == multi_labels_with_message.len(); + if !is_col && !is_limit { + hbar = hbar.or(Some(margin.label)); } + } - hbar = hbar.filter(|l| { - margin_label - .as_ref() - .map_or(true, |margin| !std::ptr::eq(margin.label, *l)) - || !is_line - }); - - let (a, b) = if let Some((label, is_start)) = corner { - ( - if is_start { draw.ltop } else { draw.lbot } - .fg(label.display_info.color, s), - draw.hbar.fg(label.display_info.color, s), - ) - } else if let Some(label) = - hbar.filter(|_| vbar.is_some() && !self.config.cross_gap) - { - ( - draw.xbar.fg(label.display_info.color, s), - draw.hbar.fg(label.display_info.color, s), - ) - } else if let Some(label) = hbar { - ( - draw.hbar.fg(label.display_info.color, s), - draw.hbar.fg(label.display_info.color, s), - ) - } else if let Some(label) = vbar { - ( - if is_ellipsis { - draw.vbar_gap + hbar = hbar.filter(|l| { + !margin_label + .as_ref() + .map_or(false, |margin| margin.is_referencing(l)) + || !is_src_line + }); + + let (a, b) = if let Some((label, is_start)) = corner { + ( + Some((draw.arrow_bend(is_start), *label)), + Some((draw.hbar, *label)), + ) + } else if let Some(label) = hbar { + ( + Some(( + if vbar.is_some() && !self.config.cross_gap { + // Crossing with a vertical arrow, and the config allows us to cross them. + draw.xbar } else { - draw.vbar - } - .fg(label.display_info.color, s), - ' '.fg(None, s), - ) - } else if let (Some((margin, is_start)), true) = (margin_ptr, is_line) { - let is_col = - multi_label.map_or(false, |ml| std::ptr::eq(*ml, margin.label)); - let is_limit = col == multi_labels_with_message.len(); - ( + draw.hbar + }, + label, + )), + Some((draw.hbar, label)), + ) + } else if let Some(label) = vbar { + (Some((draw.vbar(is_ellipsis), label)), None) + } else if let (Some((margin, is_start)), true) = (margin_ptr, is_src_line) { + let is_col = multi_label.map_or(false, |ml| margin.is_referencing(ml)); + let is_limit = col == multi_labels_with_message.len(); + ( + Some(( if is_limit { draw.rarrow } else if is_col { @@ -474,18 +409,22 @@ impl Report<'_, S> { } } else { draw.hbar - } - .fg(margin.label.display_info.color, s), - if !is_limit { draw.hbar } else { ' ' } - .fg(margin.label.display_info.color, s), - ) - } else { - (' '.fg(None, s), ' '.fg(None, s)) - }; - write!(w, "{}", a)?; - if !self.config.compact { - write!(w, "{}", b)?; - } + }, + margin.label, + )), + Some((if is_limit { ' ' } else { draw.hbar }, margin.label)), + ) + } else { + (None, None) + }; + + let arrow_char = |opt: Option<(char, &LabelInfo<'_>)>| match opt { + Some((c, label)) => c.fg(label.display_info.color, s), + None => ' '.fg(None, s), + }; + write!(w, "{}", arrow_char(a))?; + if !self.config.compact { + write!(w, "{}", arrow_char(b))?; } } @@ -494,16 +433,15 @@ impl Report<'_, S> { let mut is_ellipsis = false; for idx in line_range { - let line = if let Some(line) = src.line(idx) { - line - } else { + let Some(line) = src.line(idx) else { continue; }; + // The (optional) label whose arrows are drawn in the margin (horizontal), + // instead of normally (vertical). let margin_label = multi_labels_with_message .iter() - .enumerate() - .filter_map(|(_i, label)| { + .filter_map(|label| { let is_start = line.span().contains(&label.char_span.start); let is_end = line.span().contains(&label.last_offset()); if is_start { @@ -526,25 +464,25 @@ impl Report<'_, S> { } }) .min_by_key(|ll| (ll.col, !ll.label.char_span.start)); + let is_margin_label = |label| { + margin_label + .as_ref() + .map_or(false, |m_label| m_label.is_referencing(label)) + }; // Generate a list of labels for this line, along with their label columns let mut line_labels = multi_labels_with_message .iter() - .enumerate() - .filter_map(|(_i, label)| { + .filter_map(|label| { let is_start = line.span().contains(&label.char_span.start); let is_end = line.span().contains(&label.last_offset()); - if is_start - && margin_label - .as_ref() - .map_or(true, |m| !std::ptr::eq(*label, m.label)) - { + if is_start && !is_margin_label(label) { // TODO: Check to see whether multi is the first on the start line or first on the end line Some(LineLabel { col: label.char_span.start - line.offset(), label, multi: true, - draw_msg: false, // Multi-line spans don;t have their messages drawn at the start + draw_msg: false, // Multi-line spans don't have their messages drawn at the start }) } else if is_end { Some(LineLabel { @@ -557,28 +495,31 @@ impl Report<'_, S> { None } }) - .collect::>(); - - for label_info in labels.iter().filter(|l| { - l.char_span.start >= line.span().start && l.char_span.end <= line.span().end - }) { - if matches!(label_info.kind, LabelKind::Inline) { - line_labels.push(LineLabel { - col: match &self.config.label_attach { - LabelAttach::Start => label_info.char_span.start, - LabelAttach::Middle => { - (label_info.char_span.start + label_info.char_span.end) / 2 + .chain( + group + .labels + .iter() + .filter(|label_info| { + matches!(label_info.kind, LabelKind::Inline) + && label_info.char_span.start >= line.span().start + && label_info.char_span.end <= line.span().end + }) + .map(|label_info| LineLabel { + col: match &self.config.label_attach { + LabelAttach::Start => label_info.char_span.start, + LabelAttach::Middle => { + (label_info.char_span.start + label_info.char_span.end) / 2 + } + LabelAttach::End => label_info.last_offset(), } - LabelAttach::End => label_info.last_offset(), - } - .max(label_info.char_span.start) - - line.offset(), - label: label_info, - multi: false, - draw_msg: true, - }); - } - } + .max(label_info.char_span.start) + - line.offset(), + label: label_info, + multi: false, + draw_msg: true, + }), + ) + .collect::>(); // Skip this line if we don't have labels for it if line_labels.is_empty() && margin_label.is_none() { @@ -589,7 +530,7 @@ impl Report<'_, S> { is_ellipsis = true; } else { if !self.config.compact && !is_ellipsis { - write_margin(&mut w, idx, false, is_ellipsis, false, None, &[], &None)?; + write_margin(&mut w, idx, false, is_ellipsis)?; writeln!(w)?; } is_ellipsis = true; @@ -625,10 +566,7 @@ impl Report<'_, S> { // Only labels with notes get an arrow .enumerate() .filter(|(_, ll)| { - ll.label.display_info.msg.is_some() - && margin_label - .as_ref() - .map_or(true, |m| !std::ptr::eq(ll.label, m.label)) + ll.label.display_info.msg.is_some() && !is_margin_label(ll.label) }) .find(|(j, ll)| ll.col == col && row <= *j) .map(|(_, ll)| ll) @@ -669,12 +607,11 @@ impl Report<'_, S> { }; // Margin - write_margin( + write_margin_and_arrows( &mut w, idx, true, is_ellipsis, - true, None, &line_labels, &margin_label, @@ -715,12 +652,11 @@ impl Report<'_, S> { } if !self.config.compact { // Margin alternate - write_margin( + write_margin_and_arrows( &mut w, idx, false, is_ellipsis, - true, Some((row, false)), &line_labels, &margin_label, @@ -773,12 +709,11 @@ impl Report<'_, S> { } // Margin - write_margin( + write_margin_and_arrows( &mut w, idx, false, is_ellipsis, - true, Some((row, true)), &line_labels, &margin_label, @@ -795,9 +730,7 @@ impl Report<'_, S> { && line_label.label.display_info.msg.is_some(); let [c, tail] = if col == line_label.col && line_label.label.display_info.msg.is_some() - && margin_label - .as_ref() - .map_or(true, |m| !std::ptr::eq(line_label.label, m.label)) + && !is_margin_label(line_label.label) { [ if line_label.multi { @@ -840,10 +773,10 @@ impl Report<'_, S> { }; if width > 0 { - write!(w, "{}", c)?; + write!(w, "{c}")?; } for _ in 1..width { - write!(w, "{}", tail)?; + write!(w, "{tail}")?; } } if line_label.draw_msg { @@ -852,73 +785,137 @@ impl Report<'_, S> { writeln!(w)?; } } + } - let is_final_group = group_idx + 1 == groups_len; - - // Help - if let (Some(note), true) = (&self.help, is_final_group) { - if !self.config.compact { - write_margin(&mut w, 0, false, false, true, Some((0, false)), &[], &None)?; - writeln!(w)?; - } - write_margin(&mut w, 0, false, false, true, Some((0, false)), &[], &None)?; - writeln!(w, "{}: {}", "Help".fg(self.config.note_color(), s), note)?; - } - - // Note - if is_final_group { - for (i, note) in self.notes.iter().enumerate() { - if !self.config.compact { - write_margin(&mut w, 0, false, false, true, Some((0, false)), &[], &None)?; - writeln!(w)?; - } - let note_prefix = format!("{} {}", "Note", i + 1); - let note_prefix_len = if self.notes.len() > 1 { - note_prefix.len() - } else { - 4 - }; - let mut lines = note.lines(); - if let Some(line) = lines.next() { - write_margin(&mut w, 0, false, false, true, Some((0, false)), &[], &None)?; - if self.notes.len() > 1 { - writeln!( - w, - "{}: {}", - note_prefix.fg(self.config.note_color(), s), - line - )?; - } else { - writeln!(w, "{}: {}", "Note".fg(self.config.note_color(), s), line)?; - } - } - for line in lines { - write_margin(&mut w, 0, false, false, true, Some((0, false)), &[], &None)?; - writeln!(w, "{:>pad$}{}", "", line, pad = note_prefix_len + 2)?; - } - } + // Help + if let Some(help) = &self.help { + if !self.config.compact { + write_margin(&mut w, 0, false, false)?; + writeln!(w)?; } + write_margin(&mut w, 0, false, false)?; + writeln!(w, "{}: {help}", "Help".fg(self.config.note_color(), s))?; + } - // Tail of report + // Notes + for (i, note) in self.notes.iter().enumerate() { if !self.config.compact { - if is_final_group { - let final_margin = - format!("{}{}", Show((draw.hbar, line_no_width + 2)), draw.rbot); - writeln!(w, "{}", final_margin.fg(self.config.margin_color(), s))?; + write_margin(&mut w, 0, false, false)?; + writeln!(w)?; + } + let note_prefix = format!("{} {}", "Note", i + 1); + let note_prefix_len = if self.notes.len() > 1 { + note_prefix.len() + } else { + 4 + }; + let mut lines = note.lines(); + if let Some(line) = lines.next() { + write_margin(&mut w, 0, false, false)?; + if self.notes.len() > 1 { + writeln!(w, "{}: {line}", note_prefix.fg(self.config.note_color(), s),)?; } else { - writeln!( - w, - "{}{}", - Show((' ', line_no_width + 2)), - draw.vbar.fg(self.config.margin_color(), s) - )?; + writeln!(w, "{}: {line}", "Note".fg(self.config.note_color(), s))?; } } + for line in lines { + write_margin(&mut w, 0, false, false)?; + writeln!(w, "{:>pad$}{line}", "", pad = note_prefix_len + 2)?; + } } + + // Tail of report. + // Not to be emitted in compact mode, or if nothing has had the margin printed. + if !(self.config.compact + || groups.is_empty() && self.help.is_none() && self.notes.is_empty()) + { + writeln!( + w, + "{}", + format_args!("{}{}", Rept(draw.hbar, line_num_width + 2), draw.rbot) + .fg(self.config.margin_color(), s) + )?; + } + Ok(()) } } +struct LineLabel<'a> { + col: usize, + label: &'a LabelInfo<'a>, + multi: bool, + draw_msg: bool, +} + +impl LineLabel<'_> { + fn is_referencing(&self, label: &LabelInfo<'_>) -> bool { + // Do they point to the same label? + // Note that we want this, and not to compare the labels themselves, so as to support + // printing the same label twice if we were given that. + std::ptr::eq(self.label, label) + } +} + +fn fetch_source<'a, Id: ?Sized, C: Cache>( + cache: &'a mut C, + src_id: &Id, +) -> Option<(&'a Source, String)> { + let src_name = display_name(cache, src_id); + match cache.fetch(src_id) { + Ok(src) => Some((src, src_name)), + Err(e) => { + eprintln!("Unable to fetch source {src_name}: {e:?}"); + None + } + } +} + +fn display_name>(cache: &C, src_id: &Id) -> String { + cache + .display(src_id) + .map(|d| d.to_string()) + .unwrap_or_else(|| "".to_string()) +} + +fn max_line_num>( + groups: &[SourceGroup<'_, S>], + cache: &mut C, +) -> Option { + groups + .iter() + .filter_map(|group| { + fetch_source(cache, group.src_id).map(|(src, _)| { + let line_range = src.get_line_range(&group.char_span); + line_range.end + }) + }) + .max() +} + +/// Returns how many digits it takes to print `value`. +fn nb_digits(value: usize) -> usize { + value.checked_ilog10().unwrap_or(0) as usize + 1 +} + +#[derive(Debug, Clone)] +struct Loc<'src, I: AsRef>(&'src Source, String, Option); + +impl> Display for Loc<'_, I> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self.2.as_ref() { + Some(location) => write!( + f, + "{}:{}:{}", + self.1, + location.line_idx + 1 + self.0.display_line_offset(), + location.col_idx + 1 + ), + None => write!(f, ":?:?"), + } + } +} + #[cfg(test)] mod tests { //! These tests use [insta](https://insta.rs/). If you do `cargo install cargo-insta` you can @@ -932,7 +929,7 @@ mod tests { use insta::assert_snapshot; - use crate::{Cache, CharSet, Config, IndexType, Label, Report, ReportKind, Source, Span}; + use crate::{Cache, Config, FnCache, IndexType, Label, Report, ReportKind, Source, Span}; impl Report<'_, S> { fn write_to_string>(&self, cache: C) -> String { @@ -942,23 +939,25 @@ mod tests { } } - fn no_color_and_ascii() -> Config { - Config::default() - .with_color(false) - // Using Ascii so that the inline snapshots display correctly - // even with fonts where characters like '┬' take up more space. - .with_char_set(CharSet::Ascii) + fn no_color() -> Config { + Config::default().with_color(false) } fn remove_trailing(s: String) -> String { s.lines().flat_map(|l| [l.trim_end(), "\n"]).collect() } + fn multi_sources<'srcs, const NB_SOURCES: usize>( + sources: &'srcs [&'static str; NB_SOURCES], + ) -> impl Cache + 'srcs { + FnCache::new(move |id: &_| Ok(sources[*id])) + } + #[test] fn one_message() { let msg = remove_trailing( Report::build(ReportKind::Error, 0..0) - .with_config(no_color_and_ascii()) + .with_config(no_color()) .with_message("can't compare apples with oranges") .finish() .write_to_string(Source::from("")), @@ -973,7 +972,7 @@ mod tests { let source = "apple == orange;"; let msg = remove_trailing( Report::build(ReportKind::Error, 0..0) - .with_config(no_color_and_ascii()) + .with_config(no_color()) .with_message("can't compare apples with oranges") .with_label(Label::new(0..5)) .with_label(Label::new(9..15)) @@ -981,13 +980,13 @@ mod tests { .write_to_string(Source::from(source)), ); // TODO: it would be nice if these spans still showed up (like codespan-reporting does) - assert_snapshot!(msg, @r###" + assert_snapshot!(msg, @r" Error: can't compare apples with oranges - ,-[ :1:1 ] - | - 1 | apple == orange; - ---' - "###); + ╭─[ :1:1 ] + │ + 1 │ apple == orange; + ───╯ + "); } #[test] @@ -995,7 +994,7 @@ mod tests { let source = "apple == orange;"; let msg = remove_trailing( Report::build(ReportKind::Error, 0..0) - .with_config(no_color_and_ascii()) + .with_config(no_color()) .with_message("can't compare apples with oranges") .with_label(Label::new(0..5).with_message("This is an apple")) .with_label(Label::new(9..15).with_message("This is an orange")) @@ -1003,16 +1002,41 @@ mod tests { .write_to_string(Source::from(source)), ); // TODO: it would be nice if these lines didn't cross + assert_snapshot!(msg, @r" + Error: can't compare apples with oranges + ╭─[ :1:1 ] + │ + 1 │ apple == orange; + │ ──┬── ───┬── + │ ╰────────────── This is an apple + │ │ + │ ╰──── This is an orange + ───╯ + "); + } + + #[test] + fn duplicate_label() { + let source = "apple == orange;"; + let msg = remove_trailing( + Report::build(ReportKind::Error, 0..0) + .with_config(no_color()) + .with_message("can't compare apples with oranges") + .with_label(Label::new(0..5).with_message("This is an apple")) + .with_label(Label::new(0..5).with_message("This is an apple")) + .finish() + .write_to_string(Source::from(source)), + ); assert_snapshot!(msg, @r###" Error: can't compare apples with oranges - ,-[ :1:1 ] - | - 1 | apple == orange; - | ^^|^^ ^^^|^^ - | `-------------- This is an apple - | | - | `---- This is an orange - ---' + ╭─[ :1:1 ] + │ + 1 │ apple == orange; + │ ──┬── + │ ╰──── This is an apple + │ │ + │ ╰──── This is an apple + ───╯ "###); } @@ -1021,7 +1045,7 @@ mod tests { let source = "äpplë == örängë;"; let msg = remove_trailing( Report::build(ReportKind::Error, 0..0) - .with_config(no_color_and_ascii().with_index_type(IndexType::Char)) + .with_config(no_color().with_index_type(IndexType::Char)) .with_message("can't compare äpplës with örängës") .with_label(Label::new(0..5).with_message("This is an äpplë")) .with_label(Label::new(9..15).with_message("This is an örängë")) @@ -1029,17 +1053,17 @@ mod tests { .write_to_string(Source::from(source)), ); // TODO: it would be nice if these lines didn't cross - assert_snapshot!(msg, @r###" + assert_snapshot!(msg, @r" Error: can't compare äpplës with örängës - ,-[ :1:1 ] - | - 1 | äpplë == örängë; - | ^^|^^ ^^^|^^ - | `-------------- This is an äpplë - | | - | `---- This is an örängë - ---' - "###); + ╭─[ :1:1 ] + │ + 1 │ äpplë == örängë; + │ ──┬── ───┬── + │ ╰────────────── This is an äpplë + │ │ + │ ╰──── This is an örängë + ───╯ + "); } #[test] @@ -1047,7 +1071,7 @@ mod tests { let source = "äpplë == örängë;"; let msg = remove_trailing( Report::build(ReportKind::Error, 0..0) - .with_config(no_color_and_ascii().with_index_type(IndexType::Byte)) + .with_config(no_color().with_index_type(IndexType::Byte)) .with_message("can't compare äpplës with örängës") .with_label(Label::new(0..7).with_message("This is an äpplë")) .with_label(Label::new(11..20).with_message("This is an örängë")) @@ -1055,17 +1079,17 @@ mod tests { .write_to_string(Source::from(source)), ); // TODO: it would be nice if these lines didn't cross - assert_snapshot!(msg, @r###" + assert_snapshot!(msg, @r" Error: can't compare äpplës with örängës - ,-[ :1:1 ] - | - 1 | äpplë == örängë; - | ^^|^^ ^^^|^^ - | `-------------- This is an äpplë - | | - | `---- This is an örängë - ---' - "###); + ╭─[ :1:1 ] + │ + 1 │ äpplë == örängë; + │ ──┬── ───┬── + │ ╰────────────── This is an äpplë + │ │ + │ ╰──── This is an örängë + ───╯ + "); } #[test] @@ -1073,7 +1097,7 @@ mod tests { let source = "äpplë == örängë;"; let msg = remove_trailing( Report::build(ReportKind::Error, 11..11) - .with_config(no_color_and_ascii().with_index_type(IndexType::Byte)) + .with_config(no_color().with_index_type(IndexType::Byte)) .with_message("can't compare äpplës with örängës") .with_label(Label::new(0..7).with_message("This is an äpplë")) .with_label(Label::new(11..20).with_message("This is an örängë")) @@ -1081,17 +1105,41 @@ mod tests { .write_to_string(Source::from(source)), ); // TODO: it would be nice if these lines didn't cross - assert_snapshot!(msg, @r###" + assert_snapshot!(msg, @r" Error: can't compare äpplës with örängës - ,-[ :1:10 ] - | - 1 | äpplë == örängë; - | ^^|^^ ^^^|^^ - | `-------------- This is an äpplë - | | - | `---- This is an örängë - ---' - "###); + ╭─[ :1:10 ] + │ + 1 │ äpplë == örängë; + │ ──┬── ───┬── + │ ╰────────────── This is an äpplë + │ │ + │ ╰──── This is an örängë + ───╯ + "); + } + + #[test] + fn crossing_lines() { + let source = "äpplë == örängë;"; + let msg = Report::build(ReportKind::Error, 11..11) + .with_config(no_color().with_cross_gap(false)) + .with_message("can't compare äpplës with örängës") + .with_label(Label::new(0..5).with_message("This is an äpplë")) + .with_label(Label::new(9..15).with_message("This is an örängë")) + .finish() + .write_to_string(Source::from(source)); + // TODO: it would be nice if these lines didn't cross + assert_snapshot!(msg, @r" + Error: can't compare äpplës with örängës + ╭─[ :1:12 ] + │ + 1 │ äpplë == örängë; + │ ──┬── ───┬── + │ ╰─────────┼──── This is an äpplë + │ │ + │ ╰──── This is an örängë + ───╯ + "); } #[test] @@ -1099,7 +1147,7 @@ mod tests { let source = format!("{}orange", "apple == ".repeat(100)); let msg = remove_trailing( Report::build(ReportKind::Error, 0..0) - .with_config(no_color_and_ascii()) + .with_config(no_color()) .with_message("can't compare apples with oranges") .with_label( Label::new(source.len() - 5..source.len()).with_message("This is an orange"), @@ -1108,15 +1156,15 @@ mod tests { .write_to_string(Source::from(source)), ); // TODO: it would be nice if the start of long lines would be omitted (like rustc does) - assert_snapshot!(msg, @r###" + assert_snapshot!(msg, @r" Error: can't compare apples with oranges - ,-[ :1:1 ] - | - 1 | apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == orange - | ^^|^^ - | `---- This is an orange - ---' - "###); + ╭─[ :1:1 ] + │ + 1 │ apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == apple == orange + │ ──┬── + │ ╰──── This is an orange + ───╯ + "); } #[test] @@ -1124,22 +1172,22 @@ mod tests { let source = "apple ==\n"; let msg = remove_trailing( Report::build(ReportKind::Error, 0..0) - .with_config(no_color_and_ascii().with_index_type(IndexType::Byte)) + .with_config(no_color().with_index_type(IndexType::Byte)) .with_message("unexpected end of file") .with_label(Label::new(9..9).with_message("Unexpected end of file")) .finish() .write_to_string(Source::from(source)), ); - assert_snapshot!(msg, @r###" + assert_snapshot!(msg, @r" Error: unexpected end of file - ,-[ :1:1 ] - | - 1 | apple == - | | - | `- Unexpected end of file - ---' - "###); + ╭─[ :1:1 ] + │ + 1 │ apple == + │ │ + │ ╰─ Unexpected end of file + ───╯ + "); } #[test] @@ -1147,22 +1195,22 @@ mod tests { let source = ""; let msg = remove_trailing( Report::build(ReportKind::Error, 0..0) - .with_config(no_color_and_ascii()) + .with_config(no_color()) .with_message("unexpected end of file") .with_label(Label::new(0..0).with_message("No more fruit!")) .finish() .write_to_string(Source::from(source)), ); - assert_snapshot!(msg, @r###" + assert_snapshot!(msg, @r" Error: unexpected end of file - ,-[ :1:1 ] - | - 1 | - | | - | `- No more fruit! - ---' - "###); + ╭─[ :1:1 ] + │ + 1 │ + │ │ + │ ╰─ No more fruit! + ───╯ + "); } #[test] @@ -1170,7 +1218,7 @@ mod tests { let source = ""; let msg = remove_trailing( Report::build(ReportKind::Error, 0..0) - .with_config(no_color_and_ascii()) + .with_config(no_color()) .with_message("unexpected end of file") .with_label(Label::new(0..0).with_message("No more fruit!")) .with_help("have you tried going to the farmer's market?") @@ -1178,17 +1226,17 @@ mod tests { .write_to_string(Source::from(source)), ); - assert_snapshot!(msg, @r###" + assert_snapshot!(msg, @r" Error: unexpected end of file - ,-[ :1:1 ] - | - 1 | - | | - | `- No more fruit! - | - | Help: have you tried going to the farmer's market? - ---' - "###); + ╭─[ :1:1 ] + │ + 1 │ + │ │ + │ ╰─ No more fruit! + │ + │ Help: have you tried going to the farmer's market? + ───╯ + "); } #[test] @@ -1196,7 +1244,7 @@ mod tests { let source = ""; let msg = remove_trailing( Report::build(ReportKind::Error, 0..0) - .with_config(no_color_and_ascii()) + .with_config(no_color()) .with_message("unexpected end of file") .with_label(Label::new(0..0).with_message("No more fruit!")) .with_note("eat your greens!") @@ -1204,17 +1252,17 @@ mod tests { .write_to_string(Source::from(source)), ); - assert_snapshot!(msg, @r###" + assert_snapshot!(msg, @r" Error: unexpected end of file - ,-[ :1:1 ] - | - 1 | - | | - | `- No more fruit! - | - | Note: eat your greens! - ---' - "###); + ╭─[ :1:1 ] + │ + 1 │ + │ │ + │ ╰─ No more fruit! + │ + │ Note: eat your greens! + ───╯ + "); } #[test] @@ -1222,7 +1270,7 @@ mod tests { let source = ""; let msg = remove_trailing( Report::build(ReportKind::Error, 0..0) - .with_config(no_color_and_ascii()) + .with_config(no_color()) .with_message("unexpected end of file") .with_label(Label::new(0..0).with_message("No more fruit!")) .with_note("eat your greens!") @@ -1231,19 +1279,19 @@ mod tests { .write_to_string(Source::from(source)), ); - assert_snapshot!(msg, @r###" + assert_snapshot!(msg, @r" Error: unexpected end of file - ,-[ :1:1 ] - | - 1 | - | | - | `- No more fruit! - | - | Help: have you tried going to the farmer's market? - | - | Note: eat your greens! - ---' - "###); + ╭─[ :1:1 ] + │ + 1 │ + │ │ + │ ╰─ No more fruit! + │ + │ Help: have you tried going to the farmer's market? + │ + │ Note: eat your greens! + ───╯ + "); } #[test] @@ -1254,7 +1302,7 @@ mod tests { for j in i..=source.len() { let _ = remove_trailing( Report::build(ReportKind::Error, 0..0) - .with_config(no_color_and_ascii().with_index_type(IndexType::Byte)) + .with_config(no_color().with_index_type(IndexType::Byte)) .with_message("Label") .with_label(Label::new(i..j).with_message("Label")) .finish() @@ -1269,23 +1317,56 @@ mod tests { let source = "apple\n==\norange"; let msg = remove_trailing( Report::build(ReportKind::Error, 0..0) - .with_config(no_color_and_ascii()) + .with_config(no_color()) .with_label(Label::new(0..source.len()).with_message("illegal comparison")) .finish() .write_to_string(Source::from(source)), ); // TODO: it would be nice if the 2nd line wasn't omitted - assert_snapshot!(msg, @r###" + assert_snapshot!(msg, @r" Error: - ,-[ :1:1 ] - | - 1 | ,-> apple - : : - 3 | |-> orange - | | - | `----------- illegal comparison - ---' - "###); + ╭─[ :1:1 ] + │ + 1 │ ╭─▶ apple + ┆ ┆ + 3 │ ├─▶ orange + │ │ + │ ╰─────────── illegal comparison + ───╯ + "); + } + + #[test] + fn multiple_multilines_same_span() { + let source = "apple\n==\norange"; + let msg = Report::build(ReportKind::Error, 0..0) + .with_config(no_color()) + .with_label(Label::new(0..source.len()).with_message("illegal comparison")) + .with_label(Label::new(0..source.len()).with_message("do not do this")) + .with_label(Label::new(0..source.len()).with_message("please reconsider")) + .finish() + .write_to_string(Source::from(source)); + // TODO: it would be nice if the 2nd line wasn't omitted + // TODO: it would be nice if the lines didn't cross, or at least less so + assert_snapshot!(msg, @r" + Error: + ╭─[ :1:1 ] + │ + 1 │ ╭─────▶ apple + │ │ ▲ + │ │ ╭─────╯ + │ │ │ │ + │ │ │ ╭───╯ + ┆ ┆ ┆ ┆ + 3 │ ├─│ │ ▶ orange + │ │ │ │ ▲ + │ ╰─────────────── illegal comparison + │ │ │ │ + │ ╰──────────┴── do not do this + │ │ │ + │ ╰────────┴── please reconsider + ───╯ + "); } #[test] @@ -1293,24 +1374,24 @@ mod tests { let source = "https://example.com/"; let msg = remove_trailing( Report::build(ReportKind::Error, 0..0) - .with_config(no_color_and_ascii()) + .with_config(no_color()) .with_label(Label::new(0..source.len()).with_message("URL")) .with_label(Label::new(0..source.find(':').unwrap()).with_message("scheme")) .finish() .write_to_string(Source::from(source)), ); // TODO: it would be nice if you could tell where the spans start and end. - assert_snapshot!(msg, @r###" + assert_snapshot!(msg, @r" Error: - ,-[ :1:1 ] - | - 1 | https://example.com/ - | ^^|^^^^^^^|^^^^^^^^^ - | `------------------- scheme - | | - | `----------- URL - ---' - "###); + ╭─[ :1:1 ] + │ + 1 │ https://example.com/ + │ ──┬───────┬───────── + │ ╰─────────────────── scheme + │ │ + │ ╰─────────── URL + ───╯ + "); } #[test] @@ -1318,7 +1399,7 @@ mod tests { let source = "apple == orange;"; let msg = remove_trailing( Report::build(ReportKind::Error, 0..0) - .with_config(no_color_and_ascii()) + .with_config(no_color()) .with_message("can't compare apples with oranges") .with_label(Label::new(0..5).with_message("This is an apple")) .with_label( @@ -1333,25 +1414,25 @@ mod tests { .finish() .write_to_string(Source::from(source)), ); - assert_snapshot!(msg, @r###" + assert_snapshot!(msg, @r" Error: can't compare apples with oranges - ,-[ :1:1 ] - | - 1 | apple == orange; - | ^^|^^ ^^^|^^ - | `-------------- This is an apple - | | | - | `-------------- Have I mentioned that this is an apple? - | | | - | `-------------- No really, have I mentioned that? - | | - | `---- This is an orange - | | - | `---- Have I mentioned that this is an orange? - | | - | `---- No really, have I mentioned that? - ---' - "###) + ╭─[ :1:1 ] + │ + 1 │ apple == orange; + │ ──┬── ───┬── + │ ╰────────────── This is an apple + │ │ │ + │ ╰────────────── Have I mentioned that this is an apple? + │ │ │ + │ ╰────────────── No really, have I mentioned that? + │ │ + │ ╰──── This is an orange + │ │ + │ ╰──── Have I mentioned that this is an orange? + │ │ + │ ╰──── No really, have I mentioned that? + ───╯ + ") } #[test] @@ -1359,7 +1440,7 @@ mod tests { let source = "apple == orange;"; let msg = remove_trailing( Report::build(ReportKind::Error, 0..0) - .with_config(no_color_and_ascii()) + .with_config(no_color()) .with_message("can't compare apples with oranges") .with_label(Label::new(0..5).with_message("This is an apple")) .with_label(Label::new(9..15).with_message("This is an orange")) @@ -1367,19 +1448,19 @@ mod tests { .finish() .write_to_string(Source::from(source)), ); - assert_snapshot!(msg, @r###" + assert_snapshot!(msg, @r" Error: can't compare apples with oranges - ,-[ :1:1 ] - | - 1 | apple == orange; - | ^^|^^ ^^^|^^ - | `-------------- This is an apple - | | - | `---- This is an orange - | - | Note: stop trying ... this is a fruitless endeavor - ---' - "###) + ╭─[ :1:1 ] + │ + 1 │ apple == orange; + │ ──┬── ───┬── + │ ╰────────────── This is an apple + │ │ + │ ╰──── This is an orange + │ + │ Note: stop trying ... this is a fruitless endeavor + ───╯ + ") } #[test] @@ -1387,7 +1468,7 @@ mod tests { let source = "apple == orange;"; let msg = remove_trailing( Report::build(ReportKind::Error, 0..0) - .with_config(no_color_and_ascii()) + .with_config(no_color()) .with_message("can't compare apples with oranges") .with_label(Label::new(0..5).with_message("This is an apple")) .with_label(Label::new(9..15).with_message("This is an orange")) @@ -1395,19 +1476,19 @@ mod tests { .finish() .write_to_string(Source::from(source)), ); - assert_snapshot!(msg, @r###" + assert_snapshot!(msg, @r" Error: can't compare apples with oranges - ,-[ :1:1 ] - | - 1 | apple == orange; - | ^^|^^ ^^^|^^ - | `-------------- This is an apple - | | - | `---- This is an orange - | - | Help: have you tried peeling the orange? - ---' - "###) + ╭─[ :1:1 ] + │ + 1 │ apple == orange; + │ ──┬── ───┬── + │ ╰────────────── This is an apple + │ │ + │ ╰──── This is an orange + │ + │ Help: have you tried peeling the orange? + ───╯ + ") } #[test] @@ -1415,7 +1496,7 @@ mod tests { let source = "apple == orange;"; let msg = remove_trailing( Report::build(ReportKind::Error, 0..0) - .with_config(no_color_and_ascii()) + .with_config(no_color()) .with_message("can't compare apples with oranges") .with_label(Label::new(0..5).with_message("This is an apple")) .with_label(Label::new(9..15).with_message("This is an orange")) @@ -1424,21 +1505,21 @@ mod tests { .finish() .write_to_string(Source::from(source)), ); - assert_snapshot!(msg, @r###" + assert_snapshot!(msg, @r" Error: can't compare apples with oranges - ,-[ :1:1 ] - | - 1 | apple == orange; - | ^^|^^ ^^^|^^ - | `-------------- This is an apple - | | - | `---- This is an orange - | - | Help: have you tried peeling the orange? - | - | Note: stop trying ... this is a fruitless endeavor - ---' - "###) + ╭─[ :1:1 ] + │ + 1 │ apple == orange; + │ ──┬── ───┬── + │ ╰────────────── This is an apple + │ │ + │ ╰──── This is an orange + │ + │ Help: have you tried peeling the orange? + │ + │ Note: stop trying ... this is a fruitless endeavor + ───╯ + ") } #[test] @@ -1446,24 +1527,24 @@ mod tests { let source = "apple == orange;"; let msg = remove_trailing( Report::build(ReportKind::Error, 0..0) - .with_config(no_color_and_ascii()) + .with_config(no_color()) .with_message("can't compare apples with oranges") .with_label(Label::new(0..15).with_message("This is a strange comparison")) .with_note("No need to try, they can't be compared.") .finish() .write_to_string(Source::from(source)), ); - assert_snapshot!(msg, @r###" + assert_snapshot!(msg, @r" Error: can't compare apples with oranges - ,-[ :1:1 ] - | - 1 | apple == orange; - | ^^^^^^^|^^^^^^^ - | `--------- This is a strange comparison - | - | Note: No need to try, they can't be compared. - ---' - "###) + ╭─[ :1:1 ] + │ + 1 │ apple == orange; + │ ───────┬─────── + │ ╰───────── This is a strange comparison + │ + │ Note: No need to try, they can't be compared. + ───╯ + ") } #[test] @@ -1471,7 +1552,7 @@ mod tests { let source = "apple == orange;"; let msg = remove_trailing( Report::build(ReportKind::Error, 0..0) - .with_config(no_color_and_ascii()) + .with_config(no_color()) .with_message("can't compare apples with oranges") .with_label(Label::new(0..15).with_message("This is a strange comparison")) .with_note("No need to try, they can't be compared.") @@ -1479,19 +1560,19 @@ mod tests { .finish() .write_to_string(Source::from(source)), ); - assert_snapshot!(msg, @r###" + assert_snapshot!(msg, @r" Error: can't compare apples with oranges - ,-[ :1:1 ] - | - 1 | apple == orange; - | ^^^^^^^|^^^^^^^ - | `--------- This is a strange comparison - | - | Note 1: No need to try, they can't be compared. - | - | Note 2: Yeah, really, please stop. - ---' - "###) + ╭─[ :1:1 ] + │ + 1 │ apple == orange; + │ ───────┬─────── + │ ╰───────── This is a strange comparison + │ + │ Note 1: No need to try, they can't be compared. + │ + │ Note 2: Yeah, really, please stop. + ───╯ + ") } #[test] @@ -1499,7 +1580,7 @@ mod tests { let source = "apple == orange;"; let msg = remove_trailing( Report::build(ReportKind::Error, 0..0) - .with_config(no_color_and_ascii()) + .with_config(no_color()) .with_message("can't compare apples with oranges") .with_label(Label::new(0..15).with_message("This is a strange comparison")) .with_note("No need to try, they can't be compared.") @@ -1507,19 +1588,115 @@ mod tests { .finish() .write_to_string(Source::from(source)), ); - assert_snapshot!(msg, @r###" + assert_snapshot!(msg, @r" Error: can't compare apples with oranges - ,-[ :1:1 ] - | - 1 | apple == orange; - | ^^^^^^^|^^^^^^^ - | `--------- This is a strange comparison - | - | Note 1: No need to try, they can't be compared. - | - | Note 2: Yeah, really, please stop. - | It has no resemblance. - ---' + ╭─[ :1:1 ] + │ + 1 │ apple == orange; + │ ───────┬─────── + │ ╰───────── This is a strange comparison + │ + │ Note 1: No need to try, they can't be compared. + │ + │ Note 2: Yeah, really, please stop. + │ It has no resemblance. + ───╯ + ") + } + + #[test] + fn only_help_and_note() { + let source = "this should not be printed"; + let msg = remove_trailing( + Report::build(ReportKind::Error, 0..0) + .with_config(no_color()) + .with_message("Programming language \"Rest\" not found") + .with_help("a language with a similar name exists: Rust") + .with_note("perhaps you'd like some sleep?") + .finish() + .write_to_string(Source::from(source)), + ); + assert_snapshot!(msg, @r###" + Error: Programming language "Rest" not found + │ + │ Help: a language with a similar name exists: Rust + │ + │ Note: perhaps you'd like some sleep? + ──╯ "###) } + + #[test] + fn multi_source() { + let msg = remove_trailing( + Report::build(ReportKind::Error, (0, 0..0)) + .with_config(no_color()) + .with_message("can't compare apples with oranges or pears") + .with_label(Label::new((0, 0..5)).with_message("This is an apple")) + .with_label(Label::new((0, 9..15)).with_message("This is an orange")) + .with_label(Label::new((1, 0..5)).with_message("This is an apple")) + .with_label(Label::new((1, 9..13)).with_message("This is a pear")) + .finish() + .write_to_string(multi_sources(&["apple == orange;", "apple == pear;"])), + ); + assert_snapshot!(msg, @r" + Error: can't compare apples with oranges or pears + ╭─[ 0:1:1 ] + │ + 1 │ apple == orange; + │ ──┬── ───┬── + │ ╰────────────── This is an apple + │ │ + │ ╰──── This is an orange + │ + ├─[ 1:1:1 ] + │ + 1 │ apple == pear; + │ ──┬── ──┬─ + │ ╰──────────── This is an apple + │ │ + │ ╰─── This is a pear + ───╯ + ") + } + + #[test] + fn help_and_note_multi() { + let msg = remove_trailing( + Report::build(ReportKind::Error, (0, 0..0)) + .with_config(no_color()) + .with_message("can't compare apples with oranges or pears") + .with_label(Label::new((0, 0..5)).with_message("This is an apple")) + .with_label(Label::new((0, 9..15)).with_message("This is an orange")) + .with_label(Label::new((1, 0..5)).with_message("This is an apple")) + .with_label(Label::new((1, 9..13)).with_message("This is a pear")) + .with_help("have you tried peeling the orange?") + .with_note("stop trying ... this is a fruitless endeavor") + .finish() + .write_to_string(multi_sources(&["apple == orange;", "apple == pear;"])), + ); + assert_snapshot!(msg, @r" + Error: can't compare apples with oranges or pears + ╭─[ 0:1:1 ] + │ + 1 │ apple == orange; + │ ──┬── ───┬── + │ ╰────────────── This is an apple + │ │ + │ ╰──── This is an orange + │ + ├─[ 1:1:1 ] + │ + 1 │ apple == pear; + │ ──┬── ──┬─ + │ ╰──────────── This is an apple + │ │ + │ ╰─── This is a pear + │ + │ Help: have you tried peeling the orange? + │ + │ Note: stop trying ... this is a fruitless endeavor + ───╯ + ") + } }