Skip to content

Commit

Permalink
test: Fix table color tests when running from the CI
Browse files Browse the repository at this point in the history
Turns out is-terminal detects a tty when running tests manually but not when running the in the CI.
  • Loading branch information
vincentdephily committed Oct 27, 2023
1 parent 2a3b8f3 commit 759f362
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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]]);
Expand All @@ -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]]);
Expand Down

0 comments on commit 759f362

Please sign in to comment.