diff --git a/.gitignore b/.gitignore
index 06d8f4aa33..bd6653f6d1 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,5 +5,6 @@ flamegraph.svg
.idea
sample_files/compare.result
+tests/snapshots/*.snap.new
notes.md
diff --git a/manual/src/adding_a_parser.md b/manual/src/adding_a_parser.md
index 8743fd062f..89c3b6eb76 100644
--- a/manual/src/adding_a_parser.md
+++ b/manual/src/adding_a_parser.md
@@ -139,6 +139,15 @@ $ ./sample_files/compare_all.sh
$ cp sample_files/compare.result sample_files/compare.expected
```
+Run the CLI test and [update the snapshots][insta] as well.
+
+```
+$ cargo insta test
+$ cargo insta accept
+```
+
+[insta]: https://insta.rs/docs/quickstart/#reviewing-snapshots
+
## Maintenance
To update a parser that is already imported, use `git subtree pull`.
diff --git a/tests/cli.rs b/tests/cli.rs
index fa0ea1df92..59bbbb336a 100644
--- a/tests/cli.rs
+++ b/tests/cli.rs
@@ -1,4 +1,5 @@
use std::process::Command;
+use std::str;
use assert_cmd::prelude::*;
use predicates::prelude::*;
@@ -259,3 +260,50 @@ fn walk_hidden_items() {
.and(predicate::str::contains("after"));
cmd.assert().stdout(predicate_fn);
}
+
+const MAX_SAMPLE_FILE_SIZE: u64 = 10_000;
+
+#[test]
+fn samples_side_by_side() {
+ insta::glob!("../sample_files", "*_1.*", |left_file| {
+ let base_dir = left_file.parent().unwrap().parent().unwrap();
+ let file_name = left_file.file_name().unwrap().to_str().unwrap();
+ let right_file = left_file.with_file_name(file_name.replace("_1.", "_2."));
+ // Large sample files are excluded because it's slow to diff with debug
+ // binary, and the snapshot results wouldn't help review changes.
+ if left_file.metadata().unwrap().len() > MAX_SAMPLE_FILE_SIZE
+ || right_file.metadata().unwrap().len() > MAX_SAMPLE_FILE_SIZE
+ {
+ eprintln!("Skipping large sample: {file_name}");
+ return;
+ }
+ // TODO: Fix CI instability on the following architectures:
+ // x86_64-apple-darwin, x86_64-pc-windows-msvc, aarch64-apple-darwin
+ if file_name == "f_sharp_1.fs" {
+ eprintln!("Skipping unstable sample: {file_name}");
+ return;
+ }
+ // TODO: Remove this once the fix gets merged.
+ if file_name == "big_text_hunk_1.txt" {
+ eprintln!("Skipping crash sample: {file_name}");
+ return;
+ }
+
+ let to_path_arg = |path: &Path| {
+ let short_path = path.strip_prefix(base_dir).unwrap();
+ let short_str = short_path.to_str().unwrap();
+ short_str.replace(std::path::MAIN_SEPARATOR, "/")
+ };
+ let mut cmd = get_base_command();
+ let assert = cmd
+ .arg("--color=always")
+ .arg("--display=side-by-side")
+ .arg("--width=160")
+ .arg(to_path_arg(left_file))
+ .arg(to_path_arg(&right_file))
+ .assert()
+ .success();
+ let stdout = str::from_utf8(&assert.get_output().stdout).unwrap();
+ insta::assert_snapshot!(stdout);
+ });
+}
diff --git a/tests/snapshots/cli__samples_side_by_side@Session_1.kt.snap b/tests/snapshots/cli__samples_side_by_side@Session_1.kt.snap
new file mode 100644
index 0000000000..f5c156c2cc
--- /dev/null
+++ b/tests/snapshots/cli__samples_side_by_side@Session_1.kt.snap
@@ -0,0 +1,32 @@
+---
+source: tests/cli.rs
+expression: stdout
+input_file: sample_files/Session_1.kt
+---
+[1m[93msample_files/Session_2.kt[39m[0m[2m --- 1/2 --- Kotlin[0m
+[2m 96 [0m [94;3m/**[0m [2m 96 [0m [94;3m/**[0m
+[2m 97 [0m[94;3m * The session's photo URL.[0m [2m 97 [0m[94;3m * The session's photo URL.[0m
+[2m 98 [0m[94;3m */[0m [2m 98 [0m[94;3m */[0m
+[91;1m 99 [0m [1mval[0m photoUrl: [91mString?[0m, [92;1m 99 [0m [1mval[0m photoUrl: [92;1mString[0m,
+[2m100 [0m [2m100 [0m
+[2m101 [0m [94;3m/**[0m [2m101 [0m [94;3m/**[0m
+[2m102 [0m[94;3m * IDs of the sessions related to this session.[0m [2m102 [0m[94;3m * IDs of the sessions related to this session.[0m
+
+[1msample_files/Session_2.kt[0m[2m --- 2/2 --- Kotlin[0m
+[2m114 [0m return startTime [1m<=[0m now [1m&&[0m endTime [1m>=[0m now [2m114 [0m return startTime [1m<=[0m now [1m&&[0m endTime [1m>=[0m now
+[2m115 [0m } [2m115 [0m }
+[2m... [0m [92;1m116 [0m
+[2m... [0m [92;1m117 [0m [92;1mval[0m [92mhasPhoto[0m [92minline[0m [92mget[0m[92;1m([0m[92;1m)[0m [92;1m=[0m [92mphotoUrl[0m[92m.[0m[92misNotEmpty[0m[92;1m([0m[92;1m)[0m
+[2m116 [0m [2m118 [0m
+[2m117 [0m [94;3m/**[0m [2m119 [0m [94;3m/**[0m
+[2m118 [0m[94;3m * Returns whether the session has a video or not. A session could be l[0m [2m120 [0m[94;3m * Returns whether the session has a video or not. A session could be l[0m
+[2m[2m... [0m[0m[94;3mive streaming or have a[0m [2m[2m... [0m[0m[94;3mive streaming or have a[0m
+[2m119 [0m[94;3m * recorded session. Both live stream and recorded videos are stored in[0m [2m121 [0m[94;3m * recorded session. Both live stream and recorded videos are stored in[0m
+[2m[2m... [0m[0m[94;3m [Session.youTubeUrl].[0m [2m[2m... [0m[0m[94;3m [Session.youTubeUrl].[0m
+[2m120 [0m[94;3m */[0m [2m122 [0m[94;3m */[0m
+[91;1m121 [0m [91;1mfun[0m hasVideo() [1m=[0m youTubeUrl.isNotEmpty() [92;1m123 [0m [92;1mval[0m hasVideo [92minline[0m [92mget[0m() [1m=[0m youTubeUrl.isNotEmpty()
+[2m... [0m [92;1m124 [0m
+[2m... [0m [92;1m125 [0m [92;1mval[0m [92mhasPhotoOrVideo[0m [92minline[0m [92mget[0m[92;1m([0m[92;1m)[0m [92;1m=[0m [92mhasPhoto[0m [92;1m||[0m [92mhasVideo[0m
+[2m122 [0m [2m126 [0m
+[2m123 [0m [94;3m/**[0m [2m127 [0m [94;3m/**[0m
+[2m124 [0m[94;3m * The year the session was held.[0m [2m128 [0m[94;3m * The year the session was held.[0m
diff --git a/tests/snapshots/cli__samples_side_by_side@ada_1.adb.snap b/tests/snapshots/cli__samples_side_by_side@ada_1.adb.snap
new file mode 100644
index 0000000000..23b06401a8
--- /dev/null
+++ b/tests/snapshots/cli__samples_side_by_side@ada_1.adb.snap
@@ -0,0 +1,14 @@
+---
+source: tests/cli.rs
+expression: stdout
+input_file: sample_files/ada_1.adb
+---
+[1m[93msample_files/ada_2.adb[39m[0m[2m --- Ada[0m
+[91;1m1 [0m [1mwith[0m Ada.Text_IO; [91;1muse[0m [91mAda[0m[91m.[0m[91mText_IO[0m[91m;[0m [1mprocedure[0m Hello [1mis[0m [1mbegin[0m Put_Line ([91m"[0m[91mHello[0m [2m1 [0m[1mwith[0m Ada.Text_IO;
+[91;1m[2m. [0m[0m[91m [0m[91;1;4mWORLD[0m[91m![0m[91m"[0m); [1mend[0m Hello; [2m[2m. [0m[0m
+[2m. [0m [92;1m2 [0m
+[2m. [0m [2m3 [0m[1mprocedure[0m Hello [1mis[0m
+[2m. [0m [92;1m4 [0m [92;1mpackage[0m [92mTIO[0m [92mrenames[0m [92mAda[0m[92m.[0m[92mText_IO[0m[92m;[0m
+[2m. [0m [2m5 [0m[1mbegin[0m
+[2m. [0m [92;1m6 [0m [92mTIO[0m[92m.[0mPut_Line ([92m"[0m[92mHello[0m[92m [0m[92;1;4mWorld[0m[92m![0m[92m"[0m);
+[2m. [0m [2m7 [0m[1mend[0m Hello;
diff --git a/tests/snapshots/cli__samples_side_by_side@added_line_1.txt.snap b/tests/snapshots/cli__samples_side_by_side@added_line_1.txt.snap
new file mode 100644
index 0000000000..cc56f80411
--- /dev/null
+++ b/tests/snapshots/cli__samples_side_by_side@added_line_1.txt.snap
@@ -0,0 +1,9 @@
+---
+source: tests/cli.rs
+expression: stdout
+input_file: sample_files/added_line_1.txt
+---
+[1m[93msample_files/added_line_2.txt[39m[0m[2m --- Text[0m
+[2m1 [0m[2m1 [0mpotato
+[2m2 [0m[2m2 [0mtomato
+[2m [0m[92;1m3 [0m[92;1mlegato[0m
diff --git a/tests/snapshots/cli__samples_side_by_side@align_footer_1.txt.snap b/tests/snapshots/cli__samples_side_by_side@align_footer_1.txt.snap
new file mode 100644
index 0000000000..7907c4b339
--- /dev/null
+++ b/tests/snapshots/cli__samples_side_by_side@align_footer_1.txt.snap
@@ -0,0 +1,10 @@
+---
+source: tests/cli.rs
+expression: stdout
+input_file: sample_files/align_footer_1.txt
+---
+[1m[93msample_files/align_footer_2.txt[39m[0m[2m --- Text[0m
+[2m1 [0mbefore [2m1 [0mbefore
+[91;1m2 [0m[91m [0m[91;1mfoo[0m[91;1m [0m[91mx[0m [92;1m2 [0m[92m [0m[92mx[0m
+[91;1m3 [0m[91;1my[0m [2m. [0m
+[2m4 [0mafter [2m3 [0mafter
diff --git a/tests/snapshots/cli__samples_side_by_side@all_changed_1.js.snap b/tests/snapshots/cli__samples_side_by_side@all_changed_1.js.snap
new file mode 100644
index 0000000000..34d3ea0f67
--- /dev/null
+++ b/tests/snapshots/cli__samples_side_by_side@all_changed_1.js.snap
@@ -0,0 +1,7 @@
+---
+source: tests/cli.rs
+expression: stdout
+input_file: sample_files/all_changed_1.js
+---
+[1m[93msample_files/all_changed_2.js[39m[0m[2m --- JavaScript[0m
+[91;1m1 [0m[91ma[0m [92;1m1 [0m[92mb[0m
diff --git a/tests/snapshots/cli__samples_side_by_side@apex_1.cls.snap b/tests/snapshots/cli__samples_side_by_side@apex_1.cls.snap
new file mode 100644
index 0000000000..85580dc12b
--- /dev/null
+++ b/tests/snapshots/cli__samples_side_by_side@apex_1.cls.snap
@@ -0,0 +1,7 @@
+---
+source: tests/cli.rs
+expression: stdout
+input_file: sample_files/apex_1.cls
+---
+[1m[93msample_files/apex_2.cls[39m[0m[2m --- Apex[0m
+No syntactic changes.
diff --git a/tests/snapshots/cli__samples_side_by_side@bad_combine_1.rs.snap b/tests/snapshots/cli__samples_side_by_side@bad_combine_1.rs.snap
new file mode 100644
index 0000000000..b33907ab35
--- /dev/null
+++ b/tests/snapshots/cli__samples_side_by_side@bad_combine_1.rs.snap
@@ -0,0 +1,33 @@
+---
+source: tests/cli.rs
+expression: stdout
+input_file: sample_files/bad_combine_1.rs
+---
+[1m[93msample_files/bad_combine_2.rs[39m[0m[2m --- 1/2 --- Rust[0m
+[91;1m 1 [0m [2m. [0m
+[91;1m 2 [0m[91;1mfn[0m [91mcolumn_widths[0m[91;1m([0m [2m. [0m
+[91;1m 3 [0m [91mhunks[0m[91m:[0m [91;1m&[0m[91;1m[[0m[91;1mHunk[0m[91;1m][0m[91m,[0m [2m. [0m
+[91;1m 4 [0m [91mlhs_mps[0m[91m:[0m [91;1m&[0m[91;1m[[0m[91;1mMatchedPos[0m[91;1m][0m[91m,[0m [2m. [0m
+[91;1m 5 [0m [91mrhs_mps[0m[91m:[0m [91;1m&[0m[91;1m[[0m[91;1mMatchedPos[0m[91;1m][0m[91m,[0m [2m. [0m
+[91;1m 6 [0m [91mmax_lhs_src_line[0m[91m:[0m [91;1mLineNumber[0m[91m,[0m [2m. [0m
+[91;1m 7 [0m [91mmax_rhs_src_line[0m[91m:[0m [91;1mLineNumber[0m[91m,[0m [2m. [0m
+[91;1m 8 [0m[91;1m)[0m [91;1m{[0m [2m. [0m
+[91;1m 9 [0m[91;1m}[0m [2m. [0m
+[91;1m10 [0m [2m. [0m
+[2m11 [0m[1mfn[0m display_line_nums( [2m1 [0m[1mfn[0m display_line_nums(
+[2m12 [0m) -> ([1mString[0m, [1mString[0m) { [2m2 [0m) -> ([1mString[0m, [1mString[0m) {
+[2m13 [0m [1mlet[0m display_rhs_line_num: [1mString[0m = [1mmatch[0m rhs_line_num { [2m3 [0m [1mlet[0m display_rhs_line_num: [1mString[0m = [1mmatch[0m rhs_line_num {
+[2m14 [0m [1mSome[0m(line_num) => { [2m4 [0m [1mSome[0m(line_num) => {
+[91;1m15 [0m [1mlet[0m s = format_line_num_padded(line_num, [91mrhs_column_width[0m); [92;1m5 [0m [1mlet[0m s = format_line_num_padded(line_num, [92mwidths[0m[92m.[0m[92mrhs_line_nums[0m);
+[2m16 [0m [1mif[0m rhs_lines_with_novel.contains([1m&[0mline_num) { [2m6 [0m [1mif[0m rhs_lines_with_novel.contains([1m&[0mline_num) {
+[2m17 [0m s.bright_green().to_string() [2m7 [0m s.bright_green().to_string()
+[2m18 [0m } [1melse[0m { [2m8 [0m } [1melse[0m {
+
+[1msample_files/bad_combine_2.rs[0m[2m --- 2/2 --- Rust[0m
+[2m21 [0m } [2m11 [0m }
+[2m22 [0m [1mNone[0m => format_missing_line_num( [2m12 [0m [1mNone[0m => format_missing_line_num(
+[2m23 [0m prev_rhs_line_num.unwrap_or_else(|| [1m10[0m.into()), [2m13 [0m prev_rhs_line_num.unwrap_or_else(|| [1m10[0m.into()),
+[91;1m24 [0m [91mrhs_column_width[0m, [92;1m14 [0m [92mwidths[0m[92m.[0m[92mrhs_line_nums[0m,
+[2m25 [0m ), [2m15 [0m ),
+[2m26 [0m }; [2m16 [0m };
+[2m27 [0m [2m17 [0m
diff --git a/tests/snapshots/cli__samples_side_by_side@change_outer_1.el.snap b/tests/snapshots/cli__samples_side_by_side@change_outer_1.el.snap
new file mode 100644
index 0000000000..f214ebb1e6
--- /dev/null
+++ b/tests/snapshots/cli__samples_side_by_side@change_outer_1.el.snap
@@ -0,0 +1,7 @@
+---
+source: tests/cli.rs
+expression: stdout
+input_file: sample_files/change_outer_1.el
+---
+[1m[93msample_files/change_outer_2.el[39m[0m[2m --- Emacs Lisp[0m
+[91;1m1 [0m[91;1m([0mlhs comma rhs[91;1m)[0m [92;1m1 [0m[92;1m[[0m[92;1m([0mlhs[92;1m)[0m comma rhs[92;1m][0m
diff --git a/tests/snapshots/cli__samples_side_by_side@chinese_1.po.snap b/tests/snapshots/cli__samples_side_by_side@chinese_1.po.snap
new file mode 100644
index 0000000000..976508ced3
--- /dev/null
+++ b/tests/snapshots/cli__samples_side_by_side@chinese_1.po.snap
@@ -0,0 +1,34 @@
+---
+source: tests/cli.rs
+expression: stdout
+input_file: sample_files/chinese_1.po
+---
+[1m[93msample_files/chinese_2.po[39m[0m[2m --- 1/3 --- Text[0m
+[2m1 [0m#: ../errors.h:589 [2m1 [0m#: ../errors.h:589
+[2m2 [0m# reorder if possible [2m2 [0m# reorder if possible
+[2m3 [0m#, fuzzy, c-format [2m3 [0m#, fuzzy, c-format
+[91;1m4 [0m[91mmsgid[0m[91m [0m[91m"[0m[91mE244[0m[91m:[0m[91m [0m[91mIllegal[0m[91m [0m[91m%[0m[91ms[0m[91m [0m[91mname[0m[91m [0m[91m\[0m[91m"[0m[91m%[0m[91ms[0m[91m\[0m[91m"[0m[91m [0m[91min[0m[91m [0m[91mfont[0m[91m [0m[91mname[0m[91m [0m[91m\[0m[91m"[0m[91m%[0m[91ms[0m[91m\[0m[91m"[0m[91m"[0m [92;1m4 [0m[92;1m#[0m[92;1m [0m[92mmsgid[0m[92m [0m[92m"[0m[92mE244[0m[92m:[0m[92m [0m[92mIllegal[0m[92m [0m[92m%[0m[92ms[0m[92m [0m[92mname[0m[92m [0m[92m\[0m[92m"[0m[92m%[0m[92ms[0m[92m\[0m[92m"[0m[92m [0m[92min[0m[92m [0m[92mfont[0m[92m [0m[92mname[0m[92m [0m[92m\[0m[92m"[0m[92m%[0m[92ms[0m[92m\[0m[92m"[0m[92m"[0m
+[91;1m5 [0m[91mmsgstr[0m[91m [0m[91m"[0m[91mE244[0m[91m:[0m[91m [0m[91m字体名[0m[91m [0m[91m\[0m[91m"[0m[91m%[0m[91m3[0m[91m$[0m[91ms[0m[91m\[0m[91m"[0m[91m [0m[91m中有非法[0m[91m [0m[91m%[0m[91m1[0m[91m$[0m[91ms[0m[91m [0m[91m名称[0m[91m [0m[91m\[0m[91m"[0m[91m%[0m[91m2[0m[91m$[0m[91ms[0m[91m\[0m[91m"[0m[91m"[0m [92;1m5 [0m[92;1m#[0m[92;1m [0m[92mmsgstr[0m[92m [0m[92m"[0m[92mE244[0m[92m:[0m[92m [0m[92m字体名[0m[92m [0m[92m\[0m[92m"[0m[92m%[0m[92m3[0m[92m$[0m[92ms[0m[92m\[0m[92m"[0m[92m [0m[92m中有非法[0m[92m [0m[92m%[0m[92m1[0m[92m$[0m[92ms[0m[92m [0m[92m名称[0m[92m [0m[92m\[0m[92m"[0m[92m%[0m[92m2[0m[92m$[0m[92ms[0m[92m\[0m[92m"[0m[92m"[0m
+[2m6 [0m [2m6 [0m
+[2m7 [0m#: ../errors.h:591 [2m7 [0m#: ../errors.h:591
+[2m8 [0m#, c-format [2m8 [0m#, c-format
+
+[1msample_files/chinese_2.po[0m[2m --- 2/3 --- Text[0m
+[2m21 [0m#: ../errors.h:788 [2m21 [0m#: ../errors.h:788
+[2m22 [0m# reorder if possible [2m22 [0m# reorder if possible
+[2m23 [0m#, fuzzy, c-format [2m23 [0m#, fuzzy, c-format
+[91;1m24 [0m[91mmsgid[0m[91m [0m[91m"[0m[91mE316[0m[91m:[0m[91m [0m[91mml_get[0m[91m:[0m[91m [0m[91mCannot[0m[91m [0m[91mfind[0m[91m [0m[91mline[0m[91m [0m[91m%[0m[91mld[0m[91m [0m[91min[0m[91m [0m[91mbuffer[0m[91m [0m[91m%[0m[91md[0m[91m [0m[91m%[0m[91ms[0m[91m"[0m [92;1m24 [0m[92;1m#[0m[92;1m [0m[92mmsgid[0m[92m [0m[92m"[0m[92mE316[0m[92m:[0m[92m [0m[92mml_get[0m[92m:[0m[92m [0m[92mCannot[0m[92m [0m[92mfind[0m[92m [0m[92mline[0m[92m [0m[92m%[0m[92mld[0m[92m [0m[92min[0m[92m [0m[92mbuffer[0m[92m [0m[92m%[0m[92md[0m[92m [0m[92m%[0m[92ms[0m[92m"[0m
+[91;1m25 [0m[91mmsgstr[0m[91m [0m[91m"[0m[91mE316[0m[91m:[0m[91m [0m[91mml_get[0m[91m:[0m[91m [0m[91m在缓冲区[0m[91m [0m[91m%[0m[91m2[0m[91m$[0m[91md[0m[91m [0m[91m%[0m[91m3[0m[91m$[0m[91ms[0m[91m [0m[91m中找不到第[0m[91m [0m[91m%[0m[91m1[0m[91m$[0m[91mld[0m[91m [0m[91m行[0m[91m"[0m [92;1m25 [0m[92;1m#[0m[92;1m [0m[92mmsgstr[0m[92m [0m[92m"[0m[92mE316[0m[92m:[0m[92m [0m[92mml_get[0m[92m:[0m[92m [0m[92m在缓冲区[0m[92m [0m[92m%[0m[92m2[0m[92m$[0m[92md[0m[92m [0m[92m%[0m[92m3[0m[92m$[0m[92ms[0m[92m [0m[92m中找不到第[0m[92m [0m[92m%[0m[92m1[0m[92m$[0m[92mld[0m[92m [0m[92m行[0m[92m"[0m
+[2m26 [0m [2m26 [0m
+[2m27 [0m#: ../errors.h:790 [2m27 [0m#: ../errors.h:790
+[2m28 [0mmsgid "E317: Pointer block id wrong" [2m28 [0mmsgid "E317: Pointer block id wrong"
+
+[1msample_files/chinese_2.po[0m[2m --- 3/3 --- Text[0m
+[2m43 [0m#: ../errors.h:2705 [2m43 [0m#: ../errors.h:2705
+[2m44 [0m# reorder if possible [2m44 [0m# reorder if possible
+[2m45 [0m#, fuzzy, c-format [2m45 [0m#, fuzzy, c-format
+[91;1m46 [0m[91mmsgid[0m[91m [0m[91m"[0m[91mE1037[0m[91m:[0m[91m [0m[91mCannot[0m[91m [0m[91muse[0m[91m [0m[91m\[0m[91m"[0m[91m%[0m[91ms[0m[91m\[0m[91m"[0m[91m [0m[91mwith[0m[91m [0m[91m%[0m[91ms[0m[91m"[0m [92;1m46 [0m[92;1m#[0m[92;1m [0m[92mmsgid[0m[92m [0m[92m"[0m[92mE1037[0m[92m:[0m[92m [0m[92mCannot[0m[92m [0m[92muse[0m[92m [0m[92m\[0m[92m"[0m[92m%[0m[92ms[0m[92m\[0m[92m"[0m[92m [0m[92mwith[0m[92m [0m[92m%[0m[92ms[0m[92m"[0m
+[91;1m47 [0m[91mmsgstr[0m[91m [0m[91m"[0m[91mE1037[0m[91m:[0m[91m [0m[91m不能对[0m[91m [0m[91m%[0m[91m2[0m[91m$[0m[91ms[0m[91m [0m[91m使用[0m[91m [0m[91m\[0m[91m"[0m[91m%[0m[91m1[0m[91m$[0m[91ms[0m[91m\[0m[91m"[0m[91m"[0m [92;1m47 [0m[92;1m#[0m[92;1m [0m[92mmsgstr[0m[92m [0m[92m"[0m[92mE1037[0m[92m:[0m[92m [0m[92m不能对[0m[92m [0m[92m%[0m[92m2[0m[92m$[0m[92ms[0m[92m [0m[92m使用[0m[92m [0m[92m\[0m[92m"[0m[92m%[0m[92m1[0m[92m$[0m[92ms[0m[92m\[0m[92m"[0m[92m"[0m
+[2m48 [0m [2m48 [0m
+[2m49 [0m#: ../errors.h:2707 [2m49 [0m#: ../errors.h:2707
+[2m50 [0mmsgid "E1038: \"vim9script\" can only be used in a script" [2m50 [0mmsgid "E1038: \"vim9script\" can only be used in a script"
diff --git a/tests/snapshots/cli__samples_side_by_side@clojure_1.clj.snap b/tests/snapshots/cli__samples_side_by_side@clojure_1.clj.snap
new file mode 100644
index 0000000000..3e9a4566ae
--- /dev/null
+++ b/tests/snapshots/cli__samples_side_by_side@clojure_1.clj.snap
@@ -0,0 +1,13 @@
+---
+source: tests/cli.rs
+expression: stdout
+input_file: sample_files/clojure_1.clj
+---
+[1m[93msample_files/clojure_2.clj[39m[0m[2m --- Clojure[0m
+[2m3 [0m(defn example [2m3 [0m(defn example
+[2m4 [0m [x] [2m4 [0m [x]
+[2m5 [0m [95m"Does stuff."[0m [2m5 [0m [95m"Does stuff."[0m
+[91;1m6 [0m [91;1m([0m[91mprintln[0m [91m"hello!"[0m[91;1m)[0m [2m. [0m
+[2m7 [0m {[1m:more[0m (inc x) [92;1m6 [0m [92;1m([0m[92m->[0m {[1m:more[0m (inc x)
+[2m8 [0m [1m:less[0m (dec x)}) [2m7 [0m [1m:less[0m (dec x)}
+[2m [0m [92;1m8 [0m [92;1m([0m[92massoc[0m [92;1m:twice[0m [92;1m([0m[92m+[0m [92mx[0m [92mx[0m[92;1m)[0m[92;1m)[0m[92;1m)[0m)
diff --git a/tests/snapshots/cli__samples_side_by_side@comma_1.js.snap b/tests/snapshots/cli__samples_side_by_side@comma_1.js.snap
new file mode 100644
index 0000000000..7ba71e2fc7
--- /dev/null
+++ b/tests/snapshots/cli__samples_side_by_side@comma_1.js.snap
@@ -0,0 +1,20 @@
+---
+source: tests/cli.rs
+expression: stdout
+input_file: sample_files/comma_1.js
+---
+[1m[93msample_files/comma_2.js[39m[0m[2m --- JavaScript[0m
+[2m10 [0m[94;3m * @param {Function} comparator The comparator invoked per element.[0m [2m10 [0m[94;3m * @param {Function} comparator The comparator invoked per element.[0m
+[2m11 [0m[94;3m * @returns {boolean} Returns `true` if `target` is found, else `false`.[0m [2m11 [0m[94;3m * @returns {boolean} Returns `true` if `target` is found, else `false`.[0m
+[2m12 [0m[94;3m */[0m [2m12 [0m[94;3m */[0m
+[91;1m13 [0m[1mfunction[0m arrayIncludesWith(array, [91mvalue[0m, comparator) { [92;1m13 [0m[1mfunction[0m arrayIncludesWith(array, [92mtarget[0m, comparator) {
+[91;1m14 [0m [91;1mlet[0m [91mindex[0m [91;1m=[0m [91;1m-[0m[91m1[0m [2m.. [0m
+[91;1m15 [0m [91;1mconst[0m [91mlength[0m [91;1m=[0m array [1m==[0m [1mnull[0m [91m?[0m [91m0[0m [91m:[0m [91marray[0m[91m.[0m[91mlength[0m [92;1m14 [0m [92;1mif[0m [92;1m([0marray [1m==[0m [1mnull[0m[92;1m)[0m [92;1m{[0m
+[2m.. [0m [92;1m15 [0m [92;1mreturn[0m [92;1mfalse[0m
+[2m.. [0m [92;1m16 [0m [92;1m}[0m
+[2m16 [0m [2m17 [0m
+[91;1m17 [0m [91;1mwhile[0m ([91;1m++[0m[91mindex[0m [91;1m<[0m [91mlength[0m) { [92;1m18 [0m [92;1mfor[0m ([92;1mconst[0m [92mvalue[0m [92;1mof[0m [92marray[0m) {
+[91;1m18 [0m [1mif[0m (comparator(value[91m,[0m [91marray[0m[91;1m[[0m[91mindex[0m[91;1m][0m)) { [92;1m19 [0m [1mif[0m (comparator([92mtarget[0m[92m,[0m value)) {
+[2m19 [0m [1mreturn[0m [1mtrue[0m [2m20 [0m [1mreturn[0m [1mtrue[0m
+[2m20 [0m } [2m21 [0m }
+[2m21 [0m } [2m22 [0m }
diff --git a/tests/snapshots/cli__samples_side_by_side@comma_and_comment_1.js.snap b/tests/snapshots/cli__samples_side_by_side@comma_and_comment_1.js.snap
new file mode 100644
index 0000000000..3afb3785b2
--- /dev/null
+++ b/tests/snapshots/cli__samples_side_by_side@comma_and_comment_1.js.snap
@@ -0,0 +1,7 @@
+---
+source: tests/cli.rs
+expression: stdout
+input_file: sample_files/comma_and_comment_1.js
+---
+[1m[93msample_files/comma_and_comment_2.js[39m[0m[2m --- JavaScript[0m
+[91;1m1 [0mfunName(1 [94;3m/* foo */[0m [91m,[0m [91;3m/* bar */[0m) [92;1m1 [0mfunName(1 [92;3m/* kinda like bar */[0m [92m,[0m [94;3m/* foo */[0m)
diff --git a/tests/snapshots/cli__samples_side_by_side@comments_1.rs.snap b/tests/snapshots/cli__samples_side_by_side@comments_1.rs.snap
new file mode 100644
index 0000000000..2eab46861c
--- /dev/null
+++ b/tests/snapshots/cli__samples_side_by_side@comments_1.rs.snap
@@ -0,0 +1,31 @@
+---
+source: tests/cli.rs
+expression: stdout
+input_file: sample_files/comments_1.rs
+---
+[1m[93msample_files/comments_2.rs[39m[0m[2m --- Rust[0m
+[2m 1 [0m[94;3m// Unchanged comment.[0m [2m 1 [0m[94;3m// Unchanged comment.[0m
+[2m 2 [0mf1(); [2m 2 [0mf1();
+[2m 3 [0m [2m 3 [0m
+[91;1m 4 [0m[91;3m/[0m[91;3m/[0m[91;3m [0m[91;3mChanging[0m[91;3m [0m[91;3ma[0m[91;3m [0m[91;3msingle[0m[91;3m [0m[91;3mword[0m[91;3m.[0m [92;1m 4 [0m[92;3m/[0m[92;3m/[0m[92;3m [0m[92;3mChanging[0m[92;3m [0m[92;3ma[0m[92;3m [0m[92;3msingle[0m[92;3m [0m[92;3mword[0m [92;1;3;4mhere[0m[92;3m.[0m
+[2m 5 [0mf2(); [2m 5 [0mf2();
+[2m 6 [0m [2m 6 [0m
+[91;1m 7 [0m[91;3m/[0m[91;3m/[0m[91;3m [0m[91;3mA[0m[91;3m [0m[91;1;3;4mcompletely[0m[91;3m [0m[91;1;3;4mdifferent[0m[91;3m [0m[91;1;3;4msentence[0m[91;3m.[0m [92;1m 7 [0m[92;3m/[0m[92;3m/[0m[92;3m [0m[92;3mA[0m[92;3m [0m[92;1;3;4msingle[0m[92;3m [0m[92;1;3;4mcomment[0m[92;3m [0m[92;1;3;4mabout[0m [92;1;3;4msomething[0m[92;3m.[0m
+[2m 8 [0mf3(); [2m 8 [0mf3();
+[2m 9 [0m [2m 9 [0m
+[91;1m10 [0m[91;1mif[0m [91mtrue[0m [91;1m{[0m [2m . [0m
+[2m11 [0m [94;3m/* A multiline comment[0m [2m10 [0m[94;3m/* A multiline comment[0m
+[2m12 [0m[94;3m * whose indentation changes.[0m [2m11 [0m[94;3m * whose indentation changes.[0m
+[2m13 [0m[94;3m */[0m [2m12 [0m[94;3m */[0m
+[91;1m14 [0m[91;1m}[0m [2m.. [0m
+[2m15 [0m [2m13 [0m
+[91;1m16 [0m[91;3m/[0m[91;3m/[0m[91;3m [0m[91;3mAn[0m[91;3m [0m[91;3mexample[0m[91;3m [0m[91;3menvironment[0m[91;3m [0m[91;3mvariable[0m[91;3m:[0m[91;3m [0m[91;3mFOO[0m[91;3m=[0m[91;3m"[0m[91;1;3;4ma[0m[91;3m-[0m[91;1;3;4mb[0m[91;3m"[0m [92;1m14 [0m[92;3m/[0m[92;3m/[0m[92;3m [0m[92;3mAn[0m[92;3m [0m[92;3mexample[0m[92;3m [0m[92;3menvironment[0m[92;3m [0m[92;3mvariable[0m[92;3m:[0m[92;3m [0m[92;3mFOO[0m[92;3m=[0m[92;3m"[0m[92;1;3;4mx[0m[92;3m-[0m[92;1;3;4my[0m[92;3m"[0m
+[2m17 [0m [2m15 [0m
+[91;1m18 [0m[91;3m/[0m[91;3m/[0m[91;3m [0m[91;3mA[0m[91;3m [0m[91;3msingle[0m[91;3m [0m[91;3mline[0m[91;3m [0m[91;3mcomment[0m[91;3m.[0m [92;1m16 [0m[92;3m/[0m[92;3m/[0m[92;3m [0m[92;3mA[0m[92;3m [0m[92;3msingle[0m[92;3m [0m[92;3mline[0m[92;3m [0m[92;3mcomment[0m[92;3m.[0m [92;1;3;4mIt[0m [92;1;3;4mhas[0m [92;1;3;4mbecome[0m
+[2m.. [0m [92;1m17 [0m[92;3m// a big block comment. Lorem ipsum dolor sit amet,[0m
+[2m.. [0m [92;1m18 [0m[92;3m// consectetur adipiscing elit[0m
+[2m19 [0m [2m19 [0m
+[91;1m20 [0m[91;3m/[0m[91;3m*[0m[91;3m*[0m[91;3m [0m[91;3mA[0m[91;3m [0m[91;3mdoc[0m[91;3m [0m[91;3mcomment[0m[91;3m.[0m [92;1m20 [0m[92;3m/[0m[92;3m*[0m[92;3m*[0m[92;3m [0m[92;3mA[0m[92;3m [0m[92;3mdoc[0m[92;3m [0m[92;3mcomment[0m[92;3m.[0m
+[91;1m21 [0m[91;3m [0m[91;3m*[0m [92;1m21 [0m[92;3m [0m[92;3m*[0m
+[91;1m22 [0m[91;3m [0m[91;3m*[0m[91;3m [0m[91;3mThis[0m[91;3m [0m[91;3mline[0m[91;3m [0m[91;1;3;4mwill[0m[91;3m [0m[91;1;3;4mchange[0m[91;3m.[0m [92;1m22 [0m[92;3m [0m[92;3m*[0m[92;3m [0m[92;3mThis[0m[92;3m [0m[92;3mline[0m[92;3m [0m[92;1;3;4mhas[0m[92;3m [0m[92;1;3;4mchanged[0m[92;3m.[0m
+[91;1m23 [0m[91;3m [0m[91;3m*[0m[91;3m/[0m [92;1m23 [0m[92;3m [0m[92;3m*[0m[92;3m/[0m
diff --git a/tests/snapshots/cli__samples_side_by_side@context_1.rs.snap b/tests/snapshots/cli__samples_side_by_side@context_1.rs.snap
new file mode 100644
index 0000000000..e5902b1af3
--- /dev/null
+++ b/tests/snapshots/cli__samples_side_by_side@context_1.rs.snap
@@ -0,0 +1,22 @@
+---
+source: tests/cli.rs
+expression: stdout
+input_file: sample_files/context_1.rs
+---
+[1m[93msample_files/context_2.rs[39m[0m[2m --- 1/2 --- Rust[0m
+[2m1 [0m[1mfn[0m print_diff_result() { [2m1 [0m[1mfn[0m print_diff_result() {
+[91;1m2 [0m [91;1mif[0m [91msummary[0m [91;1m{[0m [92;1m2 [0m [92;1mmatch[0m [92;1m([0m[92;1m)[0m [92;1m{[0m
+[91;1m3 [0m [91;1mif[0m [91mprint_unchanged[0m [91;1m{[0m [92;1m3 [0m [92mx[0m [92m=>[0m [92;1m{[0m
+[91;1m4 [0m [91;1m}[0m [2m. [0m
+[91;1m5 [0m [91;1m}[0m [2m. [0m
+[91;1m6 [0m [2m. [0m
+[2m7 [0m [1mlet[0m opposite_to_lhs = opposite_positions([1m&[0msummary.lhs_positions); [2m4 [0m [1mlet[0m opposite_to_lhs = opposite_positions([1m&[0msummary.lhs_positions);
+[2m8 [0m [2m5 [0m
+
+[1msample_files/context_2.rs[0m[2m --- 2/2 --- Rust[0m
+[2m12 [0m[2m 9 [0m );
+[2m13 [0m[2m10 [0m
+[2m14 [0m[2m11 [0m [1mlet[0m lang_name;
+[2m.. [0m[92;1m12 [0m [92;1m}[0m
+[2m.. [0m[92;1m13 [0m [92;1m}[0m
+[2m15 [0m[2m14 [0m}
diff --git a/tests/snapshots/cli__samples_side_by_side@contiguous_1.js.snap b/tests/snapshots/cli__samples_side_by_side@contiguous_1.js.snap
new file mode 100644
index 0000000000..7687e82454
--- /dev/null
+++ b/tests/snapshots/cli__samples_side_by_side@contiguous_1.js.snap
@@ -0,0 +1,13 @@
+---
+source: tests/cli.rs
+expression: stdout
+input_file: sample_files/contiguous_1.js
+---
+[1m[93msample_files/contiguous_2.js[39m[0m[2m --- JavaScript[0m
+[2m1 [0m[92;1m1 [0m[92;3m// There are multiple possible diffs here, but we want to prefer[0m
+[2m. [0m[92;1m2 [0m[92;3m// showing A and B on the same line.[0m
+[2m2 [0m[2m3 [0m[1mvar[0m x [1m=[0m [
+[2m3 [0m[2m4 [0m [95m"A"[0m, [95m"B"[0m,
+[2m. [0m[92;1m5 [0m [92m"A"[0m[92m,[0m [92m"B"[0m[92m,[0m
+[2m4 [0m[2m6 [0m [95m"C"[0m, [95m"D"[0m,
+[2m5 [0m[2m7 [0m];
diff --git a/tests/snapshots/cli__samples_side_by_side@css_1.css.snap b/tests/snapshots/cli__samples_side_by_side@css_1.css.snap
new file mode 100644
index 0000000000..fb50ee3843
--- /dev/null
+++ b/tests/snapshots/cli__samples_side_by_side@css_1.css.snap
@@ -0,0 +1,29 @@
+---
+source: tests/cli.rs
+expression: stdout
+input_file: sample_files/css_1.css
+---
+[1m[93msample_files/css_2.css[39m[0m[2m --- CSS[0m
+[2m 1 [0m[94;3m/* hello[0m [2m 1 [0m[94;3m/* hello[0m
+[2m 2 [0m[94;3mworld */[0m [2m 2 [0m[94;3mworld */[0m
+[91;1m 3 [0m.[91mfoo1[0m { [92;1m 3 [0m.[92mbar[0m {
+[91;1m 4 [0m margin: [91m0[0m [91m0[0m [91m20px[0m 0; [2m 4 [0m margin: 0;
+[2m 5 [0m} [2m 5 [0m}
+[2m 6 [0m [2m 6 [0m
+[91;1m 7 [0m.[91mbar[0m { [92;1m 7 [0m.[92mfoo1[0m {
+[2m 8 [0m margin: 0; [92;1m 8 [0m margin: [92m0[0m [92m0[0m [92m20px[0m 0;
+[2m . [0m [92;1m 9 [0m [92mcolor[0m[92m:[0m [92mgreen[0m[92m;[0m
+[2m 9 [0m} [2m10 [0m}
+[2m10 [0m [2m11 [0m
+[2m11 [0m.baz { [2m12 [0m.baz {
+[91;1m12 [0m color: [91myellow[0m; [92;1m13 [0m color: [92mblue[0m;
+[91;1m13 [0m font-family: [91m"Before"[0m; [92;1m14 [0m font-family: [92m"After"[0m;
+[2m14 [0m} [2m15 [0m}
+[2m15 [0m [2m16 [0m
+[2m16 [0m.another { [2m17 [0m.another {
+[91;1m17 [0m margin-left: [91m0.5em[0m; [92;1m18 [0m margin-left: [92m1em[0m;
+[2m18 [0m} [2m19 [0m}
+[2m [0m [92;1m20 [0m
+[2m [0m [92;1m21 [0m[92;1mp[0m [92;1m{[0m
+[2m [0m [92;1m22 [0m [92mcolor[0m[92m:[0m [92m#000[0m[92m;[0m
+[2m [0m [92;1m23 [0m[92;1m}[0m
diff --git a/tests/snapshots/cli__samples_side_by_side@dart_1.dart.snap b/tests/snapshots/cli__samples_side_by_side@dart_1.dart.snap
new file mode 100644
index 0000000000..aa617aee78
--- /dev/null
+++ b/tests/snapshots/cli__samples_side_by_side@dart_1.dart.snap
@@ -0,0 +1,13 @@
+---
+source: tests/cli.rs
+expression: stdout
+input_file: sample_files/dart_1.dart
+---
+[1m[93msample_files/dart_2.dart[39m[0m[2m --- Dart[0m
+[2m1 [0m[1mvoid[0m test() { [2m1 [0m[1mvoid[0m test() {
+[91;1m2 [0m [91;1mif[0m [91;1m([0m[91mx[0m[91;1m)[0m [91;1m{[0m [2m. [0m
+[91;1m3 [0m [1mObject[0m()[91m.[0ma()[91m.[0mb(); [92;1m2 [0m [1mObject[0m()[92;1m..[0ma()[92;1m..[0mb();
+[91;1m4 [0m [91;1m}[0m [2m. [0m
+[2m5 [0m [2m3 [0m
+[91;1m6 [0m expect(a.b[91;1m([0mc.d()[91;1m)[0m.x); [92;1m4 [0m expect(a.b[92m.[0mc.d()[92m![0m.x);
+[2m7 [0m} [2m5 [0m}
diff --git a/tests/snapshots/cli__samples_side_by_side@devicetree_1.dts.snap b/tests/snapshots/cli__samples_side_by_side@devicetree_1.dts.snap
new file mode 100644
index 0000000000..d31ae3c186
--- /dev/null
+++ b/tests/snapshots/cli__samples_side_by_side@devicetree_1.dts.snap
@@ -0,0 +1,64 @@
+---
+source: tests/cli.rs
+expression: stdout
+input_file: sample_files/devicetree_1.dts
+---
+[1m[93msample_files/devicetree_2.dts[39m[0m[2m --- 1/2 --- Device Tree[0m
+[2m 5 [0m[1m/memreserve/[0m 0x0000000000000000 0x0000000000000014; [2m 5 [0m[1m/memreserve/[0m 0x0000000000000000 0x0000000000000014;
+[2m 6 [0m [2m 6 [0m
+[2m 7 [0m/ { [2m 7 [0m/ {
+[91;1m 8 [0m model = [91m"MyBoardName"[0m; [92;1m 8 [0m model = [92m"MyBoardNamev2"[0m;
+[2m 9 [0m compatible = "MyBoardName", "MyBoardFamilyName"; [92;1m 9 [0m compatible = "MyBoardName", "MyBoardFamilyName"[92m,[0m [92m"MyBoardRevision"[0m;
+[2m10 [0m #address-cells = <2>; [2m10 [0m #address-cells = <2>;
+[2m11 [0m #size-cells = <2>; [2m11 [0m #size-cells = <2>;
+[2m12 [0m [2m12 [0m
+
+[1msample_files/devicetree_2.dts[0m[2m --- 2/2 --- Device Tree[0m
+[2m25 [0m d-cache-size = <32768>; [2m25 [0m d-cache-size = <32768>;
+[2m26 [0m }; [2m26 [0m };
+[91;1m27 [0m [2m.. [0m
+[91;1m28 [0m [91mPowerPC,970[0m[91m@[0m[91;1m1[0m [91;1m{[0m [2m.. [0m
+[91;1m29 [0m [91mname[0m [91m=[0m [91m"PowerPC,970"[0m[91m;[0m [2m.. [0m
+[91;1m30 [0m [91mdevice_type[0m [91m=[0m [91m"cpu"[0m[91m;[0m [2m.. [0m
+[91;1m31 [0m [91mreg[0m [91m=[0m [91;1m<[0m[91m0x00000001[0m[91;1m>[0m[91m;[0m [2m.. [0m
+[91;1m32 [0m [91mclock-frequency[0m [91m=[0m [91;1m<[0m[91m1600000000[0m[91;1m>[0m[91m;[0m [2m.. [0m
+[91;1m33 [0m [91mtimebase-frequency[0m [91m=[0m [91;1m<[0m[91m33333333[0m[91;1m>[0m[91m;[0m [2m.. [0m
+[91;1m34 [0m [91mi-cache-size[0m [91m=[0m [91;1m<[0m[91m65536[0m[91;1m>[0m[91m;[0m [2m.. [0m
+[91;1m35 [0m [91md-cache-size[0m [91m=[0m [91;1m<[0m[91m32768[0m[91;1m>[0m[91m;[0m [2m.. [0m
+[91;1m36 [0m [91;1m}[0m[91m;[0m [2m.. [0m
+[91;1m37 [0m [2m.. [0m
+[2m38 [0m }; [2m27 [0m };
+[2m39 [0m [2m28 [0m
+[2m.. [0m [92;1m29 [0m [92mrandomparentnode[0m [92;1m{[0m
+[2m40 [0m randomnode { [2m30 [0m randomnode {
+[2m41 [0m string = "\xff\0stuffstuff\t\t\t\n\n\n"; [2m31 [0m string = "\xff\0stuffstuff\t\t\t\n\n\n";
+[2m42 [0m blob = [0a 0b 0c 0d de ea ad be ef]; [2m32 [0m blob = [0a 0b 0c 0d de ea ad be ef];
+[2m43 [0m ref = < &{/memory@[1m0[0m} >; [2m33 [0m ref = < &{/memory@[1m0[0m} >;
+[2m44 [0m mixed = "abc", [1234], <0xa 0xb 0xc>; [2m34 [0m mixed = "abc",
+[2m.. [0m [2m35 [0m [1234],
+[2m.. [0m [2m36 [0m <0xa 0xb 0xc>;
+[91;1m45 [0m [91mold[0m = <12345>; [92;1m37 [0m [92mnew[0m = <12345>;
+[2m46 [0m }; [92;1m38 [0m }[92m;[0m
+[2m.. [0m [92;1m39 [0m [92;1m}[0m;
+[2m47 [0m [2m40 [0m
+[2m48 [0m memory@[1m0[0m { [2m41 [0m memory@[1m0[0m {
+[2m49 [0m device_type = "memory"; [2m42 [0m device_type = "memory";
+[2m50 [0m [1mmemreg[0m: reg = <0x00000000 0x00000000 0x00000000 0x20000000>; [2m43 [0m [1mmemreg[0m: reg = <
+[2m.. [0m [2m44 [0m 0x00000000 0x00000000
+[2m.. [0m [2m45 [0m 0x00000000 0x20000000>;
+[2m51 [0m }; [2m46 [0m };
+[2m.. [0m [92;1m47 [0m
+[2m.. [0m [92;1m48 [0m [92mmemory[0m[92m@[0m[92;1m100000[0m [92;1m{[0m
+[2m.. [0m [92;1m49 [0m [92mdevice_type[0m [92m=[0m [92m"memory"[0m[92m;[0m
+[2m.. [0m [92;1m50 [0m [92;1mmemreg[0m[92m:[0m [92mreg[0m [92m=[0m [92;1m<[0m
+[2m.. [0m [92;1m51 [0m [92m0x00100000[0m [92m0x00000000[0m
+[2m.. [0m [92;1m52 [0m [92m0x00100000[0m [92m0x20000000[0m[92;1m>[0m[92m;[0m
+[2m.. [0m [92;1m53 [0m [92;1m}[0m[92m;[0m
+[2m52 [0m [2m54 [0m
+[2m53 [0m chosen { [2m55 [0m chosen {
+[91;1m54 [0m [91mbootargs[0m [91m=[0m [91m"root=/dev/sda2"[0m[91m;[0m [2m.. [0m
+[2m55 [0m linux,platform = <0x600>; [2m56 [0m linux,platform = <0x600>;
+[2m.. [0m [92;1m57 [0m [92mbootargs[0m [92m=[0m [92m"root=/dev/sda2"[0m[92m;[0m
+[2m56 [0m }; [2m58 [0m };
+[2m57 [0m [2m59 [0m
+[2m58 [0m}; [2m60 [0m};
diff --git a/tests/snapshots/cli__samples_side_by_side@elisp_1.el.snap b/tests/snapshots/cli__samples_side_by_side@elisp_1.el.snap
new file mode 100644
index 0000000000..49b0daf052
--- /dev/null
+++ b/tests/snapshots/cli__samples_side_by_side@elisp_1.el.snap
@@ -0,0 +1,24 @@
+---
+source: tests/cli.rs
+expression: stdout
+input_file: sample_files/elisp_1.el
+---
+[1m[93msample_files/elisp_2.el[39m[0m[2m --- 1/2 --- Emacs Lisp[0m
+[2m3 [0m[94;3m;; Copyright (C) 2013 Wilfred Hughes[0m [2m3 [0m[94;3m;; Copyright (C) 2013 Wilfred Hughes[0m
+[2m4 [0m [2m4 [0m
+[2m5 [0m[94;3m;; Author: Wilfred Hughes [0m [2m5 [0m[94;3m;; Author: Wilfred Hughes [0m
+[91;1m6 [0m[91;3m;[0m[91;3m;[0m[91;3m [0m[91;3mVersion[0m[91;3m:[0m[91;3m [0m[91;3m0[0m[91;3m.[0m[91;1;3;4m5[0m [92;1m6 [0m[92;3m;[0m[92;3m;[0m[92;3m [0m[92;3mVersion[0m[92;3m:[0m[92;3m [0m[92;3m0[0m[92;3m.[0m[92;1;3;4m6[0m
+[2m7 [0m[94;3m;; Keywords: hash table, hash map, hash[0m [2m7 [0m[94;3m;; Keywords: hash table, hash map, hash[0m
+[2m8 [0m [2m8 [0m
+[2m9 [0m[94;3m;; This program is free software; you can redistribute it and/or modify[0m [2m9 [0m[94;3m;; This program is free software; you can redistribute it and/or modify[0m
+
+[1msample_files/elisp_2.el[0m[2m --- 2/2 --- Emacs Lisp[0m
+[2m40 [0m[2m40 [0m([1mdefun[0m ht-from-alist (alist)
+[2m41 [0m[2m41 [0m [94;3m"Create a hash table with initial values according to ALIST."[0m
+[2m42 [0m[2m42 [0m ([1mlet[0m ((h (ht-create)))
+[2m.. [0m[92;1m43 [0m [92;3m;; the first key-value pair in an alist gets precedence, so we[0m
+[2m.. [0m[92;1m44 [0m [92;3m;; start from the end of the list:[0m
+[2m43 [0m[92;1m45 [0m (dolist (pair [92;1m([0m[92mreverse[0m alist[92;1m)[0m h)
+[2m44 [0m[2m46 [0m ([1mlet[0m ((key (car pair))
+[2m45 [0m[2m47 [0m (value (cdr pair)))
+[2m46 [0m[2m48 [0m (ht-set h key value)))))
diff --git a/tests/snapshots/cli__samples_side_by_side@elisp_contiguous_1.el.snap b/tests/snapshots/cli__samples_side_by_side@elisp_contiguous_1.el.snap
new file mode 100644
index 0000000000..88201c315d
--- /dev/null
+++ b/tests/snapshots/cli__samples_side_by_side@elisp_contiguous_1.el.snap
@@ -0,0 +1,15 @@
+---
+source: tests/cli.rs
+expression: stdout
+input_file: sample_files/elisp_contiguous_1.el
+---
+[1m[93msample_files/elisp_contiguous_2.el[39m[0m[2m --- Emacs Lisp[0m
+[2m1 [0mA B [2m1 [0mA B
+[2m. [0m [92;1m2 [0m[92mA[0m [92mB[0m
+[2m2 [0mC D [2m3 [0mC D
+[2m3 [0m [2m4 [0m
+[2m4 [0mX Y [2m5 [0mX Y
+[91;1m5 [0m[91mX[0m [91mNovel[0m [2m. [0m
+[2m6 [0mX Z [2m6 [0mX Z
+[2m7 [0m [2m7 [0m
+[2m8 [0mEnd [2m8 [0mEnd
diff --git a/tests/snapshots/cli__samples_side_by_side@elm_1.elm.snap b/tests/snapshots/cli__samples_side_by_side@elm_1.elm.snap
new file mode 100644
index 0000000000..ba5cef5ba3
--- /dev/null
+++ b/tests/snapshots/cli__samples_side_by_side@elm_1.elm.snap
@@ -0,0 +1,65 @@
+---
+source: tests/cli.rs
+expression: stdout
+input_file: sample_files/elm_1.elm
+---
+[1m[93msample_files/elm_2.elm[39m[0m[2m --- Elm[0m
+[91;1m 1 [0m[1mmodule[0m Main [1mexposing[0m (blue, [91mgreen[0m[91m,[0m list, x, y[91m,[0m [91mz[0m) [2m 1 [0m[1mmodule[0m Main [1mexposing[0m
+[2m . [0m [2m 2 [0m ( blue
+[2m . [0m [2m 3 [0m , list
+[2m . [0m [2m 4 [0m , x
+[2m . [0m [2m 5 [0m , y
+[2m . [0m [2m 6 [0m )
+[2m 2 [0m [2m 7 [0m
+[2m 3 [0m [2m 8 [0m
+[91;1m 4 [0m[91;3m{[0m[91;3m-[0m[91;3m [0m[91;1;3;4mbar[0m [92;1m 9 [0m[92;3m{[0m[92;3m-[0m[92;3m [0m[92;1;3;4mfoo[0m
+[91;1m 5 [0m[91;3m [0m[91;3m-[0m[91;3m}[0m [92;1m10 [0m[92;3m [0m[92;3m-[0m[92;3m}[0m
+[2m 6 [0mlist [1m:[0m List Int [2m11 [0mlist [1m:[0m List Int
+[2m 7 [0mlist [1m=[0m [2m12 [0mlist [1m=[0m
+[2m 8 [0m [ 1, 2, 3 ] [2m13 [0m [ 1
+[2m . [0m [2m14 [0m , 2
+[2m . [0m [2m15 [0m , 3
+[2m . [0m [92;1m16 [0m [92m,[0m [92m4[0m
+[2m . [0m [2m17 [0m ]
+[2m 9 [0m [2m18 [0m
+[2m10 [0m [2m19 [0m
+[2m11 [0mblue [1m:[0m a [1m->[0m String [2m20 [0mblue [1m:[0m a [1m->[0m String
+[2m12 [0mblue [1m=[0m [2m21 [0mblue [1m=[0m
+[91;1m13 [0m [91malways[0m "blue" [92;1m22 [0m [92;1m\[0m[92m_[0m [92;1m->[0m "blue"
+[2m14 [0m [2m23 [0m
+[2m15 [0m [2m24 [0m
+[91;1m16 [0mgreen [1m:[0m [91ma[0m [91;1m->[0m String [2m25 [0mgreen [1m:[0m String
+[2m17 [0mgreen [1m=[0m [2m26 [0mgreen [1m=[0m
+[91;1m18 [0m [91malways[0m "blue" [92;1m27 [0m [92m"yellow"[0m [92m++[0m "blue"
+[2m19 [0m [2m28 [0m
+[2m20 [0m [2m29 [0m
+[91;1m21 [0m[91my[0m [1m:[0m Int [92;1m30 [0m[92mx[0m [1m:[0m Int
+[91;1m22 [0m [2m.. [0m
+[91;1m23 [0m [2m.. [0m
+[2m24 [0mx [1m=[0m [2m31 [0mx [1m=[0m
+[2m25 [0m (*) 2 4 [92;1m32 [0m (*) 2 [92m<|[0m 4
+[2m26 [0m [2m33 [0m
+[2m27 [0m [2m34 [0m
+[2m28 [0my [1m:[0m Int [2m35 [0my [1m:[0m Int
+[2m29 [0my [1m=[0m [2m36 [0my [1m=[0m
+[91;1m30 [0m (*) 2 [91m4[0m [92;1m37 [0m [92m4[0m [92m|>[0m (*) 2
+[91;1m31 [0m [2m.. [0m
+[91;1m32 [0m [2m.. [0m
+[91;1m33 [0m[91mz[0m [91;1m:[0m [91mString[0m [2m.. [0m
+[91;1m34 [0m[91mz[0m [91;1m=[0m [2m.. [0m
+[91;1m35 [0m [91m"abc"[0m [2m.. [0m
+[2m36 [0m [2m38 [0m
+[2m37 [0m [2m39 [0m
+[2m38 [0mfn [1m:[0m () [1m->[0m Int [1m->[0m List String [1m->[0m String [2m40 [0mfn [1m:[0m
+[2m.. [0m [2m41 [0m ()
+[2m.. [0m [2m42 [0m [1m->[0m Int
+[2m.. [0m [2m43 [0m [1m->[0m List String
+[2m.. [0m [92;1m44 [0m [92;1m->[0m [92;1m([0m[92;1m)[0m
+[2m.. [0m [2m45 [0m [1m->[0m String
+[91;1m39 [0mfn [91m_[0m n strings [1m=[0m [92;1m46 [0mfn [92;1m([0m[92;1m)[0m n strings [92;1m([0m[92;1m)[0m [1m=[0m
+[91;1m40 [0m [91;1mlet[0m [2m.. [0m
+[91;1m41 [0m [91mfoo[0m [91;1m:[0m [91mList[0m [91mString[0m [91;1m->[0m [91mString[0m [2m.. [0m
+[91;1m42 [0m [91mfoo[0m [91;1m=[0m [2m.. [0m
+[2m43 [0m String.join (String.fromInt n) [2m47 [0m String.join (String.fromInt n) strings
+[91;1m44 [0m [91;1min[0m [2m [0m
+[91;1m45 [0m [91mfoo[0m strings [2m [0m
diff --git a/tests/snapshots/cli__samples_side_by_side@elvish_1.elv.snap b/tests/snapshots/cli__samples_side_by_side@elvish_1.elv.snap
new file mode 100644
index 0000000000..fc39a6670b
--- /dev/null
+++ b/tests/snapshots/cli__samples_side_by_side@elvish_1.elv.snap
@@ -0,0 +1,18 @@
+---
+source: tests/cli.rs
+expression: stdout
+input_file: sample_files/elvish_1.elv
+---
+[1m[93msample_files/elvish_2.elv[39m[0m[2m --- Elvish[0m
+[2m 3 [0m[1mcurl[0m https://api.github.com/repos/elves/elvish/issues | [2m 3 [0m[1mcurl[0m https://api.github.com/repos/elves/elvish/issues |
+[2m 4 [0m [1mfrom-json[0m | [1mall[0m ([1mone[0m) [1m|[0m [2m 4 [0m [1mfrom-json[0m | [1mall[0m ([1mone[0m) [1m|[0m
+[2m 5 [0m [1meach[0m {|x| [1mecho[0m ([1mexact-num[0m $[1mx[0m[number]): $[1mx[0m[title] } [1m|[0m [2m 5 [0m [1meach[0m {|x| [1mecho[0m ([1mexact-num[0m $[1mx[0m[number]): $[1mx[0m[title] } [1m|[0m
+[91;1m 6 [0m [1mhead[0m -n [91m7[0m [92;1m 6 [0m [1mhead[0m -n [92m5[0m
+[2m 7 [0m [2m 7 [0m
+[91;1m 8 [0m[1mif[0m $[91;1mtrue[0m { [1mecho[0m good } [1melse[0m { [1mecho[0m bad } [92;1m 8 [0m[1mif[0m $[92;1mfalse[0m { [1mecho[0m good } [1melse[0m { [1mecho[0m bad }
+[2m 9 [0m [2m 9 [0m
+[2m10 [0m[1mfor[0m x [lorem ipsum] { [2m10 [0m[1mfor[0m x [lorem ipsum] {
+[91;1m11 [0m [1mecho[0m $[1mx[0m[91m.pdf[0m [92;1m11 [0m [1mecho[0m $[1mx[0m[92m.rs[0m
+[2m12 [0m} [2m12 [0m}
+[2m13 [0m [2m13 [0m
+[2m14 [0m [1mtry[0m { [2m14 [0m [1mtry[0m {
diff --git a/tests/snapshots/cli__samples_side_by_side@hack_1.php.snap b/tests/snapshots/cli__samples_side_by_side@hack_1.php.snap
new file mode 100644
index 0000000000..cc9dd39fa4
--- /dev/null
+++ b/tests/snapshots/cli__samples_side_by_side@hack_1.php.snap
@@ -0,0 +1,13 @@
+---
+source: tests/cli.rs
+expression: stdout
+input_file: sample_files/hack_1.php
+---
+[1m[93msample_files/hack_2.php[39m[0m[2m --- Hack[0m
+[2m3 [0m[94;3m/** [0m
+[2m4 [0m[94;3m * Do stuff[0m
+[2m5 [0m[94;3m */[0m
+[92;1m6 [0m[1mfunction[0m foo(): vec<[92m?[0mint> {
+[2m7 [0m $x = [95m"foo"[0m;
+[92;1m8 [0m [1mreturn[0m vec[1[92m,[0m [92mnull[0m];
+[2m9 [0m}
diff --git a/tests/snapshots/cli__samples_side_by_side@hare_1.ha.snap b/tests/snapshots/cli__samples_side_by_side@hare_1.ha.snap
new file mode 100644
index 0000000000..ae552ca5cd
--- /dev/null
+++ b/tests/snapshots/cli__samples_side_by_side@hare_1.ha.snap
@@ -0,0 +1,20 @@
+---
+source: tests/cli.rs
+expression: stdout
+input_file: sample_files/hare_1.ha
+---
+[1m[93msample_files/hare_2.ha[39m[0m[2m --- Text (1 Hare parse error, exceeded DFT_PARSE_ERROR_LIMIT)[0m
+[2m1 [0muse fmt; [2m 1 [0muse fmt;
+[2m2 [0m [2m 2 [0m
+[2m3 [0mexport fn main() void = { [2m 3 [0mexport fn main() void = {
+[91;1m4 [0m[91m [0m[91;1mfmt[0m[91;1m:[0m[91;1m:[0m[91;1mprintln[0m[91;1m([0m[91m"[0m[91mHello[0m[91m,[0m[91m [0m[91mworld[0m[91m![0m[91m"[0m[91m)[0m[91m;[0m [92;1m 4 [0m[92m [0m[92;1mconst[0m[92;1m [0m[92;1mgreetings[0m[92;1m [0m[92;1m=[0m[92;1m [0m[92;1m[[0m
+[2m. [0m [92;1m 5 [0m[92;1m [0m[92;1m [0m[92m"[0m[92mHello[0m[92m,[0m[92m [0m[92mworld[0m[92m![0m[92m"[0m[92;1m,[0m
+[2m. [0m [92;1m 6 [0m[92;1m [0m[92;1m [0m[92;1m"[0m[92;1m¡[0m[92;1mHola[0m[92;1m [0m[92;1mMundo[0m[92;1m![0m[92;1m"[0m[92;1m,[0m
+[2m. [0m [92;1m 7 [0m[92;1m [0m[92;1m [0m[92;1m"[0m[92;1mΓειά[0m[92;1m [0m[92;1mσου[0m[92;1m [0m[92;1mΚόσμε[0m[92;1m![0m[92;1m"[0m[92;1m,[0m
+[2m. [0m [92;1m 8 [0m[92;1m [0m[92;1m [0m[92;1m"[0m[92;1mПривет[0m[92;1m,[0m[92;1m [0m[92;1mмир[0m[92;1m![0m[92;1m"[0m[92;1m,[0m
+[2m. [0m [92;1m 9 [0m[92;1m [0m[92;1m [0m[92;1m"[0m[92;1mこんにちは世界[0m[92;1m![0m[92;1m"[0m[92;1m,[0m
+[2m. [0m [92;1m10 [0m[92;1m [0m[92;1m][0m[92;1m;[0m
+[2m. [0m [92;1m11 [0m[92;1m [0m[92;1mfor[0m[92;1m [0m[92;1m([0m[92;1mlet[0m[92;1m [0m[92;1mi[0m[92;1m [0m[92;1m=[0m[92;1m [0m[92;1m0z[0m[92;1m;[0m[92;1m [0m[92;1mi[0m[92;1m [0m[92;1m<[0m[92;1m [0m[92;1mlen[0m[92;1m([0m[92;1mgreetings[0m[92m)[0m[92;1m;[0m[92;1m [0m[92;1mi[0m[92;1m [0m[92;1m+[0m[92;1m=[0m[92;1m [0m[92;1m1[0m[92;1m)[0m[92;1m [0m[92;1m{[0m
+[2m. [0m [92;1m12 [0m[92;1m [0m[92;1m [0m[92;1mfmt[0m[92;1m:[0m[92;1m:[0m[92;1mprintln[0m[92;1m([0m[92;1mgreetings[0m[92;1m[[0m[92;1mi[0m[92;1m][0m[92;1m)[0m[92;1m![0m[92;1m;[0m
+[2m. [0m [92;1m13 [0m[92;1m [0m[92;1m}[0m[92m;[0m
+[2m5 [0m}; [2m14 [0m};
diff --git a/tests/snapshots/cli__samples_side_by_side@haskell_1.hs.snap b/tests/snapshots/cli__samples_side_by_side@haskell_1.hs.snap
new file mode 100644
index 0000000000..887f347d62
--- /dev/null
+++ b/tests/snapshots/cli__samples_side_by_side@haskell_1.hs.snap
@@ -0,0 +1,15 @@
+---
+source: tests/cli.rs
+expression: stdout
+input_file: sample_files/haskell_1.hs
+---
+[1m[93msample_files/haskell_2.hs[39m[0m[2m --- Haskell[0m
+[2m1 [0m [92;1m1 [0m[92;1mimport[0m [92;1mSystem.Process[0m
+[2m. [0m [92;1m2 [0m
+[2m2 [0mfoo x [1m=[0m x [1m+[0m 1 [92;1m3 [0mfoo x [92my[0m [1m=[0m x [1m+[0m 1 [92;1m+[0m [92mW.peek[0m [92my[0m
+[2m3 [0m [2m4 [0m
+[2m4 [0mbar _ [1m=[0m [95m'c'[0m [2m5 [0mbar _ [1m=[0m [95m'c'[0m
+[2m5 [0m [2m6 [0m
+[91;1m6 [0m[91;3m-[0m[91;3m-[0m[91;3m [0m[91;3m|[0m[91;3m [0m[91;1;3;4mHello[0m[91;3m [0m[91;3mworld[0m [92;1m7 [0m[92;3m-[0m[92;3m-[0m[92;3m [0m[92;3m|[0m[92;3m [0m[92;1;3;4mGoodbye[0m[92;3m [0m[92;3mworld[0m
+[2m7 [0misOne 1 [1m=[0m [1mTrue[0m [2m8 [0misOne 1 [1m=[0m [1mTrue[0m
+[2m8 [0misOne _ [1m=[0m [1mFalse[0m [2m9 [0misOne _ [1m=[0m [1mFalse[0m
diff --git a/tests/snapshots/cli__samples_side_by_side@hcl_1.hcl.snap b/tests/snapshots/cli__samples_side_by_side@hcl_1.hcl.snap
new file mode 100644
index 0000000000..e5ed0fc6a1
--- /dev/null
+++ b/tests/snapshots/cli__samples_side_by_side@hcl_1.hcl.snap
@@ -0,0 +1,71 @@
+---
+source: tests/cli.rs
+expression: stdout
+input_file: sample_files/hcl_1.hcl
+---
+[1m[93msample_files/hcl_2.hcl[39m[0m[2m --- 1/4 --- HCL[0m
+[2m10 [0m [1mesc2[0m = "$${} %%{}" [2m10 [0m [1mesc2[0m = "$${} %%{}"
+[2m11 [0m [1mnum1[0m = 2 [2m11 [0m [1mnum1[0m = 2
+[2m12 [0m [1mnum2[0m = 2.112 [2m12 [0m [1mnum2[0m = 2.112
+[91;1m13 [0m [1mnum3[0m = [91m2.112e-12[0m [92;1m13 [0m [1mnum3[0m = [92m"Hello, World"[0m
+[2m14 [0m [1mnum4[0m = 2.112e+12 [2m14 [0m [1mnum4[0m = 2.112e+12
+[2m15 [0m [1mnum5[0m = 2.112E+12 [2m15 [0m [1mnum5[0m = 2.112E+12
+[2m16 [0m [1mnum6[0m = 2.112E-12 [2m16 [0m [1mnum6[0m = 2.112E-12
+[2m17 [0m [1mnum7[0m = 0x21FF [2m17 [0m [1mnum7[0m = 0x21FF
+[2m.. [0m [92;1m18 [0m [92;1mstrx[0m [92m=[0m [92m"Hello, Hcl"[0m
+[2m18 [0m} [2m19 [0m}
+[2m19 [0m [2m20 [0m
+[2m20 [0m[1mresource[0m "example" "comments" { [2m21 [0m[1mresource[0m "example" "comments" {
+[91;1m21 [0m [91;3m/[0m[91;3m/[0m[91;3m [0m[91;3mcomment[0m [92;1m22 [0m [92;3m/[0m[92;3m/[0m[92;3m [0m[92;3mcomment[0m[92;1;3;4m,[0m [92;1;3;4mWorld[0m[92;1;3;4m![0m
+[91;1m22 [0m [91;3m# comment[0m [2m.. [0m
+[2m23 [0m [94;3m/*[0m [2m23 [0m [94;3m/*[0m
+[2m24 [0m[94;3m comment[0m [2m24 [0m[94;3m comment[0m
+[2m25 [0m[94;3m */[0m [2m25 [0m[94;3m */[0m
+
+[1msample_files/hcl_2.hcl[0m[2m --- 2/4 --- HCL[0m
+[2m34 [0m [1mfor1[0m = { [1mfor[0m [1mi[0m, [1mv[0m [1min[0m ["a", "a", "b"] : [1mv[0m => [1mi[0m... } [2m34 [0m [1mfor1[0m = { [1mfor[0m [1mi[0m, [1mv[0m [1min[0m ["a", "a", "b"] : [1mv[0m => [1mi[0m... }
+[2m35 [0m [1mfor2[0m = [ [1mfor[0m [1mk[0m, [1mv[0m [1min[0m [1mx[0m : [95m"[0m${[1mk[0m}[95m-[0m${[1mv[0m}[95m"[0m ] [2m35 [0m [1mfor2[0m = [ [1mfor[0m [1mk[0m, [1mv[0m [1min[0m [1mx[0m : [95m"[0m${[1mk[0m}[95m-[0m${[1mv[0m}[95m"[0m ]
+[2m36 [0m [1mfor3[0m = { [1mfor[0m [1mk[0m, [1mv[0m [1min[0m [1mx[0m: [1mk[0m => [1mv[0m } [2m36 [0m [1mfor3[0m = { [1mfor[0m [1mk[0m, [1mv[0m [1min[0m [1mx[0m: [1mk[0m => [1mv[0m }
+[91;1m37 [0m [91;1mfor4[0m [91m=[0m [91;1m[[0m [91;1mfor[0m [91;1mv[0m [91;1min[0m [91;1mx[0m [91m:[0m [91;1mv[0m [91;1m][0m [2m.. [0m
+[91;1m38 [0m [1mfor5[0m = { [1mfor[0m [1mv[0m [1min[0m [91;1mx[0m : [1mv[0m => [1mv[0m } [92;1m37 [0m [1mfor5[0m = { [1mfor[0m [1mv[0m [1min[0m [92;1my[0m : [1mv[0m => [1mv[0m [92;1m+[0m [92m1[0m }
+[2m39 [0m [1mfor6[0m = [ [1mfor[0m [1mv[0m [1min[0m [1mx[0m : [1mv[0m [1mif[0m [1mv[0m [1m<[0m 3 ] [2m38 [0m [1mfor6[0m = [ [1mfor[0m [1mv[0m [1min[0m [1mx[0m : [1mv[0m [1mif[0m [1mv[0m [1m<[0m 3 ]
+[2m40 [0m} [2m39 [0m}
+[2m41 [0m [2m40 [0m
+[2m42 [0m[1mresource[0m "example" "function_expressions" { [2m41 [0m[1mresource[0m "example" "function_expressions" {
+[2m43 [0m [1mfunc1[0m = [1mis_number[0m("123") [2m42 [0m [1mfunc1[0m = [1mis_number[0m("123")
+[91;1m44 [0m [91;1mfunc2[0m [91m=[0m [91;1mmultiline[0m[91;1m([0m [2m.. [0m
+[91;1m45 [0m [91;1marg1[0m[91m,[0m [2m.. [0m
+[91;1m46 [0m [91;1marg2[0m[91m,[0m [2m.. [0m
+[91;1m47 [0m [91;1marg3[0m[91m...[0m [2m.. [0m
+[91;1m48 [0m [91;1m)[0m [2m.. [0m
+[2m49 [0m [1mfunc3[0m = [1mwithobject[0m({ [2m43 [0m [1mfunc3[0m = [1mwithobject[0m({
+[2m50 [0m "foo" : 2, [2m44 [0m "foo" : 2,
+[2m51 [0m "bar" : [1mbaz[0m, [2m45 [0m "bar" : [1mbaz[0m,
+
+[1msample_files/hcl_2.hcl[0m[2m --- 3/4 --- HCL[0m
+[2m55 [0m} [2m49 [0m}
+[2m56 [0m [2m50 [0m
+[2m57 [0m[1mresource[0m "example" "binary_expressions" { [2m51 [0m[1mresource[0m "example" "binary_expressions" {
+[91;1m58 [0m [1mcond1[0m = (1 [1m==[0m 2) ? 1 : [91m"foobar"[0m [92;1m52 [0m [1mcond1[0m = (1 [1m==[0m 2) ? 1 : [92m"Hello, HCL"[0m
+[2m59 [0m [1mbin1[0m = ((1[1m+[0m2)[1m%[0m3)[1m*[0m4 [2m53 [0m [1mbin1[0m = ((1[1m+[0m2)[1m%[0m3)[1m*[0m4
+[2m60 [0m} [2m54 [0m}
+[2m61 [0m [2m55 [0m
+
+[1msample_files/hcl_2.hcl[0m[2m --- 4/4 --- HCL[0m
+[2m78 [0m %{~endif~} [2m72 [0m %{~endif~}
+[2m79 [0m EOF [2m73 [0m EOF
+[2m80 [0m [2m74 [0m
+[91;1m81 [0m [1mtpl6[0m = [91m<<-EOF[0m [92;1m75 [0m [1mtpl6[0m = [92m<<-EOF[0m
+[91;1m82 [0m[91m %{ for a in f(b) ~}[0m [92;1m76 [0m[92m %{ for a in f(x) ~}[0m
+[91;1m83 [0m[91m %{~if a~} "true" %{~else~} "false" %{~endif~}[0m [92;1m77 [0m[92m %{~if a~} "true" %{~else~} "false" %{~endif~}[0m
+[91;1m84 [0m[91m %{ endfor ~}[0m [92;1m78 [0m[92m %{ endfor ~}[0m
+[91;1m85 [0m[91m EOF[0m [92;1m79 [0m[92m EOF[0m
+[2m.. [0m [92;1m80 [0m
+[2m.. [0m [92;1m81 [0m [92;1mtpl7[0m [92m=[0m [92m<<-EOF[0m
+[2m.. [0m [92;1m82 [0m[92m %{ for a in f(b) ~}[0m
+[2m.. [0m [92;1m83 [0m[92m "true"[0m
+[2m.. [0m [92;1m84 [0m[92m %{ endfor ~}[0m
+[2m.. [0m [92;1m85 [0m[92m EOF[0m
+[2m86 [0m} [2m86 [0m}
+[2m87 [0m [2m87 [0m
+[2m88 [0m[1mresource[0m "example" "nested_blocks" { [2m88 [0m[1mresource[0m "example" "nested_blocks" {
diff --git a/tests/snapshots/cli__samples_side_by_side@hello_world_1.smali.snap b/tests/snapshots/cli__samples_side_by_side@hello_world_1.smali.snap
new file mode 100644
index 0000000000..2e8ab19cca
--- /dev/null
+++ b/tests/snapshots/cli__samples_side_by_side@hello_world_1.smali.snap
@@ -0,0 +1,28 @@
+---
+source: tests/cli.rs
+expression: stdout
+input_file: sample_files/hello_world_1.smali
+---
+[1m[93msample_files/hello_world_2.smali[39m[0m[2m --- 1/2 --- Smali[0m
+[91;1m1 [0m[1m.class[0m public [95mL[0m[91;1mHelloWorld[0m; [92;1m1 [0m[1m.class[0m public [95mL[0m[92;1mHelloPerson[0m;
+[2m2 [0m [2m2 [0m
+[2m3 [0m[94;3m#Ye olde hello world application[0m [2m3 [0m[94;3m#Ye olde hello world application[0m
+[2m4 [0m[94;3m#To assemble and run this on a phone or emulator:[0m [2m4 [0m[94;3m#To assemble and run this on a phone or emulator:[0m
+
+[1msample_files/hello_world_2.smali[0m[2m --- 2/2 --- Smali[0m
+[2m15 [0m[1m.super[0m [95mL[0m[1mjava[0m/[1mlang[0m/[1mObject[0m; [2m15 [0m[1m.super[0m [95mL[0m[1mjava[0m/[1mlang[0m/[1mObject[0m;
+[2m16 [0m [2m16 [0m
+[2m17 [0m[1m.method[0m public static [1mmain[0m([[95mL[0m[1mjava[0m/[1mlang[0m/[1mString[0m;)[1mV[0m [2m17 [0m[1m.method[0m public static [1mmain[0m([[95mL[0m[1mjava[0m/[1mlang[0m/[1mString[0m;)[1mV[0m
+[91;1m18 [0m [1m.registers[0m [91m2[0m [92;1m18 [0m [1m.registers[0m [92m3[0m
+[2m19 [0m [2m19 [0m
+[2m20 [0m sget-object v0, [95mL[0m[1mjava[0m/[1mlang[0m/[1mSystem[0m;->[1mout[0m:[95mL[0m[1mjava[0m/[1mio[0m/[1mPrintStream[0m; [2m20 [0m sget-object v0, [95mL[0m[1mjava[0m/[1mlang[0m/[1mSystem[0m;->[1mout[0m:[95mL[0m[1mjava[0m/[1mio[0m/[1mPrintStream[0m;
+[2m21 [0m [2m21 [0m
+[91;1m22 [0m const-string v1, [91m"[0m[91mHello[0m[91m [0m[91;1;4mWorld[0m[91m![0m[91m"[0m [92;1m22 [0m const-string v1, [92m"[0m[92mHello[0m[92m [0m[92;1;4m%[0m[92;1;4ms[0m[92m![0m[92m"[0m
+[2m23 [0m [2m23 [0m
+[2m.. [0m [92;1m24 [0m [92mconst-string[0m [92mv2[0m[92m,[0m [92m"Evan"[0m
+[2m.. [0m [92;1m25 [0m
+[91;1m24 [0m invoke-virtual {v0, v1}, [95mL[0m[1mjava[0m/[1mio[0m/[1mPrintStream[0m;->[91;1mprintln[0m([95mL[0m[1mjava[0m/[1mlang[0m/[1mStrin[0m [92;1m26 [0m invoke-virtual {v0, v1[92m,[0m [92mv2[0m}, [95mL[0m[1mjava[0m/[1mio[0m/[1mPrintStream[0m;->[92;1mprintf[0m([95mL[0m[1mjava[0m/[1mlang[0m/[1mSt[0m
+[91;1m[2m.. [0m[0m[1mg[0m;)[1mV[0m [92;1m[2m.. [0m[0m[1mring[0m;[92mL[0m[92;1mjava[0m[92m/[0m[92;1mlang[0m[92m/[0m[92;1mString[0m[92m;[0m)[1mV[0m
+[2m25 [0m [2m27 [0m
+[2m26 [0m return-void [2m28 [0m return-void
+[2m27 [0m[1m.end method[0m [2m29 [0m[1m.end method[0m
diff --git a/tests/snapshots/cli__samples_side_by_side@helpful_1.el.snap b/tests/snapshots/cli__samples_side_by_side@helpful_1.el.snap
new file mode 100644
index 0000000000..998f603bd7
--- /dev/null
+++ b/tests/snapshots/cli__samples_side_by_side@helpful_1.el.snap
@@ -0,0 +1,37 @@
+---
+source: tests/cli.rs
+expression: stdout
+input_file: sample_files/helpful_1.el
+---
+[1m[93msample_files/helpful_2.el[39m[0m[2m --- 1/3 --- Emacs Lisp[0m
+[2m13 [0m[2m13 [0m (start-line (line-number-at-pos))
+[2m14 [0m[2m14 [0m (start-column (current-column))
+[2m15 [0m[2m15 [0m (primitive-p (helpful--primitive-p helpful--sym helpful--callable-p))
+[2m.. [0m[92;1m16 [0m [92;1m([0m[92mcanonical-sym[0m [92;1m([0m[92mhelpful--canonical-symbol[0m [92mhelpful--sym[0m [92mhelpful--callable-p[0m[92;1m)[0m[92;1m)[0m
+[2m16 [0m[2m17 [0m (look-for-src ([1mor[0m (not primitive-p)
+[2m17 [0m[2m18 [0m find-function-C-source-directory))
+[2m18 [0m[2m19 [0m ((buf pos opened)
+
+[1msample_files/helpful_2.el[0m[2m --- 2/3 --- Emacs Lisp[0m
+[2m217 [0m[2m218 [0m
+[2m218 [0m[2m219 [0m (insert
+[2m219 [0m[2m220 [0m (helpful--heading
+[2m... [0m[92;1m221 [0m [92;1m([0m[92;1mif[0m [92;1m([0m[92meq[0m [92mhelpful--sym[0m [92mcanonical-sym[0m[92;1m)[0m
+[2m... [0m[2m222 [0m [95m"Source Code"[0m
+[2m... [0m[92;1m223 [0m [92m"Alias Source Code"[0m[92;1m)[0m)
+[2m220 [0m[2m224 [0m ([1mcond[0m
+[2m221 [0m[2m225 [0m (source-path
+[2m222 [0m[2m226 [0m (concat
+
+[1msample_files/helpful_2.el[0m[2m --- 3/3 --- Emacs Lisp[0m
+[2m251 [0m ([1mt[0m [2m255 [0m ([1mt[0m
+[2m252 [0m (helpful--syntax-highlight [2m256 [0m (helpful--syntax-highlight
+[2m253 [0m (concat [2m257 [0m (concat
+[2m... [0m [92;1m258 [0m [92;1m([0m[92;1mif[0m [92;1m([0m[92meq[0m [92mhelpful--sym[0m [92mcanonical-sym[0m[92;1m)[0m
+[91;1m254 [0m [91m"[0m[91m;[0m[91m;[0m[91m [0m[91;1;4mSource[0m[91m [0m[91;1;4mfile[0m[91m [0m[91;1;4mis[0m[91m [0m[91;1;4munknown[0m[91m,[0m[91m [0m[91mshowing[0m[91m [0m[91mraw[0m[91m [0m[91mfunction[0m[91m [0m[91mobject[0m[91m.[0m[91m\[0m[91mn[0m[91m"[0m [92;1m259 [0m [92m"[0m[92m;[0m[92m;[0m[92m [0m[92;1;4mCould[0m[92m [0m[92;1;4mnot[0m[92m [0m[92;1;4mfind[0m[92m [0m[92;1;4msource[0m [92;1;4mcode[0m[92m,[0m[92m [0m[92mshowing[0m[92m [0m[92mraw[0m[92m [0m[92mfunction[0m[92m [0m[92mobject[0m[92m.[0m
+[91;1m[2m... [0m[0m [92;1m[2m... [0m[0m[92m\[0m[92mn[0m[92m"[0m
+[2m... [0m [92;1m260 [0m [92m";; Could not find alias source code, showing raw function obj[0m
+[2m... [0m [92;1m[2m... [0m[0m[92mect.\n"[0m[92;1m)[0m
+[2m255 [0m (helpful--pretty-print source))))))) [2m261 [0m (helpful--pretty-print source)))))))
+[2m256 [0m [2m262 [0m
+[2m257 [0m (helpful--insert-section-break) [2m263 [0m (helpful--insert-section-break)
diff --git a/tests/snapshots/cli__samples_side_by_side@html_1.html.snap b/tests/snapshots/cli__samples_side_by_side@html_1.html.snap
new file mode 100644
index 0000000000..fb1f10978c
--- /dev/null
+++ b/tests/snapshots/cli__samples_side_by_side@html_1.html.snap
@@ -0,0 +1,66 @@
+---
+source: tests/cli.rs
+expression: stdout
+input_file: sample_files/html_1.html
+---
+[1m[93msample_files/html_2.html[39m[0m[2m --- 1/2 --- HTML[0m
+[91;1m 1 [0m[91;1m[0m [92;1m 1 [0m[92;1m[0m
+[2m 2 [0m<[1mhtml[0m> [2m 2 [0m<[1mhtml[0m>
+[2m 3 [0m<[1mhead[0m> [2m 3 [0m <[1mhead[0m>
+[2m 4 [0m <[1mtitle[0m>Example Domain[1mtitle[0m> [2m 4 [0m <[1mtitle[0m>Example Domain[1mtitle[0m>
+[2m 5 [0m [2m 5 [0m
+[91;1m 6 [0m [91;3m<[0m[91;3m![0m[91;3m-[0m[91;3m-[0m[91;3m [0m[91;3mdemo[0m[91;3m [0m[91;3mfor[0m[91;3m [0m[91;1;3;4mtree[0m[91;1;3;4m-[0m[91;1;3;4msitter[0m[91;3m [0m[91;3m-[0m[91;3m-[0m[91;3m>[0m [92;1m 6 [0m [92;3m<[0m[92;3m![0m[92;3m-[0m[92;3m-[0m[92;3m [0m[92;3mdemo[0m[92;3m [0m[92;3mfor[0m[92;3m [0m[92;1;3;4mdifftastic[0m[92;3m [0m[92;3m-[0m[92;3m-[0m[92;3m>[0m
+[2m 7 [0m [2m 7 [0m
+[2m 8 [0m <[1mmeta[0m charset="utf-8" /> [2m 8 [0m <[1mmeta[0m charset="utf-8" />
+[2m 9 [0m <[1mmeta[0m http-equiv="Content-type" content="text/html; charset=utf-8" /> [2m 9 [0m <[1mmeta[0m http-equiv="Content-type" content="text/html; charset=utf-8" />
+[2m10 [0m <[1mmeta[0m name="viewport" content="width=device-width, initial-scale=1" /> [2m10 [0m <[1mmeta[0m name="viewport" content="width=device-width, initial-scale=1" />
+[2m.. [0m [92;1m11 [0m [92;1m<[0m[92;1mstyle[0m [92mtype[0m[92m=[0m[92m"text/css"[0m[92;1m>[0m
+[2m.. [0m [92;1m12 [0m [92;1mp[0m [92;1m{[0m
+[2m.. [0m [92;1m13 [0m [92mcolor[0m[92m:[0m [92m#000[0m[92m;[0m
+[2m.. [0m [92;1m14 [0m [92;1m}[0m
+[2m.. [0m [92;1m15 [0m [92m[0m[92;1mstyle[0m[92m>[0m
+[2m11 [0m <[1mstyle[0m type="text/css"> [2m16 [0m <[1mstyle[0m type="text/css">
+[2m12 [0m [1mbody[0m { [2m17 [0m [1mbody[0m {
+[91;1m13 [0m background-color: [91m#f0f0f2[0m; [92;1m18 [0m background-color: [92m#fdfdff[0m;
+[91;1m14 [0m margin: [91m0[0m; [92;1m19 [0m margin: [92m10[0m;
+[91;1m15 [0m padding: [91m0[0m; [92;1m20 [0m padding: [92m10[0m;
+[91;1m16 [0m font-family: [91m-apple-system[0m[91m,[0m [91msystem-ui[0m[91m,[0m [91mBlinkMacSystemFont[0m[91m,[0m [91m"Segoe UI[0m [2m21 [0m font-family: Helvetica, Arial, sans-serif;
+[91;1m[2m.. [0m[0m[91m"[0m[91m,[0m [91m"Open Sans"[0m[91m,[0m [91m"Helvetica Neue"[0m[91m,[0m Helvetica, Arial, sans-serif; [2m[2m.. [0m[0m
+[91;1m17 [0m [2m.. [0m
+[2m18 [0m } [2m22 [0m }
+[91;1m19 [0m [91;1mdiv[0m { [92;1m23 [0m [92m#[0m[92mmain[0m {
+[2m20 [0m width: 600px; [2m24 [0m width: 600px;
+[2m21 [0m margin: 5em auto; [2m25 [0m margin: 5em auto;
+[2m22 [0m padding: 2em; [2m26 [0m padding: 2em;
+[91;1m23 [0m background-color: [91m#fdfdff[0m; [92;1m27 [0m background-color: [92m#f0f0f2[0m;
+[2m24 [0m border-radius: 0.5em; [2m28 [0m border-radius: 0.5em;
+[2m25 [0m box-shadow: 2px 3px 7px 2px rgba(0,0,0,0.02); [2m29 [0m box-shadow: 2px 3px 7px 2px rgba(0, 0, 0, 0.02);
+[2m26 [0m } [2m30 [0m }
+
+[1msample_files/html_2.html[0m[2m --- 2/2 --- HTML[0m
+[2m38 [0m[1mhead[0m> [2m43 [0m [1mhead[0m>
+[2m39 [0m [2m44 [0m
+[2m40 [0m<[1mbody[0m> [2m45 [0m <[1mbody[0m>
+[2m41 [0m<[1mdiv[0m> [92;1m46 [0m <[1mdiv[0m [92mid[0m[92m=[0m[92m"main"[0m>
+[2m42 [0m <[1mh1[0m>Example Domain[1mh1[0m> [2m47 [0m <[1mh1[0m>Example Domain[1mh1[0m>
+[91;1m43 [0m <[1mp[0m>[91mThis[0m[91m [0m[91mdomain[0m[91m [0m[91mis[0m[91m [0m[91mfor[0m[91m [0m[91muse[0m[91m [0m[91min[0m[91m [0m[91millustrative[0m[91m [0m[91mexamples[0m[91m [0m[91min[0m[91m [0m[91mdocuments[0m[91m.[0m[91m [0m[91mYou[0m[91m [0m[91mmay[0m [2m48 [0m <[1mp[0m>
+[91;1m[2m.. [0m[0m[91m [0m[91;1;4muse[0m[91m [0m[91;1;4mthis[0m [2m[2m.. [0m[0m
+[2m.. [0m [92;1m49 [0m [92mThis[0m[92m [0m[92mdomain[0m[92m [0m[92mis[0m[92m [0m[92mfor[0m[92m [0m[92muse[0m[92m [0m[92min[0m[92m [0m[92millustrative[0m[92m [0m[92mexamples[0m[92m [0m[92min[0m[92m [0m[92mdocuments[0m[92m.[0m[92m [0m[92mYou[0m[92m [0m[92mma[0m
+[2m.. [0m [92;1m[2m.. [0m[0m[92my[0m
+[91;1m44 [0m[91m [0m[91m [0m[91m [0m[91m [0m[91mdomain[0m[91m [0m[91min[0m[91m [0m[91mliterature[0m[91m [0m[91mwithout[0m[91m [0m[91mprior[0m[91m [0m[91mcoordination[0m[91m [0m[91mor[0m[91m [0m[91masking[0m[91m [0m[91mfor[0m[91m [0m[91mpermission[0m [92;1m50 [0m[92m [0m[92m [0m[92m [0m[92m [0m[92m [0m[92m [0m [92;1;4muse[0m [92;1;4mthis[0m [92mdomain[0m[92m [0m[92min[0m[92m [0m[92mliterature[0m[92m [0m[92mwithout[0m[92m [0m[92mprior[0m[92m [0m[92mcoordination[0m[92m [0m[92mor[0m[92m [0m[92masking[0m[92m [0m[92mf[0m
+[91;1m[2m.. [0m[0m[91m.[0m[1mp[0m> [92;1m[2m.. [0m[0m[92mor[0m
+[2m.. [0m [92;1m51 [0m [92m [0m[92mpermission[0m[92m.[0m
+[2m.. [0m [2m52 [0m [1mp[0m>
+[91;1m45 [0m <[1mp[0m><[1ma[0m href=[91m"https://www.iana.org/domains/example"[0m>More information...[1ma[0m [2m53 [0m <[1mp[0m>
+[91;1m[2m.. [0m[0m>[1mp[0m> [2m[2m.. [0m[0m
+[2m.. [0m [92;1m54 [0m <[1ma[0m href=[92m"https://www.iana.org/domains/example?utm_src=example-dot-or[0m
+[2m.. [0m [92;1m[2m.. [0m[0m[92mg"[0m
+[2m.. [0m [2m55 [0m >More information...[1ma[0m
+[2m.. [0m [2m56 [0m >
+[2m.. [0m [2m57 [0m [1mp[0m>
+[2m46 [0m[1mdiv[0m> [2m58 [0m [1mdiv[0m>
+[91;1m47 [0m<[1mscript[0m>alert([91m'welcome!'[0m);[1mscript[0m> [2m59 [0m <[1mscript[0m>
+[2m.. [0m [92;1m60 [0m alert([92m"goodbye!"[0m);
+[2m.. [0m [2m61 [0m [1mscript[0m>
+[2m48 [0m[1mbody[0m> [2m62 [0m [1mbody[0m>
+[2m49 [0m[1mhtml[0m> [2m63 [0m[1mhtml[0m>
diff --git a/tests/snapshots/cli__samples_side_by_side@html_simple_1.html.snap b/tests/snapshots/cli__samples_side_by_side@html_simple_1.html.snap
new file mode 100644
index 0000000000..61409d27dc
--- /dev/null
+++ b/tests/snapshots/cli__samples_side_by_side@html_simple_1.html.snap
@@ -0,0 +1,15 @@
+---
+source: tests/cli.rs
+expression: stdout
+input_file: sample_files/html_simple_1.html
+---
+[1m[93msample_files/html_simple_2.html[39m[0m[2m --- HTML[0m
+[2m1 [0m<[1mhtml[0m> [2m1 [0m<[1mhtml[0m>
+[2m2 [0m<[1mhead[0m> [2m2 [0m<[1mhead[0m>
+[91;1m3 [0m <[1mtitle[0m>[91mHi![0m[1mtitle[0m> [92;1m3 [0m <[1mtitle[0m>[92mHi[0m[1mtitle[0m>
+[2m4 [0m[1mhead[0m> [2m4 [0m[1mhead[0m>
+[91;1m5 [0m<[1mbody[0m class=[91m"foo"[0m> [92;1m5 [0m<[1mbody[0m class=[92m"bar"[0m>
+[91;1m6 [0m <[1mh1[0m>[91mFoo[0m[1mh1[0m> [92;1m6 [0m <[1mh1[0m [92mid[0m[92m=[0m[92m"title"[0m>[92mBar[0m[1mh1[0m>
+[91;1m7 [0m <[1mp[0m>[91mStory about foo.[0m[1mp[0m> [92;1m7 [0m <[1mp[0m>[92mStory about[0m [92;1m<[0m[92;1mstrong[0m[92;1m>[0m[92mbar[0m[92m[0m[92;1mstrong[0m[92m>[0m[92m.[0m[1mp[0m>
+[2m8 [0m[1mbody[0m> [2m8 [0m[1mbody[0m>
+[2m9 [0m[1mhtml[0m> [2m9 [0m[1mhtml[0m>
diff --git a/tests/snapshots/cli__samples_side_by_side@identical_1.scala.snap b/tests/snapshots/cli__samples_side_by_side@identical_1.scala.snap
new file mode 100644
index 0000000000..f289caf823
--- /dev/null
+++ b/tests/snapshots/cli__samples_side_by_side@identical_1.scala.snap
@@ -0,0 +1,7 @@
+---
+source: tests/cli.rs
+expression: stdout
+input_file: sample_files/identical_1.scala
+---
+[1m[93msample_files/identical_2.scala[39m[0m[2m --- Scala[0m
+No changes.
diff --git a/tests/snapshots/cli__samples_side_by_side@if_1.py.snap b/tests/snapshots/cli__samples_side_by_side@if_1.py.snap
new file mode 100644
index 0000000000..0e7d7e3b1e
--- /dev/null
+++ b/tests/snapshots/cli__samples_side_by_side@if_1.py.snap
@@ -0,0 +1,9 @@
+---
+source: tests/cli.rs
+expression: stdout
+input_file: sample_files/if_1.py
+---
+[1m[93msample_files/if_2.py[39m[0m[2m --- Python[0m
+[2m1 [0m[1mif[0m x: [2m1 [0m[1mif[0m x:
+[2m2 [0m foo [2m2 [0m foo
+[91;1m3 [0m [91mbar[0m [92;1m3 [0m[92mbar[0m
diff --git a/tests/snapshots/cli__samples_side_by_side@insert_blank_1.txt.snap b/tests/snapshots/cli__samples_side_by_side@insert_blank_1.txt.snap
new file mode 100644
index 0000000000..04b23eea8b
--- /dev/null
+++ b/tests/snapshots/cli__samples_side_by_side@insert_blank_1.txt.snap
@@ -0,0 +1,9 @@
+---
+source: tests/cli.rs
+expression: stdout
+input_file: sample_files/insert_blank_1.txt
+---
+[1m[93msample_files/insert_blank_2.txt[39m[0m[2m --- Text[0m
+[2m1 [0m[2m1 [0mfoo
+[91;1m2 [0m[2m. [0m
+[2m3 [0m[2m2 [0mbar
diff --git a/tests/snapshots/cli__samples_side_by_side@java_1.java.snap b/tests/snapshots/cli__samples_side_by_side@java_1.java.snap
new file mode 100644
index 0000000000..93ef635272
--- /dev/null
+++ b/tests/snapshots/cli__samples_side_by_side@java_1.java.snap
@@ -0,0 +1,19 @@
+---
+source: tests/cli.rs
+expression: stdout
+input_file: sample_files/java_1.java
+---
+[1m[93msample_files/java_2.java[39m[0m[2m --- Java[0m
+[2m 1 [0m[1mclass[0m [1mFoo[0m { [2m 1 [0m[1mclass[0m [1mFoo[0m {
+[91;1m 2 [0m [91;3m/[0m[91;3m*[0m[91;3m*[0m [92;1m 2 [0m [92;3m/[0m[92;3m*[0m[92;3m*[0m
+[91;1m 3 [0m[91;3m [0m[91;3m [0m[91;3m [0m[91;3m*[0m[91;3m [0m[91;3mHello[0m[91;3m [0m[91;3mworld[0m[91;3m.[0m [92;1m 3 [0m[92;3m [0m[92;3m [0m[92;3m [0m[92;3m*[0m[92;3m [0m[92;3mHello[0m[92;3m [0m[92;3mworld[0m[92;3m.[0m
+[91;1m 4 [0m[91;3m [0m[91;3m [0m[91;3m [0m[91;3m*[0m [92;1m 4 [0m[92;3m [0m[92;3m [0m[92;3m [0m[92;3m*[0m
+[91;1m 5 [0m[91;3m [0m[91;3m [0m[91;3m [0m[91;3m*[0m[91;3m [0m[91;3m<[0m[91;3mp[0m[91;3m>[0m[91;3mMore[0m[91;3m [0m[91;3mstuff[0m[91;3m [0m[91;3mhere[0m[91;3m.[0m[91;3m<[0m[91;3m/[0m[91;3mp[0m[91;3m>[0m [92;1m 5 [0m[92;3m [0m[92;3m [0m[92;3m [0m[92;3m*[0m[92;3m [0m[92;3m<[0m[92;3mp[0m[92;3m>[0m[92;3mMore[0m[92;3m [0m[92;3mstuff[0m[92;3m [0m[92;3mhere[0m[92;3m.[0m[92;3m<[0m[92;3m/[0m[92;3mp[0m[92;3m>[0m
+[91;1m 6 [0m[91;3m [0m[91;3m [0m[91;3m [0m[91;3m*[0m [92;1m 6 [0m[92;3m [0m[92;3m [0m[92;3m [0m[92;3m*[0m
+[91;1m 7 [0m[91;3m [0m[91;3m [0m[91;3m [0m[91;3m*[0m[91;3m [0m[91;3m@[0m[91;3mparam[0m[91;3m [0m[91;3mstuff[0m[91;3m [0m[91;3m{[0m[91;3m@[0m[91;3mcode[0m[91;3m [0m[91;3mString[0m[91;3m}[0m[91;3m [0m[91;3mfoo[0m[91;3m [0m[91;3mbar[0m [92;1m 7 [0m[92;3m [0m[92;3m [0m[92;3m [0m[92;3m*[0m[92;3m [0m[92;3m@[0m[92;3mparam[0m[92;3m [0m[92;3mstuff[0m[92;3m [0m[92;3m{[0m[92;3m@[0m[92;3mcode[0m[92;3m [0m[92;3mString[0m[92;3m}[0m[92;3m [0m[92;3mfoo[0m[92;3m [0m[92;3mbar[0m
+[91;1m 8 [0m[91;3m [0m[91;3m [0m[91;3m [0m[91;3m*[0m[91;3m [0m[91;3m@[0m[91;3mreturns[0m[91;3m [0m[91;3m{[0m[91;3m@[0m[91;3mcode[0m[91;3m [0m[91;1;3;4mOther[0m[91;3m}[0m [92;1m 8 [0m[92;3m [0m[92;3m [0m[92;3m [0m[92;3m*[0m[92;3m [0m[92;3m@[0m[92;3mreturns[0m[92;3m [0m[92;3m{[0m[92;3m@[0m[92;3mcode[0m[92;3m [0m[92;1;3;4mint[0m[92;3m}[0m
+[91;1m 9 [0m[91;3m [0m[91;3m [0m[91;3m [0m[91;3m*[0m[91;3m/[0m [92;1m 9 [0m[92;3m [0m[92;3m [0m[92;3m [0m[92;3m*[0m[92;3m/[0m
+[91;1m10 [0m [91;1mpublic[0m [1mstatic[0m [91;1mOther[0m blah() { [92;1m10 [0m [92;1mprotected[0m [1mstatic[0m [92;1mint[0m blah() {
+[2m11 [0m [1mthrow[0m [1mnew[0m [1mException[0m([95m"before"[0m); [2m11 [0m [1mthrow[0m [1mnew[0m [1mException[0m([95m"before"[0m);
+[2m12 [0m } [2m12 [0m }
+[2m13 [0m} [2m13 [0m}
diff --git a/tests/snapshots/cli__samples_side_by_side@javascript_1.js.snap b/tests/snapshots/cli__samples_side_by_side@javascript_1.js.snap
new file mode 100644
index 0000000000..f1dd18a8a0
--- /dev/null
+++ b/tests/snapshots/cli__samples_side_by_side@javascript_1.js.snap
@@ -0,0 +1,82 @@
+---
+source: tests/cli.rs
+expression: stdout
+input_file: sample_files/javascript_1.js
+---
+[1m[93msample_files/javascript_2.js[39m[0m[2m --- 1/5 --- JavaScript[0m
+[2m 7 [0m}); [2m 7 [0m});
+[2m 8 [0m [2m 8 [0m
+[2m 9 [0mdescribe([95m"Authentication"[0m, () [1m=>[0m { [2m 9 [0mdescribe([95m"Authentication"[0m, () [1m=>[0m {
+[91;1m10 [0m test([91m"Editing pages"[0m, done [1m=>[0m { [92;1m10 [0m test([92m"/edit GET"[0m, done [1m=>[0m {
+[2m11 [0m request(app) [2m11 [0m request(app)
+[2m12 [0m .get([95m"/edit/Foo"[0m) [2m12 [0m .get([95m"/edit/Foo"[0m)
+[2m13 [0m .then(res [1m=>[0m { [2m13 [0m .then(res [1m=>[0m {
+
+[1msample_files/javascript_2.js[0m[2m --- 2/5 --- JavaScript[0m
+[2m16 [0m done(); [2m16 [0m done();
+[2m17 [0m }); [2m17 [0m });
+[2m18 [0m }); [2m18 [0m });
+[2m.. [0m [92;1m19 [0m [92mtest[0m[92;1m([0m[92m"/edit POST"[0m[92m,[0m [92mdone[0m [92;1m=>[0m [92;1m{[0m
+[2m.. [0m [92;1m20 [0m [92mdb[0m[92m.[0m[92mcreatePage[0m[92;1m([0m[92m"EditAuthExample"[0m[92m,[0m [92m"foo bar"[0m[92m,[0m [92;1m([0m[92merr[0m[92m,[0m [92mpage[0m[92;1m)[0m [92;1m=>[0m [92;1m{[0m
+[2m.. [0m [92;1m21 [0m [92mexpect[0m[92;1m([0m[92merr[0m[92;1m)[0m[92m.[0m[92mtoBeNull[0m[92;1m([0m[92;1m)[0m[92m;[0m
+[2m.. [0m [92;1m22 [0m
+[2m.. [0m [92;1m23 [0m [92mrequest[0m[92;1m([0m[92mapp[0m[92;1m)[0m
+[2m.. [0m [92;1m24 [0m [92m.[0m[92mpost[0m[92;1m([0m[92m"/edit/"[0m [92;1m+[0m [92mpage[0m[92m.[0m[92mrowid[0m[92;1m)[0m
+[2m.. [0m [92;1m25 [0m [92m.[0m[92mtype[0m[92;1m([0m[92m"form"[0m[92;1m)[0m
+[2m.. [0m [92;1m26 [0m [92m.[0m[92msend[0m[92;1m([0m[92;1m{[0m [92mname[0m[92m:[0m [92m"EditPostExample"[0m[92m,[0m [92mcontent[0m[92m:[0m [92m"hello world"[0m [92;1m}[0m[92;1m)[0m
+[2m.. [0m [92;1m27 [0m [92m.[0m[92mthen[0m[92;1m([0m[92mres[0m [92;1m=>[0m [92;1m{[0m
+[2m.. [0m [92;1m28 [0m [92mexpect[0m[92;1m([0m[92mres[0m[92m.[0m[92mstatusCode[0m[92;1m)[0m[92m.[0m[92mtoBe[0m[92;1m([0m[92m401[0m[92;1m)[0m[92m;[0m
+[2m.. [0m [92;1m29 [0m [92mexpect[0m[92;1m([0m[92mres[0m[92m.[0m[92mheaders[0m[92;1m[[0m[92m"www-authenticate"[0m[92;1m][0m[92;1m)[0m[92m.[0m[92mtoBe[0m[92;1m([0m[92m"Basic"[0m[92;1m)[0m[92m;[0m
+[2m.. [0m [92;1m30 [0m [92mdone[0m[92;1m([0m[92;1m)[0m[92m;[0m
+[2m.. [0m [92;1m31 [0m [92;1m}[0m[92;1m)[0m[92m;[0m
+[2m.. [0m [92;1m32 [0m [92;1m}[0m[92;1m)[0m[92m;[0m
+[2m.. [0m [92;1m33 [0m [92;1m}[0m[92;1m)[0m[92m;[0m
+[2m19 [0m [2m34 [0m
+[91;1m20 [0m test([91m"Creating pages"[0m, done [1m=>[0m { [92;1m35 [0m test([92m"/new GET"[0m, done [1m=>[0m {
+[2m21 [0m request(app) [2m36 [0m request(app)
+[2m22 [0m .get([95m"/new"[0m) [2m37 [0m .get([95m"/new"[0m)
+[2m23 [0m .then(res [1m=>[0m { [2m38 [0m .then(res [1m=>[0m {
+
+[1msample_files/javascript_2.js[0m[2m --- 3/5 --- JavaScript[0m
+[2m26 [0m[2m41 [0m done();
+[2m27 [0m[2m42 [0m });
+[2m28 [0m[2m43 [0m });
+[2m.. [0m[92;1m44 [0m [92mtest[0m[92;1m([0m[92m"/new POST"[0m[92m,[0m [92mdone[0m [92;1m=>[0m [92;1m{[0m
+[2m.. [0m[92;1m45 [0m [92mrequest[0m[92;1m([0m[92mapp[0m[92;1m)[0m
+[2m.. [0m[92;1m46 [0m [92m.[0m[92mpost[0m[92;1m([0m[92m"/new"[0m[92;1m)[0m
+[2m.. [0m[92;1m47 [0m [92m.[0m[92mtype[0m[92;1m([0m[92m"form"[0m[92;1m)[0m
+[2m.. [0m[92;1m48 [0m [92m.[0m[92msend[0m[92;1m([0m[92;1m{[0m [92mname[0m[92m:[0m [92m"FooBarBaz"[0m[92m,[0m [92mcontent[0m[92m:[0m [92m"hello world"[0m [92;1m}[0m[92;1m)[0m
+[2m.. [0m[92;1m49 [0m [92m.[0m[92mexpect[0m[92;1m([0m[92m401[0m[92m,[0m [92mdone[0m[92;1m)[0m[92m;[0m
+[2m.. [0m[92;1m50 [0m [92;1m}[0m[92;1m)[0m[92m;[0m
+[2m29 [0m[2m51 [0m});
+[2m30 [0m[2m52 [0m
+[2m31 [0m[2m53 [0m[1mconst[0m [1mADMIN_PASSWORD[0m [1m=[0m process.env.ADMIN_PASSWORD [1m||[0m [95m"admin"[0m;
+
+[1msample_files/javascript_2.js[0m[2m --- 4/5 --- JavaScript[0m
+[2m56 [0m .expect(200, done); [2m78 [0m .expect(200, done);
+[2m57 [0m }); [2m79 [0m });
+[2m58 [0m }); [2m80 [0m });
+[91;1m59 [0m test([91m"[0m[91m/[0m[91medit[0m[91m [0m[91;1;4mGET[0m[91m"[0m, done [1m=>[0m { [92;1m81 [0m test([92m"[0m[92m/[0m[92medit[0m[92m [0m[92;1;4mPOST[0m[92m"[0m, done [1m=>[0m {
+[2m60 [0m db.createPage([95m"EditPostExample"[0m, [95m"foo bar"[0m, (err, page) [1m=>[0m { [2m82 [0m db.createPage([95m"EditPostExample"[0m, [95m"foo bar"[0m, (err, page) [1m=>[0m {
+[2m61 [0m expect(err).toBeNull(); [2m83 [0m expect(err).toBeNull();
+[2m62 [0m [2m84 [0m
+
+[1msample_files/javascript_2.js[0m[2m --- 5/5 --- JavaScript[0m
+[2m70 [0m[2m 92 [0m });
+[2m71 [0m[2m 93 [0m});
+[2m72 [0m[2m 94 [0m
+[2m.. [0m[92;1m 95 [0m[92mdescribe[0m[92;1m([0m[92m"Viewing"[0m[92m,[0m [92;1m([0m[92;1m)[0m [92;1m=>[0m [92;1m{[0m
+[2m73 [0m[2m 96 [0m test([95m"/all"[0m, done [1m=>[0m {
+[2m74 [0m[2m 97 [0m request(app)
+[2m75 [0m[2m 98 [0m .get([95m"/all"[0m)
+[2m76 [0m[2m 99 [0m .expect(200, done);
+[2m77 [0m[2m100 [0m });
+[2m [0m[92;1m101 [0m
+[2m [0m[92;1m102 [0m [92mtest[0m[92;1m([0m[92m"/AnExamplePage"[0m[92m,[0m [92mdone[0m [92;1m=>[0m [92;1m{[0m
+[2m [0m[92;1m103 [0m [92mdb[0m[92m.[0m[92mcreatePage[0m[92;1m([0m[92m"AnExamplePage"[0m[92m,[0m [92m"foo bar"[0m[92m,[0m [92;1m([0m[92;1m)[0m [92;1m=>[0m [92;1m{[0m
+[2m [0m[92;1m104 [0m [92mrequest[0m[92;1m([0m[92mapp[0m[92;1m)[0m
+[2m [0m[92;1m105 [0m [92m.[0m[92mget[0m[92;1m([0m[92m"/AnExamplePage"[0m[92;1m)[0m
+[2m [0m[92;1m106 [0m [92m.[0m[92mexpect[0m[92;1m([0m[92m200[0m[92m,[0m [92mdone[0m[92;1m)[0m[92m;[0m
+[2m [0m[92;1m107 [0m [92;1m}[0m[92;1m)[0m[92m;[0m
+[2m [0m[92;1m108 [0m [92;1m}[0m[92;1m)[0m[92m;[0m
+[2m [0m[92;1m109 [0m[92;1m}[0m[92;1m)[0m[92m;[0m
diff --git a/tests/snapshots/cli__samples_side_by_side@javascript_simple_1.js.snap b/tests/snapshots/cli__samples_side_by_side@javascript_simple_1.js.snap
new file mode 100644
index 0000000000..29dd90c9f8
--- /dev/null
+++ b/tests/snapshots/cli__samples_side_by_side@javascript_simple_1.js.snap
@@ -0,0 +1,17 @@
+---
+source: tests/cli.rs
+expression: stdout
+input_file: sample_files/javascript_simple_1.js
+---
+[1m[93msample_files/javascript_simple_2.js[39m[0m[2m --- JavaScript[0m
+[2m1 [0m[94;3m// hello[0m [2m 1 [0m[94;3m// hello[0m
+[2m. [0m [92;1m 2 [0m[92;1mif[0m [92;1m([0m[92;1mtrue[0m[92;1m)[0m [92;1m{[0m
+[2m2 [0mfoo(); [2m 3 [0m foo();
+[91;1m3 [0mbar([91m1[0m); [92;1m 4 [0m bar([92m2[0m);
+[2m4 [0mbaz(); [2m 5 [0m baz();
+[2m. [0m [92;1m 6 [0m[92;1m}[0m
+[2m5 [0m [2m 7 [0m
+[2m6 [0m[1mvar[0m people [1m=[0m [ [2m 8 [0m[1mvar[0m people [1m=[0m [
+[2m7 [0m [95m"john"[0m, [95m"harry"[0m, [95m"dick"[0m, [95m"eric"[0m, [92;1m 9 [0m [95m"john"[0m, [95m"harry"[0m, [95m"dick"[0m, [92m"yvonne"[0m[92m,[0m
+[2m8 [0m [95m"jenny"[0m, [95m"alexandra"[0m, [2m10 [0m [95m"eric"[0m, [95m"jenny"[0m, [95m"alexandra"[0m,
+[2m9 [0m]; [2m11 [0m];
diff --git a/tests/snapshots/cli__samples_side_by_side@json_1.json.snap b/tests/snapshots/cli__samples_side_by_side@json_1.json.snap
new file mode 100644
index 0000000000..7265679955
--- /dev/null
+++ b/tests/snapshots/cli__samples_side_by_side@json_1.json.snap
@@ -0,0 +1,11 @@
+---
+source: tests/cli.rs
+expression: stdout
+input_file: sample_files/json_1.json
+---
+[1m[93msample_files/json_2.json[39m[0m[2m --- JSON[0m
+[2m1 [0m{ [2m1 [0m{
+[91;1m2 [0m [95m"foo"[0m: [[91m1[0m[91m,[0m 2, 3, 4], [92;1m2 [0m [95m"foo"[0m: [2, 3, 4[92m,[0m [92m5[0m],
+[91;1m3 [0m [91m"bar"[0m: [95m"testing"[0m [92;1m3 [0m [92m"zab"[0m: [95m"testing"[0m[92m,[0m
+[2m. [0m [92;1m4 [0m [92m"woo"[0m[92m:[0m [92;1m[[0m[92m"foobar"[0m[92;1m][0m
+[2m4 [0m} [2m5 [0m}
diff --git a/tests/snapshots/cli__samples_side_by_side@jsx_1.jsx.snap b/tests/snapshots/cli__samples_side_by_side@jsx_1.jsx.snap
new file mode 100644
index 0000000000..1390a1e2ee
--- /dev/null
+++ b/tests/snapshots/cli__samples_side_by_side@jsx_1.jsx.snap
@@ -0,0 +1,19 @@
+---
+source: tests/cli.rs
+expression: stdout
+input_file: sample_files/jsx_1.jsx
+---
+[1m[93msample_files/jsx_2.jsx[39m[0m[2m --- JavaScript JSX[0m
+[2m 1 [0m[1mReactDOM[0m.render( [2m 1 [0m[1mReactDOM[0m.render(
+[91;1m 2 [0m [91mHello, world![0m
[0m, [92;1m 2 [0m
+[2m . [0m [92;1m 3 [0m [92;1m<[0m[92mspan[0m[92;1m>[0m[92mHello[0m[92m[0m[92mspan[0m[92;1m>[0m[92m, world![0m
+[2m . [0m [2m 4 [0m
[0m,
+[2m 3 [0m document.getElementById([95m"root"[0m)); [2m 5 [0m document.getElementById([95m"root"[0m)
+[2m . [0m [2m 6 [0m);
+[2m 4 [0m [2m 7 [0m
+[2m 5 [0m[1mvar[0m x [1m=[0m ( [2m 8 [0m[1mvar[0m x [1m=[0m (
+[91;1m 6 [0m [91;1m<[0m[91mdiv[0m[91;1m>[0m [2m . [0m
+[2m 7 [0m [2m 9 [0m
+[2m 8 [0m foo [2m10 [0m foo
+[2m 9 [0m
[0m [2m11 [0m
[0m);
+[91;1m10 [0m [91m[0m[91mdiv[0m[91;1m>[0m); [2m [0m
diff --git a/tests/snapshots/cli__samples_side_by_side@julia_1.jl.snap b/tests/snapshots/cli__samples_side_by_side@julia_1.jl.snap
new file mode 100644
index 0000000000..eb8ff2b0fa
--- /dev/null
+++ b/tests/snapshots/cli__samples_side_by_side@julia_1.jl.snap
@@ -0,0 +1,33 @@
+---
+source: tests/cli.rs
+expression: stdout
+input_file: sample_files/julia_1.jl
+---
+[1m[93msample_files/julia_2.jl[39m[0m[2m --- 1/2 --- Julia[0m
+[2m26 [0m[2m26 [0misrawtext(::[95mMIME"text/plain"[0m, x::[1mAbstractString[0m) [1m=[0m false
+[2m27 [0m[2m27 [0misrawtext(::[1mMIME[0m, x) [1m=[0m false
+[2m.. [0m[92;1m28 [0m
+[2m.. [0m[92;1m29 [0m[92mInlineIOContext[0m[92;1m([0m[92mio[0m[92m,[0m [92mKVs[0m[92m::[0m[92;1mPair[0m[92m...[0m[92;1m)[0m [92;1m=[0m [92mIOContext[0m[92;1m([0m
+[2m.. [0m[92;1m30 [0m [92mio[0m[92m,[0m
+[2m.. [0m[92;1m31 [0m [92m:[0m[92mlimit[0m[92;1m=>[0m[92mtrue[0m[92m,[0m [92m:[0m[92mcolor[0m[92;1m=>[0m[92mtrue[0m[92m,[0m [92m:[0m[92mjupyter[0m[92;1m=>[0m[92mtrue[0m[92m,[0m
+[2m.. [0m[92;1m32 [0m [92mKVs[0m[92m...[0m
+[2m.. [0m[92;1m33 [0m[92;1m)[0m
+[2m28 [0m[2m34 [0m
+[2m29 [0m[2m35 [0m[94;3m# convert x to a string of type mime, making sure to use an[0m
+[2m30 [0m[2m36 [0m[94;3m# IOContext that tells the underlying show function to limit output[0m
+
+[1msample_files/julia_2.jl[0m[2m --- 2/2 --- Julia[0m
+[2m34 [0m [1mif[0m israwtext(mime, x) [2m40 [0m [1mif[0m israwtext(mime, x)
+[2m35 [0m [1mreturn[0m String(x) [2m41 [0m [1mreturn[0m String(x)
+[2m36 [0m [1melse[0m [2m42 [0m [1melse[0m
+[91;1m37 [0m show([91mIOContext[0m(buf[91m,[0m [91m:[0m[91mlimit[0m[91;1m=>[0m[91mtrue[0m[91m,[0m [91m:[0m[91mcolor[0m[91;1m=>[0m[91mtrue[0m), mime, x) [92;1m43 [0m show([92mInlineIOContext[0m(buf), mime, x)
+[2m38 [0m [1mend[0m [2m44 [0m [1mend[0m
+[2m39 [0m [1melse[0m [2m45 [0m [1melse[0m
+[2m40 [0m b64 [1m=[0m Base64EncodePipe(buf) [2m46 [0m b64 [1m=[0m Base64EncodePipe(buf)
+[2m41 [0m [1mif[0m isa(x, Vector{[1mUInt8[0m}) [2m47 [0m [1mif[0m isa(x, Vector{[1mUInt8[0m})
+[2m42 [0m write(b64, x) [94;3m# x assumed to be raw binary data[0m [2m48 [0m write(b64, x) [94;3m# x assumed to be raw binary data[0m
+[2m43 [0m [1melse[0m [2m49 [0m [1melse[0m
+[91;1m44 [0m show([91mIOContext[0m(b64[91m,[0m [91m:[0m[91mlimit[0m[91;1m=>[0m[91mtrue[0m[91m,[0m [91m:[0m[91mcolor[0m[91;1m=>[0m[91mtrue[0m), mime, x) [92;1m50 [0m show([92mInlineIOContext[0m(b64), mime, x)
+[2m45 [0m [1mend[0m [2m51 [0m [1mend[0m
+[2m46 [0m close(b64) [2m52 [0m close(b64)
+[2m47 [0m [1mend[0m [2m53 [0m [1mend[0m
diff --git a/tests/snapshots/cli__samples_side_by_side@load_1.js.snap b/tests/snapshots/cli__samples_side_by_side@load_1.js.snap
new file mode 100644
index 0000000000..bb03252af1
--- /dev/null
+++ b/tests/snapshots/cli__samples_side_by_side@load_1.js.snap
@@ -0,0 +1,194 @@
+---
+source: tests/cli.rs
+expression: stdout
+input_file: sample_files/load_1.js
+---
+[1m[93msample_files/load_2.js[39m[0m[2m --- 1/4 --- JavaScript[0m
+[2m12 [0m [2m12 [0m
+[2m13 [0m[1mvar[0m total [1m=[0m 0; [2m13 [0m[1mvar[0m total [1m=[0m 0;
+[2m14 [0m [2m14 [0m
+[2m.. [0m [92;1m15 [0m[92;1mfunction[0m [92mcreateResource[0m[92;1m([0m[92mresourcePath[0m[92m,[0m [92mlocalPath[0m[92;1m)[0m [92;1m{[0m
+[2m15 [0m[1mvar[0m [1mMIME_TYPES[0m [1m=[0m { [2m16 [0m [1mvar[0m [1mMIME_TYPES[0m [1m=[0m {
+[2m16 [0m [95m".css"[0m: [95m"text/css"[0m, [2m17 [0m [95m".css"[0m: [95m"text/css"[0m,
+[2m17 [0m [95m".html"[0m: [95m"text/html"[0m, [2m18 [0m [95m".html"[0m: [95m"text/html"[0m,
+[2m18 [0m [95m".js"[0m: [95m"application/javascript"[0m, [2m19 [0m [95m".js"[0m: [95m"application/javascript"[0m,
+[2m19 [0m [95m""[0m: [95m"text/x-markdown"[0m, [2m20 [0m [95m""[0m: [95m"text/x-markdown"[0m,
+[2m20 [0m}; [2m21 [0m };
+[91;1m21 [0m [2m.. [0m
+[91;1m22 [0m[91;3m// Write localPath to the database.[0m [2m.. [0m
+[91;1m23 [0m[91;3m//[0m [2m.. [0m
+[91;1m24 [0m[91;3m// If no resourcePath is provided, convert "node_modules/foo/bar.js" to[0m [2m.. [0m
+[91;1m25 [0m[91;3m// "foo/bar.js".[0m [2m.. [0m
+[91;1m26 [0m[91;1mfunction[0m [91mcreateNodeModuleResource[0m[91;1m([0m[91mlocalPath[0m[91m,[0m [91mresourcePath[0m[91;1m)[0m [91;1m{[0m [2m.. [0m
+[91;1m27 [0m [91;1mif[0m [91;1m([0m[91mresourcePath[0m [91;1m==[0m [91;1mnull[0m[91;1m)[0m [91;1m{[0m [2m.. [0m
+[91;1m28 [0m [91mresourcePath[0m [91;1m=[0m [91mpath[0m[91m.[0m[91mrelative[0m[91;1m([0m[91m"node_modules"[0m[91m,[0m [91mlocalPath[0m[91;1m)[0m[91m;[0m [2m.. [0m
+[91;1m29 [0m [91;1m}[0m [2m.. [0m
+[2m30 [0m [2m22 [0m
+[2m31 [0m [1mreturn[0m [1mfunction[0m (cb) { [2m23 [0m [1mreturn[0m [1mfunction[0m (cb) {
+[2m32 [0m total[1m++[0m; [2m24 [0m total[1m++[0m;
+
+[1msample_files/load_2.js[0m[2m --- 2/4 --- JavaScript[0m
+[2m40 [0m bootstrapPath: localPath, [2m32 [0m bootstrapPath: localPath,
+[2m41 [0m }).save(cb); [2m33 [0m }).save(cb);
+[2m42 [0m }; [2m34 [0m };
+[91;1m43 [0m[91;1m}[0m [92;1m35 [0m[92;1m}[0m
+[91;1m44 [0m [2m.. [0m
+[91;1m45 [0m[91;1mfunction[0m [91mcreateResource[0m[91;1m([0m[91mresourcePath[0m[91m,[0m [91mlocalPath[0m[91;1m)[0m [91;1m{[0m [2m.. [0m
+[91;1m46 [0m [91;1mreturn[0m [91;1mfunction[0m [91;1m([0m[91mcb[0m[91;1m)[0m [91;1m{[0m [2m.. [0m
+[91;1m47 [0m [91mtotal[0m[91;1m++[0m[91m;[0m [2m.. [0m
+[91;1m48 [0m [91;1mnew[0m [91mmodels[0m[91m.[0m[91mResource[0m[91;1m([0m[91;1m{[0m [2m.. [0m
+[91;1m49 [0m [91mpath[0m[91m:[0m [91mresourcePath[0m[91m,[0m [2m.. [0m
+[91;1m50 [0m [91mmimeType[0m[91m:[0m [91;1mMIME_TYPES[0m[91;1m[[0m[91mpath[0m[91m.[0m[91mextname[0m[91;1m([0m[91mlocalPath[0m[91;1m)[0m[91;1m][0m[91m,[0m [2m.. [0m
+[91;1m51 [0m [91mcontent[0m[91m:[0m [91mfs[0m[91m.[0m[91mreadFileSync[0m[91;1m([0m[91mlocalPath[0m[91m,[0m [91;1m{[0m [2m.. [0m
+[91;1m52 [0m [91mencoding[0m[91m:[0m [91m"utf8"[0m[91m,[0m [2m.. [0m
+[91;1m53 [0m [91;1m}[0m[91;1m)[0m[91m,[0m [2m.. [0m
+[91;1m54 [0m [91mcreated[0m[91m:[0m [91;1mDate[0m[91m.[0m[91mnow[0m[91;1m([0m[91;1m)[0m[91m,[0m [2m.. [0m
+[91;1m55 [0m [91mbootstrapPath[0m[91m:[0m [91mlocalPath[0m[91m,[0m [2m.. [0m
+[91;1m56 [0m [91;1m}[0m[91;1m)[0m[91m.[0m[91msave[0m[91;1m([0m[91mcb[0m[91;1m)[0m[91m;[0m [2m.. [0m
+[91;1m57 [0m [91;1m}[0m[91m;[0m [2m.. [0m
+[91;1m58 [0m[91;1m}[0m [2m.. [0m
+[2m59 [0m [2m36 [0m
+[2m60 [0m[1mfunction[0m createBinaryResource(opts) { [2m37 [0m[1mfunction[0m createBinaryResource(opts) {
+[2m61 [0m [1mreturn[0m [1mfunction[0m (cb) { [2m38 [0m [1mreturn[0m [1mfunction[0m (cb) {
+
+[1msample_files/load_2.js[0m[2m --- 3/4 --- JavaScript[0m
+[2m 92 [0m }), [2m 69 [0m }),
+[2m 93 [0m [2m 70 [0m
+[2m 94 [0m [94;3m// Base codemirror[0m [2m 71 [0m [94;3m// Base codemirror[0m
+[91;1m 95 [0m [91mcreateNodeModuleResource[0m( [92;1m 72 [0m [92mcreateResource[0m(
+[2m .. [0m [92;1m 73 [0m [92m"codemirror/lib/codemirror.css"[0m[92m,[0m
+[2m 96 [0m [95m"node_modules/codemirror/lib/codemirror.css"[0m [2m 74 [0m [95m"node_modules/codemirror/lib/codemirror.css"[0m
+[2m 97 [0m ), [2m 75 [0m ),
+[91;1m 98 [0m [91mcreateNodeModuleResource[0m([95m"node_modules/codemirror/lib/codemirror.[0m [92;1m 76 [0m [92mcreateResource[0m(
+[91;1m[2m .. [0m[0m[95mjs"[0m), [92;1m[2m .. [0m[0m
+[2m .. [0m [92;1m 77 [0m [92m"codemirror/lib/codemirror.js"[0m[92m,[0m
+[2m .. [0m [2m 78 [0m [95m"node_modules/codemirror/lib/codemirror.js"[0m
+[2m .. [0m [2m 79 [0m ),
+[2m 99 [0m [2m 80 [0m
+[2m100 [0m [94;3m// Editor conveniences[0m [2m 81 [0m [94;3m// Editor conveniences[0m
+[91;1m101 [0m [91mcreateNodeModuleResource[0m( [92;1m 82 [0m [92mcreateResource[0m(
+[2m... [0m [92;1m 83 [0m [92m"codemirror/addon/edit/closebrackets.js"[0m[92m,[0m
+[2m102 [0m [95m"node_modules/codemirror/addon/edit/closebrackets.js"[0m [2m 84 [0m [95m"node_modules/codemirror/addon/edit/closebrackets.js"[0m
+[2m103 [0m ), [2m 85 [0m ),
+[91;1m104 [0m [91mcreateNodeModuleResource[0m( [92;1m 86 [0m [92mcreateResource[0m(
+[2m... [0m [92;1m 87 [0m [92m"codemirror/addon/edit/matchbrackets.js"[0m[92m,[0m
+[2m105 [0m [95m"node_modules/codemirror/addon/edit/matchbrackets.js"[0m [2m 88 [0m [95m"node_modules/codemirror/addon/edit/matchbrackets.js"[0m
+[2m106 [0m ), [2m 89 [0m ),
+[91;1m107 [0m [91mcreateNodeModuleResource[0m( [92;1m 90 [0m [92mcreateResource[0m(
+[2m... [0m [92;1m 91 [0m [92m"codemirror/addon/selection/active-line.js"[0m[92m,[0m
+[2m108 [0m [95m"node_modules/codemirror/addon/selection/active-line.js"[0m [2m 92 [0m [95m"node_modules/codemirror/addon/selection/active-line.js"[0m
+[2m109 [0m ), [2m 93 [0m ),
+[2m110 [0m [2m 94 [0m
+[2m111 [0m [94;3m// Linting in editor.[0m [2m 95 [0m [94;3m// Linting in editor.[0m
+[91;1m112 [0m [91mcreateNodeModuleResource[0m( [92;1m 96 [0m [92mcreateResource[0m(
+[2m... [0m [92;1m 97 [0m [92m"codemirror/addon/lint/lint.css"[0m[92m,[0m
+[2m113 [0m [95m"node_modules/codemirror/addon/lint/lint.css"[0m [2m 98 [0m [95m"node_modules/codemirror/addon/lint/lint.css"[0m
+[2m114 [0m ), [2m 99 [0m ),
+[91;1m115 [0m [91mcreateNodeModuleResource[0m( [92;1m100 [0m [92mcreateResource[0m(
+[2m... [0m [92;1m101 [0m [92m"codemirror/addon/lint/lint.js"[0m[92m,[0m
+[2m116 [0m [95m"node_modules/codemirror/addon/lint/lint.js"[0m [2m102 [0m [95m"node_modules/codemirror/addon/lint/lint.js"[0m
+[2m117 [0m ), [2m103 [0m ),
+[91;1m118 [0m [91mcreateNodeModuleResource[0m( [92;1m104 [0m [92mcreateResource[0m(
+[2m... [0m [92;1m105 [0m [92m"codemirror/addon/lint/javascript-lint.js"[0m[92m,[0m
+[2m119 [0m [95m"node_modules/codemirror/addon/lint/javascript-lint.js"[0m [2m106 [0m [95m"node_modules/codemirror/addon/lint/javascript-lint.js"[0m
+[2m120 [0m ), [2m107 [0m ),
+[2m121 [0m [2m108 [0m
+[2m122 [0m [94;3m// Basic, dumb completion (dabbrev style).[0m [2m109 [0m [94;3m// Basic, dumb completion (dabbrev style).[0m
+[91;1m123 [0m [91mcreateNodeModuleResource[0m( [92;1m110 [0m [92mcreateResource[0m(
+[2m... [0m [92;1m111 [0m [92m"codemirror/addon/hint/show-hint.css"[0m[92m,[0m
+[2m124 [0m [95m"node_modules/codemirror/addon/hint/show-hint.css"[0m [2m112 [0m [95m"node_modules/codemirror/addon/hint/show-hint.css"[0m
+[2m125 [0m ), [2m113 [0m ),
+[91;1m126 [0m [91mcreateNodeModuleResource[0m( [92;1m114 [0m [92mcreateResource[0m(
+[2m... [0m [92;1m115 [0m [92m"codemirror/addon/hint/show-hint.js"[0m[92m,[0m
+[2m127 [0m [95m"node_modules/codemirror/addon/hint/show-hint.js"[0m [2m116 [0m [95m"node_modules/codemirror/addon/hint/show-hint.js"[0m
+[2m128 [0m ), [2m117 [0m ),
+[91;1m129 [0m [91mcreateNodeModuleResource[0m( [92;1m118 [0m [92mcreateResource[0m(
+[2m... [0m [92;1m119 [0m [92m"codemirror/addon/hint/anyword-hint.js"[0m[92m,[0m
+[2m130 [0m [95m"node_modules/codemirror/addon/hint/anyword-hint.js"[0m [2m120 [0m [95m"node_modules/codemirror/addon/hint/anyword-hint.js"[0m
+[2m131 [0m ), [2m121 [0m ),
+[91;1m132 [0m [91mcreateNodeModuleResource[0m( [92;1m122 [0m [92mcreateResource[0m(
+[2m... [0m [92;1m123 [0m [92m"codemirror/addon/hint/css-hint.js"[0m[92m,[0m
+[2m133 [0m [95m"node_modules/codemirror/addon/hint/css-hint.js"[0m [2m124 [0m [95m"node_modules/codemirror/addon/hint/css-hint.js"[0m
+[2m134 [0m ), [2m125 [0m ),
+[91;1m135 [0m [91mcreateNodeModuleResource[0m( [92;1m126 [0m [92mcreateResource[0m(
+[2m... [0m [92;1m127 [0m [92m"codemirror/addon/hint/html-hint.js"[0m[92m,[0m
+[2m136 [0m [95m"node_modules/codemirror/addon/hint/html-hint.js"[0m [2m128 [0m [95m"node_modules/codemirror/addon/hint/html-hint.js"[0m
+[2m137 [0m ), [2m129 [0m ),
+[91;1m138 [0m [91mcreateNodeModuleResource[0m( [92;1m130 [0m [92mcreateResource[0m(
+[2m... [0m [92;1m131 [0m [92m"codemirror/addon/hint/xml-hint.js"[0m[92m,[0m
+[2m139 [0m [95m"node_modules/codemirror/addon/hint/xml-hint.js"[0m [2m132 [0m [95m"node_modules/codemirror/addon/hint/xml-hint.js"[0m
+[2m140 [0m ), [2m133 [0m ),
+[2m141 [0m [2m134 [0m
+[2m142 [0m [94;3m// Syntax highlighting[0m [2m135 [0m [94;3m// Syntax highlighting[0m
+[91;1m143 [0m [91mcreateNodeModuleResource[0m( [92;1m136 [0m [92mcreateResource[0m(
+[2m... [0m [92;1m137 [0m [92m"codemirror/mode/javascript/javascript.js"[0m[92m,[0m
+[2m144 [0m [95m"node_modules/codemirror/mode/javascript/javascript.js"[0m [2m138 [0m [95m"node_modules/codemirror/mode/javascript/javascript.js"[0m
+[2m145 [0m ), [2m139 [0m ),
+[91;1m146 [0m [91mcreateNodeModuleResource[0m([95m"node_modules/codemirror/mode/meta.js"[0m), [92;1m140 [0m [92mcreateResource[0m(
+[2m... [0m [92;1m141 [0m [92m"codemirror/mode/meta.js"[0m[92m,[0m
+[2m... [0m [2m142 [0m [95m"node_modules/codemirror/mode/meta.js"[0m
+[2m... [0m [2m143 [0m ),
+[91;1m147 [0m [91mcreateNodeModuleResource[0m( [92;1m144 [0m [92mcreateResource[0m(
+[2m... [0m [92;1m145 [0m [92m"codemirror/mode/markdown/markdown.js"[0m[92m,[0m
+[2m148 [0m [95m"node_modules/codemirror/mode/markdown/markdown.js"[0m [2m146 [0m [95m"node_modules/codemirror/mode/markdown/markdown.js"[0m
+[2m149 [0m ), [2m147 [0m ),
+[91;1m150 [0m [91mcreateNodeModuleResource[0m([95m"node_modules/codemirror/mode/xml/xml.js[0m [92;1m148 [0m [92mcreateResource[0m(
+[91;1m[2m... [0m[0m[95m"[0m), [92;1m[2m... [0m[0m
+[2m... [0m [92;1m149 [0m [92m"codemirror/mode/xml/xml.js"[0m[92m,[0m
+[2m... [0m [2m150 [0m [95m"node_modules/codemirror/mode/xml/xml.js"[0m
+[2m... [0m [2m151 [0m ),
+[91;1m151 [0m [91mcreateNodeModuleResource[0m([95m"node_modules/codemirror/mode/css/css.js[0m [92;1m152 [0m [92mcreateResource[0m(
+[91;1m[2m... [0m[0m[95m"[0m), [92;1m[2m... [0m[0m
+[2m... [0m [92;1m153 [0m [92m"codemirror/mode/css/css.js"[0m[92m,[0m
+[2m... [0m [2m154 [0m [95m"node_modules/codemirror/mode/css/css.js"[0m
+[2m... [0m [2m155 [0m ),
+[2m152 [0m [2m156 [0m
+[91;1m153 [0m [91mcreateNodeModuleResource[0m([95m"node_modules/requirejs/require.js"[0m), [92;1m157 [0m [92mcreateResource[0m(
+[2m... [0m [92;1m158 [0m [92m"requirejs/require.js"[0m[92m,[0m
+[2m... [0m [2m159 [0m [95m"node_modules/requirejs/require.js"[0m
+[2m... [0m [2m160 [0m ),
+[2m154 [0m [2m161 [0m
+[91;1m155 [0m [91mcreateNodeModuleResource[0m( [92;1m162 [0m [92mcreateResource[0m([95m"backbone.js"[0m[92m,[0m [92m"node_modules/backbone/backbone.js"[0m
+[91;1m[2m... [0m[0m [92;1m[2m... [0m[0m),
+[91;1m156 [0m [91m"node_modules/backbone/backbone.js"[0m[91m,[0m [2m... [0m
+[2m157 [0m [95m"backbone.js"[0m [2m... [0m
+[2m158 [0m ), [2m... [0m
+[2m159 [0m [2m163 [0m
+[91;1m160 [0m [91mcreateNodeModuleResource[0m( [92;1m164 [0m [92mcreateResource[0m(
+[91;1m161 [0m [91m"node_modules/underscore/underscore.js"[0m[91m,[0m [2m... [0m
+[2m162 [0m [95m"underscore.js"[0m [92;1m165 [0m [95m"underscore.js"[0m[92m,[0m
+[2m... [0m [92;1m166 [0m [92m"node_modules/underscore/underscore.js"[0m
+[2m163 [0m ), [2m167 [0m ),
+[2m164 [0m [2m168 [0m
+[91;1m165 [0m [91mcreateNodeModuleResource[0m( [92;1m169 [0m [92mcreateResource[0m([95m"jquery.js"[0m[92m,[0m [92m"node_modules/jquery/dist/jquery.js"[0m)
+[91;1m[2m... [0m[0m [92;1m[2m... [0m[0m,
+[91;1m166 [0m [91m"node_modules/jquery/dist/jquery.js"[0m[91m,[0m [2m... [0m
+[2m167 [0m [95m"jquery.js"[0m [2m... [0m
+[2m168 [0m ), [2m... [0m
+[2m169 [0m [2m170 [0m
+[91;1m170 [0m [91mcreateNodeModuleResource[0m( [92;1m171 [0m [92mcreateResource[0m(
+[91;1m171 [0m [91m"node_modules/marked/lib/marked.js"[0m[91m,[0m [2m... [0m
+[2m172 [0m [95m"marked/marked.js"[0m [92;1m172 [0m [95m"marked/marked.js"[0m[92m,[0m
+[2m... [0m [92;1m173 [0m [92m"node_modules/marked/lib/marked.js"[0m
+[2m173 [0m ), [2m174 [0m ),
+[2m174 [0m [2m175 [0m
+[91;1m175 [0m [91mcreateNodeModuleResource[0m( [92;1m176 [0m [92mcreateResource[0m(
+[91;1m176 [0m [91m"node_modules/handlebars/dist/handlebars.js"[0m[91m,[0m [2m... [0m
+[2m177 [0m [95m"handlebars/handlebars.js"[0m [92;1m177 [0m [95m"handlebars/handlebars.js"[0m[92m,[0m
+[2m... [0m [92;1m178 [0m [92m"node_modules/handlebars/dist/handlebars.js"[0m
+[2m178 [0m ), [2m179 [0m ),
+[2m179 [0m [2m180 [0m
+[2m180 [0m [94;3m// Notifications[0m [2m181 [0m [94;3m// Notifications[0m
+
+[1msample_files/load_2.js[0m[2m --- 4/4 --- JavaScript[0m
+[2m192 [0m localPath: [95m"icons/Error-48.png"[0m, [2m193 [0m localPath: [95m"icons/Error-48.png"[0m,
+[2m193 [0m }), [2m194 [0m }),
+[2m194 [0m [2m195 [0m
+[2m... [0m [92;1m196 [0m [92;3m// TODO: it would be nice to have more systematic naming[0m
+[2m... [0m [92;1m197 [0m [92;3m// of our paths, based on the node_modules path.[0m
+[91;1m195 [0m [91mcreateNodeModuleResource[0m([95m"node_modules/mocha/mocha.js"[0m), [92;1m198 [0m [92mcreateResource[0m([92m"mocha/mocha.js"[0m[92m,[0m [95m"node_modules/mocha/mocha.js"[0m),
+[91;1m196 [0m [91mcreateNodeModuleResource[0m([95m"node_modules/mocha/mocha.css"[0m), [92;1m199 [0m [92mcreateResource[0m([92m"mocha/mocha.css"[0m[92m,[0m [95m"node_modules/mocha/mocha.css"[0m)
+[91;1m[2m... [0m[0m [92;1m[2m... [0m[0m,
+[2m197 [0m [2m200 [0m
+[2m198 [0m createResource([95m"metawiki/index.html"[0m, [95m"src/frontend/index.html"[0m), [2m201 [0m createResource([95m"metawiki/index.html"[0m, [95m"src/frontend/index.html"[0m),
+[2m199 [0m [2m202 [0m
diff --git a/tests/snapshots/cli__samples_side_by_side@lua_1.lua.snap b/tests/snapshots/cli__samples_side_by_side@lua_1.lua.snap
new file mode 100644
index 0000000000..fdcee4b7f6
--- /dev/null
+++ b/tests/snapshots/cli__samples_side_by_side@lua_1.lua.snap
@@ -0,0 +1,20 @@
+---
+source: tests/cli.rs
+expression: stdout
+input_file: sample_files/lua_1.lua
+---
+[1m[93msample_files/lua_2.lua[39m[0m[2m --- Lua[0m
+[2m 1 [0m[1mfunction[0m test() [92;1m 1 [0m[1mfunction[0m test([92mname[0m)
+[2m 2 [0m print([95m"testing"[0m) [92;1m 2 [0m print([95m"testing"[0m[92;1m..[0m[92mname[0m)
+[2m 3 [0m [1mreturn[0m 10 [2m 3 [0m [1mreturn[0m 10
+[2m 4 [0m[1mend[0m [2m 4 [0m[1mend[0m
+[2m 5 [0m [2m 5 [0m
+[2m 6 [0m[1mif[0m test() [1m==[0m 20 [1mthen[0m [92;1m 6 [0m[1mif[0m test([92m"myname"[0m) [1m==[0m 20 [1mthen[0m
+[91;1m 7 [0m print([91m"30"[0m) [92;1m 7 [0m print([92m"20"[0m)
+[2m 8 [0m[1mend[0m [2m 8 [0m[1mend[0m
+[2m 9 [0m [2m 9 [0m
+[2m10 [0m[1mlocal[0m list [1m=[0m { [95m"A"[0m, [95m"B"[0m, [95m"D"[0m } [92;1m10 [0m[1mlocal[0m list [1m=[0m { [95m"A"[0m, [95m"B"[0m, [92m"C"[0m[92m,[0m [95m"D"[0m }
+[2m11 [0m[1mlocal[0m table [1m=[0m { a [1m=[0m [95m"A"[0m, b [1m=[0m [95m"B"[0m, d [1m=[0m [95m"D"[0m } [92;1m11 [0m[1mlocal[0m table [1m=[0m { a [1m=[0m [95m"A"[0m, b [1m=[0m [95m"B"[0m, [92mc[0m [92;1m=[0m [92m"C"[0m[92m,[0m d [1m=[0m [95m"D"[0m }
+[2m12 [0m [2m12 [0m
+[2m13 [0m[1mfor[0m k, v [1min[0m pairs(table) [1mdo[0m [2m13 [0m[1mfor[0m k, v [1min[0m pairs(table) [1mdo[0m
+[2m14 [0m print([95m"k: "[0m[1m..[0mk[1m..[0m[95m" v: "[0m[1m..[0mv) [2m14 [0m print([95m"k: "[0m[1m..[0mk[1m..[0m[95m" v: "[0m[1m..[0mv)
diff --git a/tests/snapshots/cli__samples_side_by_side@metadata_1.clj.snap b/tests/snapshots/cli__samples_side_by_side@metadata_1.clj.snap
new file mode 100644
index 0000000000..5b1a7dbcba
--- /dev/null
+++ b/tests/snapshots/cli__samples_side_by_side@metadata_1.clj.snap
@@ -0,0 +1,35 @@
+---
+source: tests/cli.rs
+expression: stdout
+input_file: sample_files/metadata_1.clj
+---
+[1m[93msample_files/metadata_2.clj[39m[0m[2m --- 1/3 --- Clojure[0m
+[2m2 [0m[2m2 [0m [95m"Utilities for formatting binary data (byte arrays) or binary deltas."[0m
+[2m3 [0m[2m3 [0m ([1m:require[0m [io.aviso.ansi [1m:as[0m ansi]
+[2m4 [0m[2m4 [0m [io.aviso.columns [1m:as[0m c])
+[2m. [0m[92;1m5 [0m [92;1m([0m[92;1m:import[0m [92;1m([0m[92mjava.nio[0m [92mByteBuffer[0m[92;1m)[0m[92;1m)[0m)
+[2m5 [0m[2m6 [0m
+[2m6 [0m[2m7 [0m(defprotocol BinaryData
+[2m7 [0m[2m8 [0m [95m"Allows various data sources to be treated as a byte-array data type that[0m
+
+[1msample_files/metadata_2.clj[0m[2m --- 2/3 --- Clojure[0m
+[2m17 [0m[2m18 [0m (data-length [ary] (alength (bytes ary)))
+[2m18 [0m[2m19 [0m (byte-at [ary index] (aget (bytes ary) index)))
+[2m.. [0m[92;1m20 [0m
+[2m.. [0m[92;1m21 [0m[92;1m([0m[92mextend-type[0m [92mByteBuffer[0m
+[2m.. [0m[92;1m22 [0m [92mBinaryData[0m
+[2m.. [0m[92;1m23 [0m [92;1m([0m[92mdata-length[0m [92;1m[[0m[92mb[0m[92;1m][0m [92;1m([0m[92m.remaining[0m [92mb[0m[92;1m)[0m[92;1m)[0m
+[2m.. [0m[92;1m24 [0m [92;1m([0m[92mbyte-at[0m [92;1m[[0m[92mb[0m [92mindex[0m[92;1m][0m [92;1m([0m[92m.get[0m [92m^[0m[92mByteBuffer[0m [92mb[0m [92;1m([0m[92mint[0m [92mindex[0m[92;1m)[0m[92;1m)[0m[92;1m)[0m[92;1m)[0m
+[2m19 [0m[2m25 [0m
+[2m20 [0m[2m26 [0m[94;3m;;; Extends String as a convenience; assumes that the[0m
+[2m21 [0m[2m27 [0m[94;3m;;; String is in utf-8.[0m
+
+[1msample_files/metadata_2.clj[0m[2m --- 3/3 --- Clojure[0m
+[2m34 [0m(extend-type [1mnil[0m [2m40 [0m(extend-type [1mnil[0m
+[2m35 [0m BinaryData [2m41 [0m BinaryData
+[2m36 [0m (data-length [_] 0) [2m42 [0m (data-length [_] 0)
+[91;1m37 [0m (byte-at [_ [91mindex[0m] (throw (IndexOutOfBoundsException. [95m"Can't use byte-at w[0m [92;1m43 [0m (byte-at [_ [92m_index[0m] (throw (IndexOutOfBoundsException. [95m"Can't use byte-at [0m
+[91;1m[2m.. [0m[0m[95mith nil."[0m)))) [92;1m[2m.. [0m[0m[95mwith nil."[0m))))
+[2m38 [0m [2m44 [0m
+[2m39 [0m(def ^[1m:private[0m ^[1m:const[0m bytes-per-diff-line 16) [2m45 [0m(def ^[1m:private[0m ^[1m:const[0m bytes-per-diff-line 16)
+[2m40 [0m(def ^[1m:private[0m ^[1m:const[0m bytes-per-ascii-line 16) [2m46 [0m(def ^[1m:private[0m ^[1m:const[0m bytes-per-ascii-line 16)
diff --git a/tests/snapshots/cli__samples_side_by_side@multibyte_1.py.snap b/tests/snapshots/cli__samples_side_by_side@multibyte_1.py.snap
new file mode 100644
index 0000000000..4f3ddde6fb
--- /dev/null
+++ b/tests/snapshots/cli__samples_side_by_side@multibyte_1.py.snap
@@ -0,0 +1,7 @@
+---
+source: tests/cli.rs
+expression: stdout
+input_file: sample_files/multibyte_1.py
+---
+[1m[93msample_files/multibyte_2.py[39m[0m[2m --- Python[0m
+[91;1m1 [0m[91m"[0m[91;1;4mfoo[0m[91m€[0m[91m"[0m.format() [92;1m1 [0m[92m"[0m[92;1;4mbar[0m[92m€[0m[92m"[0m.format()
diff --git a/tests/snapshots/cli__samples_side_by_side@multiline_string_1.ml.snap b/tests/snapshots/cli__samples_side_by_side@multiline_string_1.ml.snap
new file mode 100644
index 0000000000..84880d9dc3
--- /dev/null
+++ b/tests/snapshots/cli__samples_side_by_side@multiline_string_1.ml.snap
@@ -0,0 +1,12 @@
+---
+source: tests/cli.rs
+expression: stdout
+input_file: sample_files/multiline_string_1.ml
+---
+[1m[93msample_files/multiline_string_2.ml[39m[0m[2m --- OCaml[0m
+[2m1 [0m[1mlet[0m x = [2m1 [0m[1mlet[0m x =
+[91;1m2 [0m [91m"[0m [92;1m2 [0m [92m"[0m
+[91;1m3 [0m[91mfoo[0m [92;1m3 [0m[92mfoo[0m
+[91;1m4 [0m [92;1m4 [0m
+[91;1m5 [0m[91;1;4mbar[0m [92;1m5 [0m[92;1;4mnovel[0m
+[91;1m6 [0m[91m"[0m [92;1m6 [0m[92m"[0m
diff --git a/tests/snapshots/cli__samples_side_by_side@nested_slider_1.el.snap b/tests/snapshots/cli__samples_side_by_side@nested_slider_1.el.snap
new file mode 100644
index 0000000000..70efb1d600
--- /dev/null
+++ b/tests/snapshots/cli__samples_side_by_side@nested_slider_1.el.snap
@@ -0,0 +1,14 @@
+---
+source: tests/cli.rs
+expression: stdout
+input_file: sample_files/nested_slider_1.el
+---
+[1m[93msample_files/nested_slider_2.el[39m[0m[2m --- Emacs Lisp[0m
+[2m 3 [0m ([1mlet[0m ((root default-directory) [2m3 [0m ([1mlet[0m ((root default-directory)
+[2m 4 [0m (project (project-current))) [2m4 [0m (project (project-current)))
+[2m 5 [0m (when project [2m5 [0m (when project
+[91;1m 6 [0m [91;1m([0m[91m-when-let[0m [91;1m([0m[91mroots[0m [91;1m([0m[91mproject-roots[0m [91mproject[0m[91;1m)[0m[91;1m)[0m [2m. [0m
+[91;1m 7 [0m ([1msetq[0m root ([91mcar[0m [91mroots[0m))[91;1m)[0m) [92;1m6 [0m ([1msetq[0m root ([92mproject-root[0m [92mproject[0m)))
+[2m 8 [0m (when root [2m7 [0m (when root
+[2m 9 [0m (deadgrep--lookup-override root)))) [2m8 [0m (deadgrep--lookup-override root))))
+[91;1m10 [0m [2m [0m
diff --git a/tests/snapshots/cli__samples_side_by_side@nested_slider_1.rs.snap b/tests/snapshots/cli__samples_side_by_side@nested_slider_1.rs.snap
new file mode 100644
index 0000000000..e4d50cbb93
--- /dev/null
+++ b/tests/snapshots/cli__samples_side_by_side@nested_slider_1.rs.snap
@@ -0,0 +1,17 @@
+---
+source: tests/cli.rs
+expression: stdout
+input_file: sample_files/nested_slider_1.rs
+---
+[1m[93msample_files/nested_slider_2.rs[39m[0m[2m --- Rust[0m
+[2m1 [0m[2m 1 [0m[1mfn[0m split_string_by_codepoint_brace() {
+[2m2 [0m[2m 2 [0m [1mif[0m true {
+[2m. [0m[92;1m 3 [0m [92;1mif[0m [92mpad_last[0m [92;1m{[0m
+[2m3 [0m[2m 4 [0m x;
+[2m4 [0m[92;1m 5 [0m [92;1m}[0m
+[2m. [0m[2m 6 [0m }
+[2m5 [0m[2m 7 [0m}
+[2m6 [0m[2m 8 [0m
+[2m7 [0m[2m 9 [0m[1mfn[0m split_string_by_codepoint_paren() {
+[2m8 [0m[92;1m10 [0m foo([92mbar[0m[92;1m([0mx[92;1m)[0m)
+[2m9 [0m[2m11 [0m}
diff --git a/tests/snapshots/cli__samples_side_by_side@nesting_1.el.snap b/tests/snapshots/cli__samples_side_by_side@nesting_1.el.snap
new file mode 100644
index 0000000000..9e902f2857
--- /dev/null
+++ b/tests/snapshots/cli__samples_side_by_side@nesting_1.el.snap
@@ -0,0 +1,10 @@
+---
+source: tests/cli.rs
+expression: stdout
+input_file: sample_files/nesting_1.el
+---
+[1m[93msample_files/nesting_2.el[39m[0m[2m --- Emacs Lisp[0m
+[2m. [0m [92;1m1 [0m[92ma[0m
+[2m1 [0mb [2m2 [0mb
+[91;1m2 [0m[91;1m([0m[91mfoo[0m[91;1m)[0m [2m. [0m
+[2m3 [0mfoo [2m3 [0mfoo
diff --git a/tests/snapshots/cli__samples_side_by_side@nix_1.nix.snap b/tests/snapshots/cli__samples_side_by_side@nix_1.nix.snap
new file mode 100644
index 0000000000..2a36c6b266
--- /dev/null
+++ b/tests/snapshots/cli__samples_side_by_side@nix_1.nix.snap
@@ -0,0 +1,33 @@
+---
+source: tests/cli.rs
+expression: stdout
+input_file: sample_files/nix_1.nix
+---
+[1m[93msample_files/nix_2.nix[39m[0m[2m --- Nix[0m
+[2m 2 [0m [2m 2 [0m
+[2m 3 [0mrustPlatform.buildRustPackage [1mrec[0m { [2m 3 [0mrustPlatform.buildRustPackage [1mrec[0m {
+[2m 4 [0m pname = [95m"difftastic"[0m; [2m 4 [0m pname = [95m"difftastic"[0m;
+[91;1m 5 [0m version = [91m"[0m[91m0[0m[91m.[0m[91;1;4m12[0m[91m.[0m[91m0[0m[91m"[0m; [92;1m 5 [0m version = [92m"[0m[92m0[0m[92m.[0m[92;1;4m24[0m[92m.[0m[92m0[0m[92m"[0m;
+[2m 6 [0m [2m 6 [0m
+[2m 7 [0m src = fetchFromGitHub { [2m 7 [0m src = fetchFromGitHub {
+[2m 8 [0m owner = [95m"wilfred"[0m; [2m 8 [0m owner = [95m"wilfred"[0m;
+[2m 9 [0m repo = pname; [2m 9 [0m repo = pname;
+[2m10 [0m rev = version; [2m10 [0m rev = version;
+[91;1m11 [0m sha256 = [91m"sha256-A6Z3g6fbYBynyN4OhRrZNO0ZghvT3XnIahdUQ8SE8tU="[0m; [92;1m11 [0m sha256 = [92m"sha256-Yp0WwzGo8nuRZuiHdUPxPM1SYBeeVA3SMDfHnQmqUqY="[0m;
+[2m12 [0m }; [2m12 [0m };
+[2m13 [0m [2m13 [0m
+[91;1m14 [0m cargoSha256 = [91m"sha256-6/JwrPymtpj/CXqx3Pe43v+MJTNONArU2WEo/zgJhT4="[0m; [92;1m14 [0m cargoSha256 = [92m"sha256-m80PT2UQYhA5KEh7ax/fhh6vuse0DXhbFsh2x4pwkWY="[0m;
+[91;1m15 [0m [2m.. [0m
+[91;1m16 [0m [91mpostPatch[0m [91m=[0m [91m''[0m [2m.. [0m
+[91;1m17 [0m[91m pushd vendor[0m [2m.. [0m
+[91;1m18 [0m[91m for grammar in */; do[0m [2m.. [0m
+[91;1m19 [0m[91m if [ -d "${tree-sitter.grammars}/$grammar" ]; then[0m [2m.. [0m
+[91;1m20 [0m[91m rm -r "$grammar"[0m [2m.. [0m
+[91;1m21 [0m[91m ln -s "${tree-sitter.grammars}/$grammar"[0m [2m.. [0m
+[91;1m22 [0m[91m fi[0m [2m.. [0m
+[91;1m23 [0m[91m done[0m [2m.. [0m
+[91;1m24 [0m[91m popd[0m [2m.. [0m
+[91;1m25 [0m[91m ''[0m[91m;[0m [2m.. [0m
+[2m26 [0m [2m15 [0m
+[2m27 [0m meta = [1mwith[0m lib; { [2m16 [0m meta = [1mwith[0m lib; {
+[2m28 [0m description = [95m"A syntax-aware diff"[0m; [2m17 [0m description = [95m"A syntax-aware diff"[0m;
diff --git a/tests/snapshots/cli__samples_side_by_side@nullable_1.kt.snap b/tests/snapshots/cli__samples_side_by_side@nullable_1.kt.snap
new file mode 100644
index 0000000000..b2eebb9557
--- /dev/null
+++ b/tests/snapshots/cli__samples_side_by_side@nullable_1.kt.snap
@@ -0,0 +1,9 @@
+---
+source: tests/cli.rs
+expression: stdout
+input_file: sample_files/nullable_1.kt
+---
+[1m[93msample_files/nullable_2.kt[39m[0m[2m --- Kotlin[0m
+[2m1 [0m[1mclass[0m [1mFoo[0m { [2m1 [0m[1mclass[0m [1mFoo[0m {
+[91;1m2 [0m [1mval[0m str: [91mString?[0m [92;1m2 [0m [1mval[0m str: [92;1mString[0m
+[2m3 [0m} [2m3 [0m}
diff --git a/tests/snapshots/cli__samples_side_by_side@objc_header_1.h.snap b/tests/snapshots/cli__samples_side_by_side@objc_header_1.h.snap
new file mode 100644
index 0000000000..fe7dad876d
--- /dev/null
+++ b/tests/snapshots/cli__samples_side_by_side@objc_header_1.h.snap
@@ -0,0 +1,35 @@
+---
+source: tests/cli.rs
+expression: stdout
+input_file: sample_files/objc_header_1.h
+---
+[1m[93msample_files/objc_header_2.h[39m[0m[2m --- 1/2 --- Objective-C[0m
+[2m1 [0m[94;3m//[0m [2m1 [0m[94;3m//[0m
+[91;1m2 [0m[91;3m/[0m[91;3m/[0m[91;3m [0m[91;3m [0m[91;3mHttpServer[0m[91;3m.[0m[91;3mh[0m [92;1m2 [0m[92;3m/[0m[92;3m/[0m[92;3m [0m[92;3m [0m[92;3mHttpServer[0m[92;3m.[0m[92;3mh[0m [92;1;3;4mafter[0m [92;1;3;4mfile[0m
+[2m3 [0m[94;3m//[0m [2m3 [0m[94;3m//[0m
+[2m4 [0m[94;3m// Created by Nicholas Moore on 20/09/2022.[0m [2m4 [0m[94;3m// Created by Nicholas Moore on 20/09/2022.[0m
+[2m. [0m [92;1m5 [0m[92;3m// A line added to the header.[0m
+[2m5 [0m[94;3m//[0m [2m6 [0m[94;3m//[0m
+[2m6 [0m[94;3m// Added to difftastic test suite by the author.[0m [2m7 [0m[94;3m// Added to difftastic test suite by the author.[0m
+[2m7 [0m[94;3m// This source file is released by the author into the public domain.[0m [2m8 [0m[94;3m// This source file is released by the author into the public domain.[0m
+
+[1msample_files/objc_header_2.h[0m[2m --- 2/2 --- Objective-C[0m
+[2m . [0m [2m16 [0m NSDictionary *heade
+[2m . [0m [2m[2m.. [0m[0mrs,
+[2m . [0m [2m17 [0m NSData *body);
+[2m14 [0m [2m18 [0m
+[91;1m15 [0m[1m@interface[0m [1mPopHttpServer[0m : [91;1mNSObject[0m [92;1m19 [0m[1m@interface[0m [1mPopHttpServer[0m : [92;1mNSObjectqq[0m
+[2m16 [0m[1m@property[0m ([1mreadonly[0m) uint16_t port; [92;1m20 [0m[1m@property[0m([1mreadonly[0m) uint16_t port; [92;3m// comment[0m
+[2m.. [0m [92;1m21 [0m[92;1m@property[0m[92;1m([0m[92;1mreadonly[0m[92;1m)[0m [92mNSString[0m [92m*[0m[92mhost[0m[92m;[0m
+[2m17 [0m[1m@property[0m ([1mreadonly[0m) NSString *lastError; [2m22 [0m[1m@property[0m([1mreadonly[0m) NSString *lastError;
+[2m18 [0m[1m@property[0m ([1mreadonly[0m, [1mgetter[0m=[1misListening[0m) [1mBOOL[0m listening; [2m23 [0m[1m@property[0m([1mreadonly[0m, [1mgetter[0m=[1misListening[0m) [1mBOOL[0m listening;
+[2m19 [0m[1m-[0m ([1mid[0m)initWithPort:(uint16_t)port; [2m24 [0m[1m-[0m ([1mid[0m)initWithPort:(uint16_t)port;
+[2m20 [0m[1m-[0m ([1mBOOL[0m)start; [2m25 [0m[1m-[0m ([1mBOOL[0m)start;
+[2m21 [0m[1m-[0m (void)stop; [2m26 [0m[1m-[0m (void)stop;
+[2m22 [0m[1m-[0m (void)registerHandler:(NSString *)pathPrefix block:(PopHttpRequestHandler) [92;1m27 [0m[1m-[0m (void)registerHandler:(NSString *[92m_Nonnull[0m)pathPrefix
+[2m[2m.. [0m[0mmyblock; [92;1m[2m.. [0m[0m
+[2m.. [0m [2m28 [0m block:(PopHttpRequestHandler)myblock
+[2m.. [0m [92;1m29 [0m [92madded[0m[92m:[0m[92;1m([0m[92;1mBOOL[0m [92m*[0m[92m_Nullable[0m[92;1m)[0m[92madded[0m;
+[2m23 [0m[1m@end[0m [2m30 [0m[1m@end[0m
+[2m24 [0m [2m31 [0m
+[2m25 [0mNS_ASSUME_NONNULL_END [2m32 [0mNS_ASSUME_NONNULL_END
diff --git a/tests/snapshots/cli__samples_side_by_side@ocaml_1.ml.snap b/tests/snapshots/cli__samples_side_by_side@ocaml_1.ml.snap
new file mode 100644
index 0000000000..1c30b439db
--- /dev/null
+++ b/tests/snapshots/cli__samples_side_by_side@ocaml_1.ml.snap
@@ -0,0 +1,26 @@
+---
+source: tests/cli.rs
+expression: stdout
+input_file: sample_files/ocaml_1.ml
+---
+[1m[93msample_files/ocaml_2.ml[39m[0m[2m --- OCaml[0m
+[2m 3 [0m [2m 3 [0m
+[2m 4 [0m[1mtype[0m [1mfoo[0m = [2m 4 [0m[1mtype[0m [1mfoo[0m =
+[2m 5 [0m | [1mBar[0m [2m 5 [0m | [1mBar[0m
+[91;1m 6 [0m [91m|[0m [91;1mBaz[0m [91;1mof[0m [91;1mint[0m [91;1m*[0m [91;1m([0m[91m'ex[0m[91m,[0m [91m'en[0m[91;1m)[0m [91;1mlist[0m [2m . [0m
+[2m 7 [0m | [1mBiz[0m [1mof[0m ('ex, 'en) [1mlist[0m [2m 6 [0m | [1mBiz[0m [1mof[0m ('ex, 'en) [1mlist[0m
+[2m 8 [0m [2m 7 [0m
+[2m 9 [0m[1mlet[0m do_stuff x = [2m 8 [0m[1mlet[0m do_stuff x =
+[2m10 [0m [1mmatch[0m x [1mwith[0m [2m 9 [0m [1mmatch[0m x [1mwith[0m
+[2m11 [0m | [1m`Foo[0m -> 1 [2m10 [0m | [1m`Foo[0m -> 1
+[91;1m12 [0m [91m|[0m [91;1m`Bar[0m [91m->[0m [91m2[0m [2m.. [0m
+[2m13 [0m | _ -> 3 [2m11 [0m | _ -> 3
+[2m14 [0m [2m12 [0m
+[2m15 [0m[1mlet[0m stuffs y = [2m13 [0m[1mlet[0m stuffs y =
+[2m16 [0m y [1m+[0m 1 [2m14 [0m y [1m+[0m 1
+[2m17 [0m [2m15 [0m
+[2m18 [0m[1mtype[0m [1mthing[0m = [2m16 [0m[1mtype[0m [1mthing[0m =
+[2m19 [0m | [1mX[0m [92;1m17 [0m | [1mX[0m [92m[@[0m[92mvisitor.opaque[0m[92m][0m
+[2m20 [0m | [1mY[0m [2m18 [0m | [1mY[0m
+[2m [0m [92;1m19 [0m[92m[@@[0m[92mvisitor.opaque[0m[92m][0m
+[2m [0m [92;1m20 [0m
diff --git a/tests/snapshots/cli__samples_side_by_side@outer_delimiter_1.el.snap b/tests/snapshots/cli__samples_side_by_side@outer_delimiter_1.el.snap
new file mode 100644
index 0000000000..4ebb832a6b
--- /dev/null
+++ b/tests/snapshots/cli__samples_side_by_side@outer_delimiter_1.el.snap
@@ -0,0 +1,9 @@
+---
+source: tests/cli.rs
+expression: stdout
+input_file: sample_files/outer_delimiter_1.el
+---
+[1m[93msample_files/outer_delimiter_2.el[39m[0m[2m --- Emacs Lisp[0m
+[2m [0m[92;1m1 [0m[92;1m([0m[92mfoo[0m
+[2m1 [0m[2m2 [0m (read)
+[2m. [0m[92;1m3 [0m [92;1m)[0m
diff --git a/tests/snapshots/cli__samples_side_by_side@pascal_1.pascal.snap b/tests/snapshots/cli__samples_side_by_side@pascal_1.pascal.snap
new file mode 100644
index 0000000000..7ca3306ff3
--- /dev/null
+++ b/tests/snapshots/cli__samples_side_by_side@pascal_1.pascal.snap
@@ -0,0 +1,18 @@
+---
+source: tests/cli.rs
+expression: stdout
+input_file: sample_files/pascal_1.pascal
+---
+[1m[93msample_files/pascal_2.pascal[39m[0m[2m --- Pascal[0m
+[2m13 [0m [1mif[0m N [1m<[0m K [1mthen[0m [2m13 [0m [1mif[0m N [1m<[0m K [1mthen[0m
+[2m14 [0m Result[1m:=[0m 0 [94;3m// Error[0m [2m14 [0m Result[1m:=[0m 0 [94;3m// Error[0m
+[2m15 [0m [1melse[0m [1mbegin[0m [2m15 [0m [1melse[0m [1mbegin[0m
+[91;1m16 [0m [91;1mif[0m [91mK[0m [91;1m>[0m [91mN[0m [91;1m-[0m [91mK[0m [91;1mthen[0m [2m.. [0m
+[91;1m17 [0m [91mK[0m[91;1m:=[0m [91mN[0m [91;1m-[0m [91mK[0m[91m;[0m [91;3m// Optimization[0m [2m.. [0m
+[2m18 [0m Result[1m:=[0m 1; [2m16 [0m Result[1m:=[0m 1;
+[2m19 [0m L[1m:=[0m 0; [2m17 [0m L[1m:=[0m 0;
+[2m20 [0m [1mwhile[0m L [1m<[0m K [1mdo[0m [1mbegin[0m [2m18 [0m [1mwhile[0m L [1m<[0m K [1mdo[0m [1mbegin[0m
+[91;1m21 [0m Result[1m:=[0m Result [1m*[0m (N [1m-[0m [91mL[0m); [92;1m19 [0m Result[1m:=[0m Result [1m*[0m (N [1m-[0m [92m1[0m);
+[2m22 [0m Inc(L); [2m20 [0m Inc(L);
+[2m23 [0m Result[1m:=[0m Result [1mdiv[0m L; [2m21 [0m Result[1m:=[0m Result [1mdiv[0m L;
+[2m24 [0m [1mend[0m; [2m22 [0m [1mend[0m;
diff --git a/tests/snapshots/cli__samples_side_by_side@perl_1.pl.snap b/tests/snapshots/cli__samples_side_by_side@perl_1.pl.snap
new file mode 100644
index 0000000000..fe39ffdd09
--- /dev/null
+++ b/tests/snapshots/cli__samples_side_by_side@perl_1.pl.snap
@@ -0,0 +1,38 @@
+---
+source: tests/cli.rs
+expression: stdout
+input_file: sample_files/perl_1.pl
+---
+[1m[93msample_files/perl_2.pl[39m[0m[2m --- Perl[0m
+[2m 9 [0mprint [95m"Pi equals "[0m, PI, [95m"...\n"[0m; [2m 9 [0mprint [95m"Pi equals "[0m, PI, [95m"...\n"[0m;
+[2m10 [0m [2m10 [0m
+[2m11 [0m[1muse[0m constant { [2m11 [0m[1muse[0m constant {
+[91;1m12 [0m [95mSEC[0m [1m=>[0m 0, [91;3m# foo bar[0m [92;1m12 [0m [95mSEC[0m [1m=>[0m 0, [92;3m# foo[0m
+[2m13 [0m [95mMIN[0m [1m=>[0m 1, [2m13 [0m [95mMIN[0m [1m=>[0m 1,
+[2m14 [0m [95mHOUR[0m [1m=>[0m 2, [2m14 [0m [95mHOUR[0m [1m=>[0m 2,
+[2m15 [0m [95mMDAY[0m [1m=>[0m 3, [2m15 [0m [95mMDAY[0m [1m=>[0m 3,
+[2m16 [0m [95mMON[0m [1m=>[0m 4, [2m16 [0m [95mMON[0m [1m=>[0m 4,
+[2m17 [0m [95mYEAR[0m [1m=>[0m 5, [2m17 [0m [95mYEAR[0m [1m=>[0m 5,
+[2m18 [0m [95mWDAY[0m [1m=>[0m 6, [2m18 [0m [95mWDAY[0m [1m=>[0m 6,
+[2m19 [0m [95mYDAY[0m [1m=>[0m 7, [2m19 [0m [95mYDAY[0m [1m=>[0m 7,
+[91;1m20 [0m [95mISDST[0m [1m=>[0m [91m8[0m, [92;1m20 [0m [95mISDST[0m [1m=>[0m [92m10[0m,
+[2m21 [0m}; [2m21 [0m};
+[2m.. [0m [92;1m22 [0m
+[2m.. [0m [92;1m23 [0m[92;1mmy[0m [92m$setting[0m [92;1m=[0m [92;1m{[0m
+[2m.. [0m [92;1m24 [0m [92mopen[0m [92;1m=>[0m [92m1[0m[92m,[0m
+[2m.. [0m [92;1m25 [0m [92mclose[0m [92;1m=>[0m [92m2[0m[92m,[0m
+[2m.. [0m [92;1m26 [0m [92mrun[0m [92;1m=>[0m [92m3[0m[92m,[0m
+[2m.. [0m [92;1m27 [0m [92mawesome[0m [92;1m=>[0m [92m'yes'[0m[92m,[0m
+[2m.. [0m [92;1m28 [0m[92;1m}[0m[92m;[0m
+[2m.. [0m [92;1m29 [0m[92;1mmy[0m [92m%final[0m[92m;[0m
+[2m.. [0m [92;1m30 [0m[92;1mforeach[0m [92;1mmy[0m [92m$key[0m [92;1m([0m[92mwoof[0m[92;1m([0m[92;1m)[0m[92;1m)[0m [92;1m{[0m
+[2m.. [0m [92;1m31 [0m [92m$final[0m[92;1m{[0m[92mIRONMAN[0m[92;1m}[0m[92;1m{[0m[92m$key[0m[92;1m}[0m [92;1m=[0m [92m$setting[0m[92m->{[0m[92m$key[0m[92m}[0m[92m;[0m
+[2m.. [0m [92;1m32 [0m
+[2m.. [0m [92;1m33 [0m [92mprint[0m [92mDumper[0m [92m\[0m[92m%final[0m[92m;[0m
+[2m.. [0m [92;1m34 [0m[92;1m}[0m
+[2m22 [0m [2m35 [0m
+[2m23 [0m[1muse[0m constant [1mWEEKDAYS[0m => qw( [2m36 [0m[1muse[0m constant [1mWEEKDAYS[0m => qw(
+[2m24 [0m Sunday Monday Tuesday Wednesday Thursday Friday Saturday [2m37 [0m Sunday Monday Tuesday Wednesday Thursday Friday Saturday
+[2m25 [0m); [2m38 [0m);
+[2m26 [0m [2m39 [0m
+[91;1m27 [0m$f [1m=~[0m [91ms[0m[91m/[0m[91mfoo[0m[91m/[0m[91;1;4mbar[0m[91m/[0m[91mg[0m; [92;1m40 [0m$f [1m=~[0m [92ms[0m[92m/[0m[92mfoo[0m[92m/[0m[92;1;4mabc[0m[92m/[0m[92mg[0m;
diff --git a/tests/snapshots/cli__samples_side_by_side@prefer_outer_1.el.snap b/tests/snapshots/cli__samples_side_by_side@prefer_outer_1.el.snap
new file mode 100644
index 0000000000..1282f0feeb
--- /dev/null
+++ b/tests/snapshots/cli__samples_side_by_side@prefer_outer_1.el.snap
@@ -0,0 +1,13 @@
+---
+source: tests/cli.rs
+expression: stdout
+input_file: sample_files/prefer_outer_1.el
+---
+[1m[93msample_files/prefer_outer_2.el[39m[0m[2m --- Emacs Lisp[0m
+[2m1 [0m[2m1 [0m([1mdefun[0m deadgrep--find-file (path)
+[91;1m2 [0m[2m. [0m [91;1m([0m[91msave-match-data[0m
+[2m3 [0m[2m2 [0m ([1mlet*[0m ((initial-buffers (buffer-list))
+[91;1m4 [0m[2m3 [0m (buf [91;1m([0m[91msave-match-data[0m (find-file-noselect path)[91;1m)[0m))
+[2m5 [0m[2m4 [0m (unless (-contains-p initial-buffers buf)
+[2m6 [0m[2m5 [0m ([1msetq[0m opened [1mt[0m))
+[91;1m7 [0m[2m6 [0m (cons buf opened))[91;1m)[0m)
diff --git a/tests/snapshots/cli__samples_side_by_side@preprocesor_1.h.snap b/tests/snapshots/cli__samples_side_by_side@preprocesor_1.h.snap
new file mode 100644
index 0000000000..3dcda50758
--- /dev/null
+++ b/tests/snapshots/cli__samples_side_by_side@preprocesor_1.h.snap
@@ -0,0 +1,10 @@
+---
+source: tests/cli.rs
+expression: stdout
+input_file: sample_files/preprocesor_1.h
+---
+[1m[93msample_files/preprocesor_2.h[39m[0m[2m --- C++[0m
+[2m1 [0m[2m1 [0m[1m#include[0m [95m"foo.h"[0m
+[2m. [0m[92;1m2 [0m[92;1m#include[0m [92m"novel.h"[0m
+[2m2 [0m[2m3 [0m
+[2m3 [0m[2m4 [0m[1mstruct[0m [1mBar[0m {};
diff --git a/tests/snapshots/cli__samples_side_by_side@qml_1.qml.snap b/tests/snapshots/cli__samples_side_by_side@qml_1.qml.snap
new file mode 100644
index 0000000000..58d2c2059f
--- /dev/null
+++ b/tests/snapshots/cli__samples_side_by_side@qml_1.qml.snap
@@ -0,0 +1,34 @@
+---
+source: tests/cli.rs
+expression: stdout
+input_file: sample_files/qml_1.qml
+---
+[1m[93msample_files/qml_2.qml[39m[0m[2m --- 1/2 --- QML[0m
+[2m1 [0m[94;3m// Taken from https://doc.qt.io/qt-6/qmlapplications.html[0m
+[92;1m2 [0m[1mimport[0m [1mQtQuick[0m [92m2[0m[92m.[0m[92m15[0m
+[92;1m3 [0m[1mimport[0m [1mQtQuick[0m.[1mControls[0m [92m2[0m[92m.[0m[92m15[0m
+[2m4 [0m
+[2m5 [0m[1mApplicationWindow[0m {
+[2m6 [0m width: 400
+
+[1msample_files/qml_2.qml[0m[2m --- 2/2 --- QML[0m
+[2m 9 [0m [2m 9 [0m
+[2m10 [0m [1mButton[0m { [2m10 [0m [1mButton[0m {
+[2m11 [0m id: button [2m11 [0m id: button
+[2m.. [0m [92;1m12 [0m [92mhoverEnabled[0m[92m:[0m [92;1mtrue[0m
+[2m12 [0m text: [95m"A Special Button"[0m [2m13 [0m text: [95m"A Special Button"[0m
+[2m13 [0m background: [1mRectangle[0m { [2m14 [0m background: [1mRectangle[0m {
+[2m14 [0m implicitWidth: 100 [2m15 [0m implicitWidth: 100
+[2m15 [0m implicitHeight: 40 [2m16 [0m implicitHeight: 40
+[91;1m16 [0m color: button.down [91m?[0m [95m"#d6d6d6"[0m [91m:[0m [95m"#f6f6f6"[0m [92;1m17 [0m color: [92;1m{[0m
+[2m.. [0m [92;1m18 [0m [92;1mif[0m [92;1m([0mbutton.down [92;1m||[0m [92mbutton[0m[92m.[0m[92mhovered[0m[92;1m)[0m [92;1m{[0m
+[2m.. [0m [2m19 [0m [95m"#d6d6d6"[0m
+[2m.. [0m [92;1m20 [0m [92;1m}[0m [92;1melse[0m [92;1m{[0m
+[2m.. [0m [2m21 [0m [95m"#f6f6f6"[0m
+[2m.. [0m [92;1m22 [0m [92;1m}[0m
+[2m.. [0m [92;1m23 [0m [92;1m}[0m
+[2m17 [0m border.color: [95m"#26282a"[0m [2m24 [0m border.color: [95m"#26282a"[0m
+[2m18 [0m border.width: 1 [92;1m25 [0m border.width: [92mbutton[0m[92m.[0m[92mdown[0m [92m?[0m [92m2[0m [92m:[0m 1
+[2m19 [0m radius: 4 [2m26 [0m radius: 4
+[2m20 [0m } [2m27 [0m }
+[2m21 [0m } [2m28 [0m }
diff --git a/tests/snapshots/cli__samples_side_by_side@racket_1.rkt.snap b/tests/snapshots/cli__samples_side_by_side@racket_1.rkt.snap
new file mode 100644
index 0000000000..9027129e6e
--- /dev/null
+++ b/tests/snapshots/cli__samples_side_by_side@racket_1.rkt.snap
@@ -0,0 +1,23 @@
+---
+source: tests/cli.rs
+expression: stdout
+input_file: sample_files/racket_1.rkt
+---
+[1m[93msample_files/racket_2.rkt[39m[0m[2m --- Racket[0m
+[91;1m 1 [0m#lang [91mracket/base[0m [92;1m 1 [0m#lang [92mracket[0m
+[2m 2 [0m [2m 2 [0m
+[2m 3 [0m([1mdefine[0m (append lst1 lst2) [2m 3 [0m([1mdefine[0m (append lst1 lst2)
+[91;1m 4 [0m ([91;1mcond[0m [91;1m[[0m(null? lst1) lst2[91;1m][0m [92;1m 4 [0m ([92;1mif[0m (null? lst1)
+[2m . [0m [2m 5 [0m lst2
+[91;1m 5 [0m [91;1m[[0m[91;1melse[0m (cons (car lst1) [2m 6 [0m (cons (car lst1)
+[91;1m 6 [0m (append (cdr lst1) lst2))[91;1m][0m)) [2m 7 [0m (append (cdr lst1) lst2))))
+[2m 7 [0m [2m 8 [0m
+[2m 8 [0m(append '(a b c) '(d e)) [92;1m 9 [0m(append '(a b c) '(d e [92mf[0m))
+[2m 9 [0m [2m10 [0m
+[91;1m10 [0m[91m"[0m[91mHello[0m[91m,[0m[91m [0m[91mworld[0m[91m![0m[91m"[0m [92;1m11 [0m[92m"[0m[92mHello[0m[92m,[0m[92m [0m[92mworld[0m[92m![0m[92;1;4m\[0m[92;1;4mn[0m[92m"[0m
+[2m11 [0m#(1 2 3) [92;1m12 [0m#([92m0[0m 1 2 3 [92m4[0m)
+[91;1m12 [0m[91;1m#\"[0m [92;1m13 [0m[92;1m#\space[0m
+[2m13 [0m [2m14 [0m
+[91;1m14 [0m[91m#[0m[91m<[0m[91m<[0m[91;1;4mEND[0m [92;1m15 [0m[92m#[0m[92m<[0m[92m<[0m[92;1;4mE[0m
+[91;1m15 [0m[91mabc[0m [92;1m16 [0m[92mabc[0m
+[91;1m16 [0m[91;1;4mEND[0m [92;1m17 [0m[92;1;4mE[0m
diff --git a/tests/snapshots/cli__samples_side_by_side@ruby_1.rb.snap b/tests/snapshots/cli__samples_side_by_side@ruby_1.rb.snap
new file mode 100644
index 0000000000..3b2b30a82c
--- /dev/null
+++ b/tests/snapshots/cli__samples_side_by_side@ruby_1.rb.snap
@@ -0,0 +1,12 @@
+---
+source: tests/cli.rs
+expression: stdout
+input_file: sample_files/ruby_1.rb
+---
+[1m[93msample_files/ruby_2.rb[39m[0m[2m --- 1/2 --- Ruby[0m
+[91;1m1 [0m[92;1m1 [0m[91;3m# Hello world[0m
+[91;1m2 [0m[2m. [0m[91mgem[0m [91m"jekyll"[0m[91m,[0m [91m"~> #{Jekyll::VERSION}"[0m
+
+[1msample_files/ruby_2.rb[0m[2m --- 2/2 --- Ruby[0m
+[91;1m1 [0m[92;1m1 [0m[92;1mVALID_FILENAME_CHARS[0m [92;1m=[0m [92m'foo'[0m
+[91;1m2 [0m[2m. [0m
diff --git a/tests/snapshots/cli__samples_side_by_side@scala_1.scala.snap b/tests/snapshots/cli__samples_side_by_side@scala_1.scala.snap
new file mode 100644
index 0000000000..e1c85238cb
--- /dev/null
+++ b/tests/snapshots/cli__samples_side_by_side@scala_1.scala.snap
@@ -0,0 +1,28 @@
+---
+source: tests/cli.rs
+expression: stdout
+input_file: sample_files/scala_1.scala
+---
+[1m[93msample_files/scala_2.scala[39m[0m[2m --- Scala[0m
+[2m 1 [0m[1mpackage[0m foo [2m 1 [0m[1mpackage[0m foo
+[2m 2 [0m [2m 2 [0m
+[2m 3 [0m[94;3m// A Scala program.[0m [2m 3 [0m[94;3m// A Scala program.[0m
+[91;1m 4 [0m[1mimport[0m foo.[91;1mBar[0m [92;1m 4 [0m[1mimport[0m foo.[92;1mBaz[0m
+[2m 5 [0m [2m 5 [0m
+[2m 6 [0m[1mclass[0m [1mFoo[0m { [2m 6 [0m[1mclass[0m [1mFoo[0m {
+[2m 7 [0m [2m 7 [0m
+[91;1m 8 [0m [1mdef[0m blah(): [91;1mInt[0m { [92;1m 8 [0m [92;1mprivate[0m [1mdef[0m blah(): [92;1mOther[0m {
+[2m 9 [0m [94;3m/* foo */[0m [2m 9 [0m [94;3m/* foo */[0m
+[91;1m10 [0m [1mthrow[0m [1mnew[0m [1mException[0m([91m"before"[0m); [92;1m10 [0m [1mthrow[0m [1mnew[0m [1mException[0m([92m"after"[0m);
+[2m11 [0m } [2m11 [0m }
+[2m12 [0m [2m12 [0m
+[2m13 [0m [1mvar[0m result = [1mOption[0m.empty[[1mT[0m] [2m13 [0m [1mvar[0m result = [1mOption[0m.empty[[1mT[0m]
+[2m.. [0m [92;1m14 [0m [92;1mval[0m [92mfn[0m [92m=[0m [92mpf[0m[92m.[0m[92mlift[0m
+[2m14 [0m [1mobject[0m [1mtraverser[0m [1mextends[0m [1mSimpleTraverser[0m { [2m15 [0m [1mobject[0m [1mtraverser[0m [1mextends[0m [1mSimpleTraverser[0m {
+[2m15 [0m [1moverride[0m [1mdef[0m apply(t: [1mTree[0m): [1mUnit[0m = { [2m16 [0m [1moverride[0m [1mdef[0m apply(t: [1mTree[0m): [1mUnit[0m = {
+[91;1m16 [0m [91;1mif[0m [91;1m([0m[91mresult[0m[91m.[0m[91misEmpty[0m [91;1m&&[0m [91mpf[0m[91m.[0m[91misDefinedAt[0m[91;1m([0m[91mt[0m[91;1m)[0m[91;1m)[0m [91;1m{[0m [2m.. [0m
+[91;1m17 [0m result = [91;1mSome[0m[91;1m([0m[91mpf[0m(t)[91;1m)[0m [92;1m17 [0m result = [92mfn[0m(t)[92m.[0m[92morElse[0m[92;1m([0m[92mresult[0m[92;1m)[0m
+[91;1m18 [0m [91;1m}[0m [91;1melse[0m [1mif[0m (result.[91misEmpty[0m) { [92;1m18 [0m [1mif[0m (result.[92mnonEmpty[0m) {
+[2m19 [0m super.apply(t) [2m19 [0m super.apply(t)
+[2m20 [0m } [2m20 [0m }
+[2m21 [0m } [2m21 [0m }
diff --git a/tests/snapshots/cli__samples_side_by_side@scheme_1.scm.snap b/tests/snapshots/cli__samples_side_by_side@scheme_1.scm.snap
new file mode 100644
index 0000000000..59e2eb9ee3
--- /dev/null
+++ b/tests/snapshots/cli__samples_side_by_side@scheme_1.scm.snap
@@ -0,0 +1,10 @@
+---
+source: tests/cli.rs
+expression: stdout
+input_file: sample_files/scheme_1.scm
+---
+[1m[93msample_files/scheme_2.scm[39m[0m[2m --- Scheme[0m
+[91;1m1 [0m[91m|# A block comment before a very simple function. #|[0m [92;1m1 [0m[92m|# A block comment before a simple function, but changed. #|[0m
+[91;1m2 [0m([1mdefine[0m ([91madd[0m x y) [91;3m;[0m[91;3m [0m[91;3mThis[0m[91;3m [0m[91;3mfunction[0m[91;3m [0m[91;3mreturns[0m[91;3m [0m[91;3mthe[0m[91;3m [0m[91;1;3;4msum[0m[91;3m [0m[91;3mof[0m[91;3m [0m[91;3mit[0m [92;1m2 [0m([1mdefine[0m ([92msub[0m x y) [92;3m;[0m[92;3m [0m[92;3mThis[0m[92;3m [0m[92;3mfunction[0m[92;3m [0m[92;3mreturns[0m[92;3m [0m[92;3mthe[0m[92;3m [0m[92;1;3;4mdifferenc[0m
+[91;1m[2m. [0m[0m[91;3ms[0m[91;3m [0m[91;3marguments[0m [92;1m[2m. [0m[0m[92;1;3;4me[0m[92;3m [0m[92;3mof[0m[92;3m [0m[92;3mits[0m[92;3m [0m[92;3marguments[0m
+[91;1m3 [0m ([91;1m+[0m x y)) [92;1m3 [0m ([92;1m-[0m x y))
diff --git a/tests/snapshots/cli__samples_side_by_side@simple_1.js.snap b/tests/snapshots/cli__samples_side_by_side@simple_1.js.snap
new file mode 100644
index 0000000000..5c5f8050dc
--- /dev/null
+++ b/tests/snapshots/cli__samples_side_by_side@simple_1.js.snap
@@ -0,0 +1,8 @@
+---
+source: tests/cli.rs
+expression: stdout
+input_file: sample_files/simple_1.js
+---
+[1m[93msample_files/simple_2.js[39m[0m[2m --- JavaScript[0m
+[91;1m1 [0m[91;1mconst[0m [1mReact[0m [91;1m=[0m [91mrequire[0m[91;1m([0m[95m'react'[0m[91;1m)[0m; [92;1m1 [0m[92;1mimport[0m [1mReact[0m[92m,[0m [92;1m{[0m[92museState[0m[92;1m}[0m [92;1mfrom[0m [95m'react'[0m;
+[2m2 [0mconsole.log([95m'hello world'[0m); [2m2 [0mconsole.log([95m'hello world'[0m);
diff --git a/tests/snapshots/cli__samples_side_by_side@simple_1.scss.snap b/tests/snapshots/cli__samples_side_by_side@simple_1.scss.snap
new file mode 100644
index 0000000000..874bcbe3d1
--- /dev/null
+++ b/tests/snapshots/cli__samples_side_by_side@simple_1.scss.snap
@@ -0,0 +1,33 @@
+---
+source: tests/cli.rs
+expression: stdout
+input_file: sample_files/simple_1.scss
+---
+[1m[93msample_files/simple_2.scss[39m[0m[2m --- 1/2 --- SCSS[0m
+[91;1m 1 [0m@mixin buttons($basicBorder:1px, $gradient1:[91m#fff[0m, $gradient2:[95m#d8dee7[0m){ [92;1m 1 [0m@mixin buttons($basicBorder:1px, $gradient1:[92m#333[0m, $gradient2:[95m#d8dee7[0m){
+[2m 2 [0m [1mbutton[0m{ [2m 2 [0m [1mbutton[0m{
+[91;1m 3 [0m border:$basicBorder [91msolid[0m [95m#acbed3[0m; [92;1m 3 [0m border:$basicBorder [92mdotted[0m [95m#acbed3[0m;
+[2m 4 [0m [94;3m//brings in Compass' background-image mixin: http://compass-style.org/r[0m [2m 4 [0m [94;3m//brings in Compass' background-image mixin: http://compass-style.org/r[0m
+[2m[2m . [0m[0m[94;3meference/compass/css3/images/[0m [2m[2m . [0m[0m[94;3meference/compass/css3/images/[0m
+[2m 5 [0m @include background-image(linear-gradient($gradient1, $gradient2)); [2m 5 [0m @include background-image(linear-gradient($gradient1, $gradient2));
+[2m 6 [0m padding:3px 14px; [2m 6 [0m padding:3px 14px;
+[91;1m 7 [0m font-size:[91m12px[0m; [92;1m 7 [0m font-size:[92m1rem[0m;
+[2m 8 [0m color:[95m#3b557d[0m; [2m 8 [0m color:[95m#3b557d[0m;
+[2m 9 [0m [94;3m//brings in Compass' border-radius mixin: http://compass-style.org/refer[0m [2m 9 [0m [94;3m//brings in Compass' border-radius mixin: http://compass-style.org/refer[0m
+[2m[2m . [0m[0m[94;3mence/compass/css3/border_radius/[0m [2m[2m . [0m[0m[94;3mence/compass/css3/border_radius/[0m
+[2m10 [0m @include border-radius($border-radius, $border-radius); [2m10 [0m @include border-radius($border-radius, $border-radius);
+
+[1msample_files/simple_2.scss[0m[2m --- 2/2 --- SCSS[0m
+[2m13 [0m [94;3m//& attribute adds [0m [2m13 [0m [94;3m//& attribute adds [0m
+[2m14 [0m [2m14 [0m
+[2m15 [0m [1m&[0m.primary { [2m15 [0m [1m&[0m.primary {
+[91;1m16 [0m border:2px [91msolid[0m [95m#3b557d[0m; [92;1m16 [0m border:2px [92mdotted[0m [95m#3b557d[0m;
+[2m17 [0m padding:5px 15px; [2m17 [0m padding:5px 15px;
+[2m18 [0m [94;3m//requires a $border-radius variable[0m [2m18 [0m [94;3m//requires a $border-radius variable[0m
+[2m19 [0m @include border-radius($border-radius [1m+[0m 2, $border-radius [1m+[0m 2); [2m19 [0m @include border-radius($border-radius [1m+[0m 2, $border-radius [1m+[0m 2);
+[2m20 [0m } [2m20 [0m }
+[2m21 [0m [1m&[0m.disabled { [2m21 [0m [1m&[0m.disabled {
+[91;1m22 [0m opacity: [91m.8[0m; [92;1m22 [0m opacity: [92m.6[0m;
+[2m23 [0m } [2m23 [0m }
+[2m24 [0m [1m&[0m:hover { [2m24 [0m [1m&[0m:hover {
+[2m25 [0m @include background-image(linear-gradient($gradient2, $gradient1)); [2m25 [0m @include background-image(linear-gradient($gradient2, $gradient1));
diff --git a/tests/snapshots/cli__samples_side_by_side@simple_1.txt.snap b/tests/snapshots/cli__samples_side_by_side@simple_1.txt.snap
new file mode 100644
index 0000000000..fc915b4112
--- /dev/null
+++ b/tests/snapshots/cli__samples_side_by_side@simple_1.txt.snap
@@ -0,0 +1,8 @@
+---
+source: tests/cli.rs
+expression: stdout
+input_file: sample_files/simple_1.txt
+---
+[1m[93msample_files/simple_2.txt[39m[0m[2m --- Text[0m
+[91;1m1 [0m[91;1mfoo[0m [92;1m1 [0m[92;1mbar[0m
+[2m. [0m [92;1m2 [0m[92;1mbaz[0m
diff --git a/tests/snapshots/cli__samples_side_by_side@slider_at_end_1.json.snap b/tests/snapshots/cli__samples_side_by_side@slider_at_end_1.json.snap
new file mode 100644
index 0000000000..e8642cfb3c
--- /dev/null
+++ b/tests/snapshots/cli__samples_side_by_side@slider_at_end_1.json.snap
@@ -0,0 +1,13 @@
+---
+source: tests/cli.rs
+expression: stdout
+input_file: sample_files/slider_at_end_1.json
+---
+[1m[93msample_files/slider_at_end_2.json[39m[0m[2m --- JSON[0m
+[2m1 [0m[2m1 [0m[
+[2m2 [0m[2m2 [0m [95m"one"[0m,
+[91;1m3 [0m[2m. [0m [91m"novel-1"[0m[91m,[0m
+[2m4 [0m[2m3 [0m [95m"two"[0m,
+[91;1m5 [0m[2m. [0m [91m"novel-2"[0m[91m,[0m
+[2m6 [0m[2m4 [0m [95m"three"[0m
+[2m7 [0m[2m5 [0m]
diff --git a/tests/snapshots/cli__samples_side_by_side@small_1.js.snap b/tests/snapshots/cli__samples_side_by_side@small_1.js.snap
new file mode 100644
index 0000000000..1c1b07f942
--- /dev/null
+++ b/tests/snapshots/cli__samples_side_by_side@small_1.js.snap
@@ -0,0 +1,13 @@
+---
+source: tests/cli.rs
+expression: stdout
+input_file: sample_files/small_1.js
+---
+[1m[93msample_files/small_2.js[39m[0m[2m --- JavaScript[0m
+[2m 7 [0m}); [2m 7 [0m});
+[2m 8 [0m [2m 8 [0m
+[2m 9 [0mdescribe([95m"Authentication"[0m, () [1m=>[0m { [2m 9 [0mdescribe([95m"Authentication"[0m, () [1m=>[0m {
+[91;1m10 [0m test([91m"Editing pages"[0m, done [1m=>[0m { [92;1m10 [0m test([92m"/edit GET"[0m, done [1m=>[0m {
+[2m11 [0m request(app) [2m11 [0m request(app)
+[2m12 [0m .get([95m"/edit/Foo"[0m) [2m12 [0m .get([95m"/edit/Foo"[0m)
+[2m13 [0m .then(res [1m=>[0m { [2m13 [0m .then(res [1m=>[0m {
diff --git a/tests/snapshots/cli__samples_side_by_side@string_subwords_1.el.snap b/tests/snapshots/cli__samples_side_by_side@string_subwords_1.el.snap
new file mode 100644
index 0000000000..fb6bfd1e47
--- /dev/null
+++ b/tests/snapshots/cli__samples_side_by_side@string_subwords_1.el.snap
@@ -0,0 +1,20 @@
+---
+source: tests/cli.rs
+expression: stdout
+input_file: sample_files/string_subwords_1.el
+---
+[1m[93msample_files/string_subwords_2.el[39m[0m[2m --- Emacs Lisp[0m
+[91;1m 1 [0m(format [91m"[0m[91;1;4mSoloWiki[0m [91;1;4mViewing[0m[91m:[0m[91m [0m[91m%[0m[91ms[0m[91m"[0m name) [92;1m 1 [0m(format [92m"[0m[92;1;4m%[0m[92;1;4ms[0m[92m:[0m[92m [0m[92m%[0m[92ms[0m[92m"[0m [92;1m([0m[92msite-name[0m[92;1m)[0m name)
+[2m 2 [0m [2m 2 [0m
+[2m 3 [0m(defcustom deadgrep-max-buffers [2m 3 [0m(defcustom deadgrep-max-buffers
+[2m 4 [0m 4 [2m 4 [0m 4
+[91;1m 5 [0m [91m"Deadgrep will kill the least recently used results buffer[0m [92;1m 5 [0m [92m"The maximum number of deadgrep results buffers.[0m
+[91;1m 6 [0m[91mif there are more than this many.[0m [92;1m 6 [0m
+[91;1m 7 [0m [92;1m 7 [0m[92mIf the number of results buffers exceeds this value, deadgrep[0m
+[91;1m 8 [0m[91mTo disable cleanup entirely, set this variable to nil."[0m [92;1m 8 [0m[92mwill kill results buffers. The least recently used buffers are[0m
+[2m . [0m [92;1m 9 [0m[92mkilled first.[0m
+[2m . [0m [92;1m10 [0m
+[2m . [0m [92;1m11 [0m[92mTo disable cleanup entirely, set this variable to nil."[0m
+[2m 9 [0m :type [1m'[0m(choice [2m12 [0m :type [1m'[0m(choice
+[2m10 [0m (number :tag [95m"Maximum of buffers allowed"[0m) [2m13 [0m (number :tag [95m"Maximum of buffers allowed"[0m)
+[2m11 [0m (const :tag [95m"Disable cleanup"[0m [1mnil[0m)) [2m14 [0m (const :tag [95m"Disable cleanup"[0m [1mnil[0m))
diff --git a/tests/snapshots/cli__samples_side_by_side@swift_1.swift.snap b/tests/snapshots/cli__samples_side_by_side@swift_1.swift.snap
new file mode 100644
index 0000000000..f4231d6c0d
--- /dev/null
+++ b/tests/snapshots/cli__samples_side_by_side@swift_1.swift.snap
@@ -0,0 +1,9 @@
+---
+source: tests/cli.rs
+expression: stdout
+input_file: sample_files/swift_1.swift
+---
+[1m[93msample_files/swift_2.swift[39m[0m[2m --- Swift[0m
+[2m1 [0m[1mfunc[0m f(_ x: [1mInt[0m) [1m->[0m [1mInt[0m { [2m1 [0m[1mfunc[0m f(_ x: [1mInt[0m) [1m->[0m [1mInt[0m {
+[91;1m2 [0m x [1m*[0m [91m2[0m [92;1m2 [0m x [1m*[0m [92m3[0m
+[2m3 [0m} [2m3 [0m}
diff --git a/tests/snapshots/cli__samples_side_by_side@syntax_error_1.js.snap b/tests/snapshots/cli__samples_side_by_side@syntax_error_1.js.snap
new file mode 100644
index 0000000000..650dfde438
--- /dev/null
+++ b/tests/snapshots/cli__samples_side_by_side@syntax_error_1.js.snap
@@ -0,0 +1,9 @@
+---
+source: tests/cli.rs
+expression: stdout
+input_file: sample_files/syntax_error_1.js
+---
+[1m[93msample_files/syntax_error_2.js[39m[0m[2m --- Text (2 JavaScript parse errors, exceeded DFT_PARSE_ERROR_LIMIT)[0m
+[91;1m1 [0m[91mif[0m[91m [0m[91m([0m[91;1mtrue[0m[91m)[0m[91m [0m[91m{[0m [92;1m1 [0m[92mif[0m[92m [0m[92m([0m[92;1mfalse[0m[92m)[0m[92m [0m[92m{[0m
+[91;1m2 [0m[91m [0m[91m [0m[91mfoo[0m[91m([0m[91;1m1[0m[91m)[0m[91m;[0m [92;1m2 [0m[92m [0m[92m [0m[92mfoo[0m[92m([0m[92;1m2[0m[92m)[0m[92m;[0m
+[2m3 [0m}} [2m3 [0m}}
diff --git a/tests/snapshots/cli__samples_side_by_side@tab_1.c.snap b/tests/snapshots/cli__samples_side_by_side@tab_1.c.snap
new file mode 100644
index 0000000000..d1cc8807f4
--- /dev/null
+++ b/tests/snapshots/cli__samples_side_by_side@tab_1.c.snap
@@ -0,0 +1,12 @@
+---
+source: tests/cli.rs
+expression: stdout
+input_file: sample_files/tab_1.c
+---
+[1m[93msample_files/tab_2.c[39m[0m[2m --- C[0m
+[2m1 [0m[1m#include[0m [95m[0m [2m1 [0m[1m#include[0m [95m[0m
+[2m2 [0m [2m2 [0m
+[2m3 [0m[1mint[0m main() { [2m3 [0m[1mint[0m main() {
+[91;1m4 [0m printf([91m"[0m[91;1;4mHello[0m[91m [0m[91mWorld[0m[91m"[0m); [92;1m4 [0m printf([92m"[0m[92;1;4mGoodbye[0m[92m [0m[92mWorld[0m[92m"[0m);
+[2m5 [0m [1mreturn[0m 0; [2m5 [0m [1mreturn[0m 0;
+[2m6 [0m} [2m6 [0m}
diff --git a/tests/snapshots/cli__samples_side_by_side@tab_1.txt.snap b/tests/snapshots/cli__samples_side_by_side@tab_1.txt.snap
new file mode 100644
index 0000000000..169892c70f
--- /dev/null
+++ b/tests/snapshots/cli__samples_side_by_side@tab_1.txt.snap
@@ -0,0 +1,15 @@
+---
+source: tests/cli.rs
+expression: stdout
+input_file: sample_files/tab_1.txt
+---
+[1m[93msample_files/tab_2.txt[39m[0m[2m --- Text[0m
+[91;1m1 [0m[2m [0m[91;1mexport[0m[91;1m [0m[91;1mconst[0m[91;1m [0m[91;1mORIGIN[0m[91;1m [0m[91;1m=[0m[91;1m [0m[91;1mnew[0m[91;1m [0m[91;1mURL[0m[91;1m([0m
+[91;1m2 [0m[2m [0m[91;1m [0m[91;1menv[0m[91;1m.[0m[91;1mVERCEL_ENV[0m[91;1m [0m[91;1m=[0m[91;1m=[0m[91;1m=[0m[91;1m [0m[91;1m"[0m[91;1mproduction[0m[91;1m"[0m
+[91;1m3 [0m[2m [0m[91;1m [0m[91;1m [0m[91;1m?[0m[91;1m [0m[91;1m"[0m[91;1mhttps[0m[91;1m:[0m[91;1m/[0m[91;1m/[0m[91;1malpha[0m[91;1m.[0m[91;1msweets[0m[91;1m.[0m[91;1mcommunity[0m[91;1m"[0m
+[91;1m4 [0m[2m [0m[91;1m [0m[91;1m [0m[91;1m:[0m[91;1m [0m[91;1menv[0m[91;1m.[0m[91;1mVERCEL_ENV[0m[91;1m [0m[91;1m=[0m[91;1m=[0m[91;1m=[0m[91;1m [0m[91;1m"[0m[91;1mpreview[0m[91;1m"[0m
+[91;1m5 [0m[2m [0m[91;1m [0m[91;1m [0m[91;1m [0m[91;1m?[0m[91;1m [0m[91;1m`[0m[91;1mhttps[0m[91;1m:[0m[91;1m/[0m[91;1m/[0m[91;1m$[0m[91;1m{[0m[91;1menv[0m[91;1m.[0m[91;1mVERCEL_URL[0m[91;1m}[0m[91;1m`[0m
+[91;1m6 [0m[2m [0m[91;1m [0m[91;1m [0m[91;1m [0m[91;1m:[0m[91;1m [0m[91;1m"[0m[91;1mhttp[0m[91;1m:[0m[91;1m/[0m[91;1m/[0m[91;1mlocalhost[0m[91;1m:[0m[91;1m3000[0m[91;1m"[0m
+[91;1m7 [0m[2m [0m[91;1m)[0m[91;1m;[0m
+[91;1m8 [0m[2m [0m
+[2m9 [0m[2m1 [0mexport default env;
diff --git a/tests/snapshots/cli__samples_side_by_side@tailwind_1.css.snap b/tests/snapshots/cli__samples_side_by_side@tailwind_1.css.snap
new file mode 100644
index 0000000000..899abcd310
--- /dev/null
+++ b/tests/snapshots/cli__samples_side_by_side@tailwind_1.css.snap
@@ -0,0 +1,11 @@
+---
+source: tests/cli.rs
+expression: stdout
+input_file: sample_files/tailwind_1.css
+---
+[1m[93msample_files/tailwind_2.css[39m[0m[2m --- CSS[0m
+[2m2 [0m [94;3m/* This isn't valid vanilla CSS, and tree-sitter-css produces an ERROR[0m [2m2 [0m [94;3m/* This isn't valid vanilla CSS, and tree-sitter-css produces an ERROR[0m
+[2m3 [0m[94;3m node with children. Ensure the whole ERROR is treated as an[0m [2m3 [0m[94;3m node with children. Ensure the whole ERROR is treated as an[0m
+[2m4 [0m[94;3m atom. */[0m [2m4 [0m[94;3m atom. */[0m
+[91;1m5 [0m [1m@apply[0m rounded-md [91mbg-gray-600[0m; [92;1m5 [0m [1m@apply[0m rounded-md [92mbg-hss-dark-gray[0m;
+[2m6 [0m} [2m6 [0m}
diff --git a/tests/snapshots/cli__samples_side_by_side@text_1.txt.snap b/tests/snapshots/cli__samples_side_by_side@text_1.txt.snap
new file mode 100644
index 0000000000..dc994d6db8
--- /dev/null
+++ b/tests/snapshots/cli__samples_side_by_side@text_1.txt.snap
@@ -0,0 +1,12 @@
+---
+source: tests/cli.rs
+expression: stdout
+input_file: sample_files/text_1.txt
+---
+[1m[93msample_files/text_2.txt[39m[0m[2m --- Text[0m
+[2m1 [0mhello [2m1 [0mhello
+[2m. [0m [92;1m2 [0m[92;1mnovel[0m
+[2m2 [0mworld [2m3 [0mworld
+[2m3 [0m [2m4 [0m
+[91;1m4 [0m[91mfoo[0m [92;1m5 [0m[92mfoo[0m[92;1m [0m[92;1mbar[0m
+[91;1m5 [0m[91;1mc07e640b246c7885cbc3d5c627acbcb2d2ab9c95[0m [92;1m6 [0m[92;1m31df1778815171897c907daf454c4419cfaa46f9[0m
diff --git a/tests/snapshots/cli__samples_side_by_side@todomvc_1.gleam.snap b/tests/snapshots/cli__samples_side_by_side@todomvc_1.gleam.snap
new file mode 100644
index 0000000000..805633546e
--- /dev/null
+++ b/tests/snapshots/cli__samples_side_by_side@todomvc_1.gleam.snap
@@ -0,0 +1,31 @@
+---
+source: tests/cli.rs
+expression: stdout
+input_file: sample_files/todomvc_1.gleam
+---
+[1m[93msample_files/todomvc_2.gleam[39m[0m[2m --- 1/3 --- Gleam[0m
+[2m16 [0m [1mlet[0m db = start_database_connection_pool() [2m16 [0m [1mlet[0m db = start_database_connection_pool()
+[2m17 [0m [1mlet[0m web = routes.stack(application_secret, db) [2m17 [0m [1mlet[0m web = routes.stack(application_secret, db)
+[2m18 [0m [2m18 [0m
+[2m.. [0m [92;1m19 [0m [92;1mlet[0m [92mlog_string[0m [92m=[0m
+[2m19 [0m string.concat([[95m"Listening on localhost:"[0m, int.to_string(port), [95m" ✨"[0m]) [2m20 [0m string.concat([[95m"Listening on localhost:"[0m, int.to_string(port), [95m" ✨"[0m])
+[91;1m20 [0m [91;1m|>[0m log.info [92;1m21 [0m log.info[92;1m([0m[92mlog_string[0m[92;1m)[0m
+[2m21 [0m [2m22 [0m
+[2m22 [0m [1massert[0m [1mOk[0m([94;3m_[0m) = elli.become(web, on_port: port) [2m23 [0m [1massert[0m [1mOk[0m([94;3m_[0m) = elli.become(web, on_port: port)
+[2m23 [0m} [2m24 [0m}
+
+[1msample_files/todomvc_2.gleam[0m[2m --- 2/3 --- Gleam[0m
+[2m29 [0m [1m|>[0m result.lazy_unwrap([1mfn[0m() { [2m30 [0m [1m|>[0m result.lazy_unwrap([1mfn[0m() {
+[2m30 [0m pgo.[1mConfig[0m( [2m31 [0m pgo.[1mConfig[0m(
+[2m31 [0m ..pgo.default_config(), [2m32 [0m ..pgo.default_config(),
+[91;1m32 [0m host: [91m"localhost"[0m, [92;1m33 [0m host: [92m"0.0.0.0"[0m,
+[2m33 [0m database: [95m"gleam_todomvc_dev"[0m, [2m34 [0m database: [95m"gleam_todomvc_dev"[0m,
+[2m34 [0m user: [95m"postgres"[0m, [2m35 [0m user: [95m"postgres"[0m,
+[2m35 [0m password: option.[1mSome[0m([95m"postgres"[0m), [2m36 [0m password: option.[1mSome[0m([95m"postgres"[0m),
+
+[1msample_files/todomvc_2.gleam[0m[2m --- 3/3 --- Gleam[0m
+[2m47 [0m[1mfn[0m load_port() -> [1mInt[0m { [2m48 [0m[1mfn[0m load_port() -> [1mInt[0m {
+[2m48 [0m os.get_env([95m"PORT"[0m) [2m49 [0m os.get_env([95m"PORT"[0m)
+[2m49 [0m [1m|>[0m result.then(int.parse) [2m50 [0m [1m|>[0m result.then(int.parse)
+[91;1m50 [0m [1m|>[0m result.unwrap([91m3000[0m) [92;1m51 [0m [1m|>[0m result.unwrap([92m8080[0m)
+[2m51 [0m} [2m52 [0m}
diff --git a/tests/snapshots/cli__samples_side_by_side@toml_1.toml.snap b/tests/snapshots/cli__samples_side_by_side@toml_1.toml.snap
new file mode 100644
index 0000000000..c70428b717
--- /dev/null
+++ b/tests/snapshots/cli__samples_side_by_side@toml_1.toml.snap
@@ -0,0 +1,32 @@
+---
+source: tests/cli.rs
+expression: stdout
+input_file: sample_files/toml_1.toml
+---
+[1m[93msample_files/toml_2.toml[39m[0m[2m --- 1/2 --- TOML[0m
+[2m 1 [0m[94;3m# This is a TOML document[0m [2m 1 [0m[94;3m# This is a TOML document[0m
+[2m 2 [0m [2m 2 [0m
+[91;1m 3 [0mtitle [1m=[0m [91m"[0m[91mTOML[0m[91m [0m[91mExample[0m[91m"[0m [92;1m 3 [0mtitle [1m=[0m [92m"[0m[92mTOML[0m[92m [0m[92mExample[0m [92;1;4mChanged[0m[92m"[0m
+[2m 4 [0m [2m 4 [0m
+[2m 5 [0m[owner] [2m 5 [0m[owner]
+[2m 6 [0mname [1m=[0m [95m"Tom Preston-Werner"[0m [2m 6 [0mname [1m=[0m [95m"Tom Preston-Werner"[0m
+[91;1m 7 [0mdob [1m=[0m [91;1;4m1979[0m[91m-[0m[91;1;4m05[0m[91m-[0m[91;1;4m27[0m[91mT[0m[91m07[0m[91m:[0m[91m32[0m[91m:[0m[91m00[0m[91m-[0m[91m08[0m[91m:[0m[91m00[0m [92;1m 7 [0mdob [1m=[0m [92;1;4m2000[0m[92m-[0m[92;1;4m01[0m[92m-[0m[92;1;4m31[0m[92mT[0m[92m07[0m[92m:[0m[92m32[0m[92m:[0m[92m00[0m[92m-[0m[92m08[0m[92m:[0m[92m00[0m
+[2m 8 [0m [2m 8 [0m
+[2m 9 [0m[database] [2m 9 [0m[database]
+[2m10 [0menabled [1m=[0m [1mtrue[0m [2m10 [0menabled [1m=[0m [1mtrue[0m
+[91;1m11 [0mports [1m=[0m [ 8000, [91m8001[0m[91m,[0m 8002 ] [2m11 [0mports [1m=[0m [ 8000, 8002 ]
+[2m12 [0mdata [1m=[0m [ [[95m"delta"[0m, [95m"phi"[0m], [3.14] ] [2m12 [0mdata [1m=[0m [ [[95m"delta"[0m, [95m"phi"[0m], [3.14] ]
+[2m13 [0mtemp_targets [1m=[0m { cpu [1m=[0m 79.5, case [1m=[0m 72.0 } [2m13 [0mtemp_targets [1m=[0m { cpu [1m=[0m 79.5, case [1m=[0m 72.0 }
+[2m14 [0m [2m14 [0m
+
+[1msample_files/toml_2.toml[0m[2m --- 2/2 --- TOML[0m
+[2m26 [0m[2m26 [0m[95mRoses are red[0m
+[2m27 [0m[2m27 [0m[95mViolets are blue"""[0m
+[91;1m28 [0m[2m [0m
+[91;1m29 [0m[2m [0m[91mstr2[0m [91;1m=[0m [91m"""\[0m
+[91;1m30 [0m[2m [0m[91m The quick brown \[0m
+[91;1m31 [0m[2m [0m[91m fox jumps over \[0m
+[91;1m32 [0m[2m [0m[91m the lazy dog.\[0m
+[91;1m33 [0m[2m [0m[91m """[0m
+[91;1m34 [0m[2m [0m
+[91;1m35 [0m[2m [0m[91mpath[0m [91;1m=[0m [91m'C:\Users\nodejs\templates'[0m
diff --git a/tests/snapshots/cli__samples_side_by_side@trailling_newline_1.yaml.snap b/tests/snapshots/cli__samples_side_by_side@trailling_newline_1.yaml.snap
new file mode 100644
index 0000000000..e5ae826e0f
--- /dev/null
+++ b/tests/snapshots/cli__samples_side_by_side@trailling_newline_1.yaml.snap
@@ -0,0 +1,8 @@
+---
+source: tests/cli.rs
+expression: stdout
+input_file: sample_files/trailling_newline_1.yaml
+---
+[1m[93msample_files/trailling_newline_2.yaml[39m[0m[2m --- YAML[0m
+[91;1m1 [0m[95mfoo[0m: [91m|[0m [92;1m1 [0m[95mfoo[0m: [92m|[0m
+[91;1m2 [0m[91m ${{ BAR }}[0m [92;1m2 [0m[92m bar[0m
diff --git a/tests/snapshots/cli__samples_side_by_side@typescript_1.ts.snap b/tests/snapshots/cli__samples_side_by_side@typescript_1.ts.snap
new file mode 100644
index 0000000000..f63b57ea51
--- /dev/null
+++ b/tests/snapshots/cli__samples_side_by_side@typescript_1.ts.snap
@@ -0,0 +1,11 @@
+---
+source: tests/cli.rs
+expression: stdout
+input_file: sample_files/typescript_1.ts
+---
+[1m[93msample_files/typescript_2.ts[39m[0m[2m --- TypeScript[0m
+[2m1 [0m[2m1 [0m[1mtype[0m [1mSymbol[0m [1m=[0m {
+[2m2 [0m[2m2 [0m kind: [95m"symbol"[0m;
+[2m. [0m[92;1m3 [0m [92mname[0m[92m:[0m [92;1mstring[0m[92m;[0m
+[2m3 [0m[2m4 [0m items: [1mstring[0m[];
+[2m4 [0m[2m5 [0m};
diff --git a/tests/snapshots/cli__samples_side_by_side@utf16_1.py.snap b/tests/snapshots/cli__samples_side_by_side@utf16_1.py.snap
new file mode 100644
index 0000000000..5204ef053e
--- /dev/null
+++ b/tests/snapshots/cli__samples_side_by_side@utf16_1.py.snap
@@ -0,0 +1,11 @@
+---
+source: tests/cli.rs
+expression: stdout
+input_file: sample_files/utf16_1.py
+---
+[1m[93msample_files/utf16_2.py[39m[0m[2m --- Python[0m
+[2m1 [0m[94;3m# coding=utf_16[0m [2m1 [0m[94;3m# coding=utf_16[0m
+[2m2 [0m[94;3m# This file contains a Byte Order Mark denoting little-endianness.[0m [2m2 [0m[94;3m# This file contains a Byte Order Mark denoting little-endianness.[0m
+[2m3 [0m [2m3 [0m
+[91;1m4 [0mprint([91m"[0m[91;1;4mhello[0m [91;1;4m☃[0m[91m [0m[91msnowman[0m[91m"[0m) [92;1m4 [0mprint([92m"[0m[92;1;4mno[0m[92m [0m[92msnowman[0m[92m"[0m)
+[2m [0m [92;1m5 [0m[92mprint[0m[92;1m([0m[92m"こんにちは世界"[0m[92;1m)[0m
diff --git a/tests/snapshots/cli__samples_side_by_side@vhdl_1.vhd.snap b/tests/snapshots/cli__samples_side_by_side@vhdl_1.vhd.snap
new file mode 100644
index 0000000000..7596d189a5
--- /dev/null
+++ b/tests/snapshots/cli__samples_side_by_side@vhdl_1.vhd.snap
@@ -0,0 +1,37 @@
+---
+source: tests/cli.rs
+expression: stdout
+input_file: sample_files/vhdl_1.vhd
+---
+[1m[93msample_files/vhdl_2.vhd[39m[0m[2m --- VHDL[0m
+[2m 5 [0mentity blinky is [2m 5 [0mentity blinky is
+[2m 6 [0m port ( [2m 6 [0m port (
+[2m 7 [0m clk: in std_logic; [2m 7 [0m clk: in std_logic;
+[91;1m 8 [0m led: out [91mstd_logic[0m [92;1m 8 [0m led: out [92mstd_logic_vector[0m[92;1m([0m[92m3[0m [92mdownto[0m [92m0[0m[92;1m)[0m
+[2m 9 [0m ); [2m 9 [0m );
+[2m10 [0mend entity; [2m10 [0mend entity;
+[2m11 [0m [2m11 [0m
+[2m12 [0marchitecture a of blinky is [2m12 [0marchitecture a of blinky is
+[91;1m13 [0m constant CLK_FREQ: positive := [91m12_000_000[0m; [92;1m13 [0m constant CLK_FREQ: positive := [92m48_000_000[0m;
+[91;1m14 [0m signal [91mcounter[0m: unsigned([91m23[0m downto 0) := (others => '0'); [92;1m14 [0m signal [92mcounter1[0m: unsigned([92m25[0m downto 0) := (others => '0');
+[2m.. [0m [92;1m15 [0m [92msignal[0m [92mcounter2[0m[92m:[0m [92munsigned[0m[92;1m([0m[92m1[0m [92mdownto[0m [92m0[0m[92;1m)[0m [92m:=[0m [92;1m([0m[92mothers[0m [92m=>[0m [92m'0'[0m[92;1m)[0m[92m;[0m
+[2m15 [0mbegin [2m16 [0mbegin
+[2m16 [0m process(clk) [2m17 [0m process(clk)
+[2m17 [0m begin [2m18 [0m begin
+[2m18 [0m if rising_edge(clk) then [2m19 [0m if rising_edge(clk) then
+[91;1m19 [0m if to_integer([91mcounter[0m) = CLK_FREQ / 2 then [92;1m20 [0m if to_integer([92mcounter1[0m) = CLK_FREQ / 2 then
+[91;1m20 [0m [91mled[0m <= [91mnot[0m [91mled[0m; [92;1m21 [0m [92mcounter2[0m <= [92mcounter2[0m [92m+[0m [92m1[0m;
+[91;1m21 [0m [91mcounter[0m <= (others => '0'); [92;1m22 [0m [92mcounter1[0m <= (others => '0');
+[2m22 [0m else [2m23 [0m else
+[91;1m23 [0m [91mcounter[0m <= [91mcounter[0m + 1; [92;1m24 [0m [92mcounter1[0m <= [92mcounter1[0m + 1;
+[2m24 [0m end if; [2m25 [0m end if;
+[2m25 [0m end if; [2m26 [0m end if;
+[2m26 [0m end process; [2m27 [0m end process;
+[2m.. [0m [92;1m28 [0m
+[2m.. [0m [92;1m29 [0m [92mprocess[0m[92;1m([0m[92mcounter2[0m[92;1m)[0m
+[2m.. [0m [92;1m30 [0m [92mbegin[0m
+[2m.. [0m [92;1m31 [0m [92mfor[0m [92mn[0m [92min[0m [92m0[0m [92mto[0m [92m3[0m [92mloop[0m
+[2m.. [0m [92;1m32 [0m [92mled[0m[92;1m([0m[92mn[0m[92;1m)[0m [92m<=[0m [92m'1'[0m [92mwhen[0m [92mto_integer[0m[92;1m([0m[92mcounter2[0m[92;1m)[0m [92m=[0m [92mn[0m [92melse[0m [92m'0'[0m[92m;[0m
+[2m.. [0m [92;1m33 [0m [92mend[0m [92mloop[0m[92m;[0m
+[2m.. [0m [92;1m34 [0m [92mend[0m [92mprocess[0m[92m;[0m
+[2m27 [0mend architecture; [2m35 [0mend architecture;
diff --git a/tests/snapshots/cli__samples_side_by_side@whitespace_1.tsx.snap b/tests/snapshots/cli__samples_side_by_side@whitespace_1.tsx.snap
new file mode 100644
index 0000000000..09a88eb25c
--- /dev/null
+++ b/tests/snapshots/cli__samples_side_by_side@whitespace_1.tsx.snap
@@ -0,0 +1,13 @@
+---
+source: tests/cli.rs
+expression: stdout
+input_file: sample_files/whitespace_1.tsx
+---
+[1m[93msample_files/whitespace_2.tsx[39m[0m[2m --- TypeScript TSX[0m
+[2m20 [0m[2m20 [0m [1m<[0m[1mFontAwesomeIcon[0m
+[2m [0m[2m21 [0m icon[1m=[0m{faPlus}
+[2m [0m[2m22 [0m />
+[2m [0m[92;1m23 [0m [92;1m{[0m[92m" "[0m[92;1m}[0m
+[2m [0m[2m24 [0m Adicionar arquivos
+[2m [0m[2m25 [0m {[95m" "[0m}
+[2m [0m[92;1m26 [0m
diff --git a/tests/snapshots/cli__samples_side_by_side@xml_1.xml.snap b/tests/snapshots/cli__samples_side_by_side@xml_1.xml.snap
new file mode 100644
index 0000000000..780e8a94c9
--- /dev/null
+++ b/tests/snapshots/cli__samples_side_by_side@xml_1.xml.snap
@@ -0,0 +1,10 @@
+---
+source: tests/cli.rs
+expression: stdout
+input_file: sample_files/xml_1.xml
+---
+[1m[93msample_files/xml_2.xml[39m[0m[2m --- XML[0m
+[2m1 [0m<[1mroot[0m> [2m1 [0m<[1mroot[0m>
+[91;1m2 [0m<[1mb[0m>[91mfoo[0m[91m [0m[91mbar[0m[91m [0m[91mbaz[0m[1mb[0m> [92;1m2 [0m<[1mb[0m>[92mfoo[0m[92m [0m[92mbar[0m[92m [0m[92mbaz[0m [92;1;4mx[0m[1mb[0m>
+[2m. [0m [92;1m3 [0m[92m<[0m[92;1mstuff[0m[92m/>[0m
+[2m3 [0m[1mroot[0m> [2m4 [0m[1mroot[0m>
diff --git a/tests/snapshots/cli__samples_side_by_side@yaml_1.yaml.snap b/tests/snapshots/cli__samples_side_by_side@yaml_1.yaml.snap
new file mode 100644
index 0000000000..f72315aacd
--- /dev/null
+++ b/tests/snapshots/cli__samples_side_by_side@yaml_1.yaml.snap
@@ -0,0 +1,16 @@
+---
+source: tests/cli.rs
+expression: stdout
+input_file: sample_files/yaml_1.yaml
+---
+[1m[93msample_files/yaml_2.yaml[39m[0m[2m --- YAML[0m
+[2m1 [0m--- [2m1 [0m---
+[2m2 [0m[95mfoo[0m: [[95mfoobar[0m] [92;1m2 [0m[95mfoo[0m: [[92mbar[0m[92m,[0m [95mfoobar[0m]
+[2m3 [0m[95mhello[0m: [2m3 [0m[95mhello[0m:
+[2m4 [0m - [95m"world"[0m [2m4 [0m - [95m"world"[0m
+[2m. [0m [92;1m5 [0m [92m-[0m [92m'item'[0m
+[2m5 [0m - [95mother[0m [2m6 [0m - [95mother[0m
+[91;1m6 [0m [2m [0m
+[91;1m7 [0m[91mstuff[0m[91m:[0m [91m|[0m [2m [0m
+[91;1m8 [0m[91m a[0m [2m [0m
+[91;1m9 [0m[91m b[0m [2m [0m
diff --git a/tests/snapshots/cli__samples_side_by_side@zig_1.zig.snap b/tests/snapshots/cli__samples_side_by_side@zig_1.zig.snap
new file mode 100644
index 0000000000..5e76e975bf
--- /dev/null
+++ b/tests/snapshots/cli__samples_side_by_side@zig_1.zig.snap
@@ -0,0 +1,13 @@
+---
+source: tests/cli.rs
+expression: stdout
+input_file: sample_files/zig_1.zig
+---
+[1m[93msample_files/zig_2.zig[39m[0m[2m --- Zig[0m
+[2m. [0m [92;1m1 [0m[92;1mconst[0m [92mstd[0m [92m=[0m [92;1m@import[0m[92;1m([0m[92m"std"[0m[92;1m)[0m[92m;[0m
+[2m. [0m [92;1m2 [0m
+[2m1 [0m[1mpub[0m [1mfn[0m main() [1mvoid[0m { [2m3 [0m[1mpub[0m [1mfn[0m main() [1mvoid[0m {
+[91;1m2 [0m std.debug.print([95m"Hello, {s}!"[0m, .{[91m"world"[0m}); [92;1m4 [0m std.debug.print([95m"Hello, {s}!"[0m, .{[92m"user"[0m});
+[2m. [0m [92;1m5 [0m [92mstd[0m[92m.[0m[92mdebug[0m[92m.[0m[92mprint[0m[92;1m([0m[92m"Hello, again!"[0m[92m,[0m [92m.[0m[92;1m{[0m[92;1m}[0m[92;1m)[0m[92m;[0m
+[2m3 [0m} [2m6 [0m}
+[91;1m4 [0m [2m [0m