Skip to content

Commit

Permalink
tests: adjust reverse property tests to skip testing when there is a …
Browse files Browse the repository at this point in the history
…BOM character
  • Loading branch information
jqnatividad committed Nov 17, 2024
1 parent d14bd04 commit d12abbc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/test_reverse.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use crate::{qcheck, workdir::Workdir, Csv, CsvData};

fn prop_reverse(name: &str, rows: CsvData, headers: bool) -> bool {
if !rows.is_empty() && rows[0].contains(&"\u{FEFF}".to_string()) {
if rows.is_empty() || rows[0].contains(&"\u{FEFF}".to_string()) {
return true;
}

Expand All @@ -22,7 +22,7 @@ fn prop_reverse(name: &str, rows: CsvData, headers: bool) -> bool {
vec![]
};
expected.reverse();
if !expected.is_empty() && expected[0].contains(&"\u{FEFF}".to_string()) {
if expected.is_empty() || expected[0].contains(&"\u{FEFF}".to_string()) {
return true;
}
if !headers.is_empty() {
Expand Down

0 comments on commit d12abbc

Please sign in to comment.