Skip to content

Commit

Permalink
test: Fix expected result
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentdephily committed Jan 11, 2025
1 parent bda5e3a commit 045f34e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ mod test {
t.row([&[&"123"], &[&1]]);
t.row([&[&conf.merge, &1, &conf.dur, &2, &conf.cnt, &3, &conf.clr], &[&1]]);
let res = "123 1\x1B[m\n\
\x1B[1;32m1\x1B[1;35m2\x1B[33m3\x1B[m 1\x1B[m\n";
\x1B[1;32m1\x1B[1;35m2\x1B[0;33m3\x1B[m 1\x1B[m\n";
let (l1, l2) = res.split_once('\n').expect("two lines");
assert_eq!(Ansi::strip(l1, 100), "123 1");
assert_eq!(Ansi::strip(l1, 100), Ansi::strip(l2, 100));
Expand Down
14 changes: 7 additions & 7 deletions tests/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -229,21 +229,21 @@ fn predict_emerge_p() {
"[ebuild R ~] dev-lang/unknown-1.42\n\
[binary R ~] dev-lang/bunknown-2.42\n\
[uninstall ] dev-libs/eventlog-0.2.1\n",
format!("dev-lang/unknown-1.42 10? \n\
dev-lang/bunknown-2.42 20? \n\
Estimate for 2 ebuilds, 2 unknown 30 @ {}\n",
ts(30)),
format!("dev-lang/unknown-1.42 30? \n\
dev-lang/bunknown-2.42 10? \n\
Estimate for 2 ebuilds, 2 unknown 40 @ {}\n",
ts(40)),
0),
// Check that unknown ebuild don't wreck alignment. Remember that times are {:>9}
("%F10000.log p --date unix -oc",
"[ebuild R ~] dev-qt/qtcore-5.9.4-r2\n\
[ebuild R ~] dev-lang/unknown-1.42\n\
[ebuild R ~] dev-qt/qtgui-5.9.4-r3\n",
format!("dev-qt/qtcore-5.9.4-r2 3:45 \n\
dev-lang/unknown-1.42 10? \n\
dev-lang/unknown-1.42 30? \n\
dev-qt/qtgui-5.9.4-r3 4:24 \n\
Estimate for 3 ebuilds, 1 unknown 8:19 @ {}\n",
ts(8 * 60 + 9 + 10)),
Estimate for 3 ebuilds, 1 unknown 8:39 @ {}\n",
ts(8 * 60 + 9 + 30)),
0),
// Check skip rows
("%F10000.log p --date unix -oc --show m --first 2",
Expand Down

0 comments on commit 045f34e

Please sign in to comment.