Skip to content

Commit

Permalink
Fixed integration tests for --chop-long-lines
Browse files Browse the repository at this point in the history
  • Loading branch information
johnmatthiggins committed Oct 10, 2022
1 parent 03216c9 commit c1b6fe9
Showing 1 changed file with 15 additions and 32 deletions.
47 changes: 15 additions & 32 deletions tests/integration_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1501,17 +1501,12 @@ fn ignored_suffix_arg() {

#[test]
fn no_line_wrapping_when_set_to_never() {
let expected =
"───────┬────────────────────────────────────────────────────────────────────────
│ File: 80-columns.txt
│ Size: 101 B
───────┼────────────────────────────────────────────────────────────────────────
1 │ abcdefghigklmnopqrstuvxyzabcdefghigklmnopqrstuvxyzabcdefghigklmnopqrstuvxyzabcdefghigklmnopqrstuvxyz
───────┴────────────────────────────────────────────────────────────────────────
let expected = "abcdefghigklmnopqrstuvxyzabcdefghigklmnopqrstuvxyzabcdefghigklmnopqrstuvxyzabcdefghigklmnopqrstuvxyz
";

bat()
.arg("--style=full")
.arg("--style=rule")
.arg("--color=never")
.arg("--decorations=always")
.arg("--wrap=never")
.arg("--terminal-width=80")
Expand All @@ -1525,17 +1520,13 @@ fn no_line_wrapping_when_set_to_never() {
#[test]
fn line_wrapping_when_auto() {
let expected =
"───────┬────────────────────────────────────────────────────────────────────────
│ File: 80-columns.txt
│ Size: 101 B
───────┼────────────────────────────────────────────────────────────────────────
1 │ abcdefghigklmnopqrstuvxyzabcdefghigklmnopqrstuvxyzabcdefghigklmnopqrstu
│ vxyzabcdefghigklmnopqrstuvxyz
───────┴────────────────────────────────────────────────────────────────────────
"abcdefghigklmnopqrstuvxyzabcdefghigklmnopqrstuvxyzabcdefghigklmnopqrstuvxyzabcde
fghigklmnopqrstuvxyz
";

bat()
.arg("--style=full")
.arg("--color=never")
.arg("--style=rule")
.arg("--decorations=always")
.arg("--wrap=auto")
.arg("--terminal-width=80")
Expand All @@ -1549,17 +1540,13 @@ fn line_wrapping_when_auto() {
#[test]
fn line_wrapping_with_s_flag() {
let expected =
"───────┬────────────────────────────────────────────────────────────────────────
│ File: 80-columns.txt
│ Size: 101 B
───────┼────────────────────────────────────────────────────────────────────────
1 │ abcdefghigklmnopqrstuvxyzabcdefghigklmnopqrstuvxyzabcdefghigklmnopqrstu
│ vxyzabcdefghigklmnopqrstuvxyz
───────┴────────────────────────────────────────────────────────────────────────
"abcdefghigklmnopqrstuvxyzabcdefghigklmnopqrstuvxyzabcdefghigklmnopqrstuvxyzabcde
fghigklmnopqrstuvxyz
";

bat()
.arg("--style=full")
.arg("--color=never")
.arg("--style=rule")
.arg("--decorations=always")
.arg("-S")
.arg("--terminal-width=80")
Expand All @@ -1573,17 +1560,13 @@ fn line_wrapping_with_s_flag() {
#[test]
fn chop_long_lines_when_specified() {
let expected =
"───────┬────────────────────────────────────────────────────────────────────────
│ File: 80-columns.txt
│ Size: 101 B
───────┼────────────────────────────────────────────────────────────────────────
1 │ abcdefghigklmnopqrstuvxyzabcdefghigklmnopqrstuvxyzabcdefghigklmnopqrstu
│ vxyzabcdefghigklmnopqrstuvxyz
───────┴────────────────────────────────────────────────────────────────────────
"abcdefghigklmnopqrstuvxyzabcdefghigklmnopqrstuvxyzabcdefghigklmnopqrstuvxyzabcde
fghigklmnopqrstuvxyz
";

bat()
.arg("--style=full")
.arg("--color=never")
.arg("--style=rule")
.arg("--decorations=always")
.arg("--chop-long-lines")
.arg("--terminal-width=80")
Expand Down

0 comments on commit c1b6fe9

Please sign in to comment.