mirror of
https://github.com/uutils/coreutils.git
synced 2026-06-10 15:48:22 -07:00
tests/fold: add tests for non-utf8 streams
This commit is contained in:
@@ -554,3 +554,30 @@ fn test_obsolete_syntax() {
|
||||
.succeeds()
|
||||
.stdout_is("test1\n \ntest2\n \ntest3\n \ntest4\n \ntest5\n \ntest6\n ");
|
||||
}
|
||||
#[test]
|
||||
fn test_byte_break_at_non_utf8_character() {
|
||||
new_ucmd!()
|
||||
.arg("-b")
|
||||
.arg("-s")
|
||||
.arg("-w")
|
||||
.arg("40")
|
||||
.arg("non_utf8.input")
|
||||
.succeeds()
|
||||
.stdout_is_fixture_bytes("non_utf8.expected");
|
||||
}
|
||||
#[test]
|
||||
fn test_tab_advances_at_non_utf8_character() {
|
||||
new_ucmd!()
|
||||
.arg("-w8")
|
||||
.arg("non_utf8_tab_stops.input")
|
||||
.succeeds()
|
||||
.stdout_is_fixture_bytes("non_utf8_tab_stops_w8.expected");
|
||||
}
|
||||
#[test]
|
||||
fn test_all_tab_advances_at_non_utf8_character() {
|
||||
new_ucmd!()
|
||||
.arg("-w16")
|
||||
.arg("non_utf8_tab_stops.input")
|
||||
.succeeds()
|
||||
.stdout_is_fixture_bytes("non_utf8_tab_stops_w16.expected");
|
||||
}
|
||||
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
Alle Menschen sind frei und gleich an
|
||||
Würde und Rechten geboren
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
Alle Menschen sind frei und gleich an Würde und Rechten geboren
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
タ
|
||||
タチ
|
||||
タチツ
|
||||
タチツテ
|
||||
タチツテト
|
||||
タチツテトナ
|
||||
タチツテトナニ
|
||||
タチツテトナニヌ
|
||||
タチツテトナニヌネ
|
||||
タチツテトナニヌ ネ
|
||||
タチツテトナニヌ ネ ノ
|
||||
@@ -0,0 +1,13 @@
|
||||
タ
|
||||
タチ
|
||||
タチツ
|
||||
タチツテ
|
||||
タチツテト
|
||||
タチツテトナ
|
||||
タチツテトナニ
|
||||
タチツテトナニヌ
|
||||
タチツテトナニヌネ
|
||||
タチツテトナニヌ
|
||||
ネ
|
||||
タチツテトナニヌ
|
||||
ネ ノ
|
||||
@@ -0,0 +1,17 @@
|
||||
А
|
||||
АБ
|
||||
АБВ
|
||||
АБВГ
|
||||
АБВГД
|
||||
АБВГДЕ
|
||||
АБВГДЕЖ
|
||||
АБВГДЕЖЗ
|
||||
АБВГДЕЖЗ
|
||||
И
|
||||
АБВГДЕЖЗ
|
||||
|
||||
И
|
||||
АБВГДЕЖЗ
|
||||
|
||||
И
|
||||
Й
|
||||
Reference in New Issue
Block a user