From 759f3623d308cfce64107acc05d9fe743dd73662 Mon Sep 17 00:00:00 2001 From: Vincent de Phily Date: Fri, 27 Oct 2023 17:45:41 +0100 Subject: [PATCH] test: Fix table color tests when running from the CI Turns out is-terminal detects a tty when running tests manually but not when running the in the CI. --- src/table.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/table.rs b/src/table.rs index 789b8d0..fa4facb 100644 --- a/src/table.rs +++ b/src/table.rs @@ -238,7 +238,7 @@ mod test { #[test] fn color() { - let st = Styles::from_str("emlop log --color=y"); + let st = Styles::from_str("emlop log --color=y --output=c"); let mut t = Table::<2>::new(&st).align_left(0); t.row([&[&"123"], &[&1]]); t.row([&[&st.merge, &1, &st.dur, &2, &st.cnt, &3, &st.clr], &[&1]]); @@ -252,7 +252,7 @@ mod test { #[test] fn nocolor() { - let st = Styles::from_str("emlop log --color=n"); + let st = Styles::from_str("emlop log --color=n --output=c"); let mut t = Table::<2>::new(&st).align_left(0); t.row([&[&"123"], &[&1]]); t.row([&[&st.merge, &1, &st.dur, &2, &st.cnt, &3, &st.clr], &[&1]]);