We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b75d0f9 commit 908e155Copy full SHA for 908e155
tests/by-util/test_cp.rs
@@ -6031,3 +6031,18 @@ fn test_cp_preserve_xattr_readonly_source() {
6031
"Extended attributes were not preserved"
6032
);
6033
}
6034
+
6035
+#[test]
6036
+fn test_cp_from_stdin() {
6037
+ let (at, mut ucmd) = at_and_ucmd!();
6038
+ let target = "target";
6039
+ let test_string = "Hello, World!\n";
6040
6041
+ ucmd.arg("/dev/fd/0")
6042
+ .arg(target)
6043
+ .pipe_in(test_string)
6044
+ .succeeds();
6045
6046
+ assert!(at.file_exists(target));
6047
+ assert_eq!(at.read(target), test_string);
6048
+}
0 commit comments