2020-05-25 17:05:26 +00:00
|
|
|
use crate::common::util::*;
|
2020-05-15 12:21:23 +00:00
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn test_with_tab() {
|
2021-04-05 20:03:43 +00:00
|
|
|
new_ucmd!()
|
|
|
|
.arg("with-tab.txt")
|
|
|
|
.succeeds()
|
|
|
|
.stdout_contains(" ")
|
|
|
|
.stdout_does_not_contain("\t");
|
2020-05-15 12:21:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn test_with_trailing_tab() {
|
2021-04-05 20:03:43 +00:00
|
|
|
new_ucmd!()
|
|
|
|
.arg("with-trailing-tab.txt")
|
|
|
|
.succeeds()
|
|
|
|
.stdout_contains("with tabs=> ")
|
|
|
|
.stdout_does_not_contain("\t");
|
2020-05-15 12:21:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn test_with_trailing_tab_i() {
|
2021-04-05 20:03:43 +00:00
|
|
|
new_ucmd!()
|
|
|
|
.arg("with-trailing-tab.txt")
|
|
|
|
.arg("-i")
|
|
|
|
.succeeds()
|
|
|
|
.stdout_contains(" // with tabs=>\t");
|
2020-05-15 12:21:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn test_with_tab_size() {
|
2021-04-05 20:03:43 +00:00
|
|
|
new_ucmd!()
|
|
|
|
.arg("with-tab.txt")
|
|
|
|
.arg("--tabs=10")
|
|
|
|
.succeeds()
|
|
|
|
.stdout_contains(" ");
|
2020-05-15 12:21:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn test_with_space() {
|
2021-04-05 20:03:43 +00:00
|
|
|
new_ucmd!()
|
|
|
|
.arg("with-spaces.txt")
|
|
|
|
.succeeds()
|
|
|
|
.stdout_contains(" return");
|
2020-05-15 12:21:23 +00:00
|
|
|
}
|
2021-03-15 13:29:28 +00:00
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn test_with_multiple_files() {
|
2021-04-05 20:03:43 +00:00
|
|
|
new_ucmd!()
|
|
|
|
.arg("with-spaces.txt")
|
|
|
|
.arg("with-tab.txt")
|
|
|
|
.succeeds()
|
|
|
|
.stdout_contains(" return")
|
|
|
|
.stdout_contains(" ");
|
2021-03-15 13:29:28 +00:00
|
|
|
}
|