mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-29 03:57:44 +00:00
install: normalize test filenames
This commit is contained in:
parent
9b0eee9066
commit
220ca78c9b
1 changed files with 40 additions and 40 deletions
|
@ -17,9 +17,9 @@ fn test_install_help() {
|
||||||
#[test]
|
#[test]
|
||||||
fn test_install_basic() {
|
fn test_install_basic() {
|
||||||
let (at, mut ucmd) = at_and_ucmd!();
|
let (at, mut ucmd) = at_and_ucmd!();
|
||||||
let dir = "test_install_target_dir_dir_a";
|
let dir = "target_dir";
|
||||||
let file1 = "test_install_target_dir_file_a1";
|
let file1 = "source_file1";
|
||||||
let file2 = "test_install_target_dir_file_a2";
|
let file2 = "source_file2";
|
||||||
|
|
||||||
at.touch(file1);
|
at.touch(file1);
|
||||||
at.touch(file2);
|
at.touch(file2);
|
||||||
|
@ -34,7 +34,7 @@ fn test_install_basic() {
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_install_twice_dir() {
|
fn test_install_twice_dir() {
|
||||||
let dir = "test_install_target_dir_dir_a";
|
let dir = "dir";
|
||||||
let scene = TestScenario::new(util_name!());
|
let scene = TestScenario::new(util_name!());
|
||||||
|
|
||||||
scene.ucmd().arg("-d").arg(dir).succeeds();
|
scene.ucmd().arg("-d").arg(dir).succeeds();
|
||||||
|
@ -47,9 +47,9 @@ fn test_install_twice_dir() {
|
||||||
#[test]
|
#[test]
|
||||||
fn test_install_failing_not_dir() {
|
fn test_install_failing_not_dir() {
|
||||||
let (at, mut ucmd) = at_and_ucmd!();
|
let (at, mut ucmd) = at_and_ucmd!();
|
||||||
let file1 = "test_install_target_dir_file_a1";
|
let file1 = "file1";
|
||||||
let file2 = "test_install_target_dir_file_a2";
|
let file2 = "file2";
|
||||||
let file3 = "test_install_target_dir_file_a3";
|
let file3 = "file3";
|
||||||
|
|
||||||
at.touch(file1);
|
at.touch(file1);
|
||||||
at.touch(file2);
|
at.touch(file2);
|
||||||
|
@ -66,8 +66,8 @@ fn test_install_failing_not_dir() {
|
||||||
#[test]
|
#[test]
|
||||||
fn test_install_unimplemented_arg() {
|
fn test_install_unimplemented_arg() {
|
||||||
let (at, mut ucmd) = at_and_ucmd!();
|
let (at, mut ucmd) = at_and_ucmd!();
|
||||||
let dir = "test_install_target_dir_dir_b";
|
let dir = "target_dir";
|
||||||
let file = "test_install_target_dir_file_b";
|
let file = "source_file";
|
||||||
let context_arg = "--context";
|
let context_arg = "--context";
|
||||||
|
|
||||||
at.touch(file);
|
at.touch(file);
|
||||||
|
@ -86,9 +86,9 @@ fn test_install_unimplemented_arg() {
|
||||||
#[test]
|
#[test]
|
||||||
fn test_install_component_directories() {
|
fn test_install_component_directories() {
|
||||||
let (at, mut ucmd) = at_and_ucmd!();
|
let (at, mut ucmd) = at_and_ucmd!();
|
||||||
let component1 = "test_install_target_dir_component_c1";
|
let component1 = "component1";
|
||||||
let component2 = "test_install_target_dir_component_c2";
|
let component2 = "component2";
|
||||||
let component3 = "test_install_target_dir_component_c3";
|
let component3 = "component3";
|
||||||
let directories_arg = "-d";
|
let directories_arg = "-d";
|
||||||
|
|
||||||
ucmd.args(&[directories_arg, component1, component2, component3])
|
ucmd.args(&[directories_arg, component1, component2, component3])
|
||||||
|
@ -104,10 +104,10 @@ fn test_install_component_directories() {
|
||||||
fn test_install_mode_numeric() {
|
fn test_install_mode_numeric() {
|
||||||
let scene = TestScenario::new(util_name!());
|
let scene = TestScenario::new(util_name!());
|
||||||
let at = &scene.fixtures;
|
let at = &scene.fixtures;
|
||||||
let dir = "test_install_target_dir_dir_e";
|
let dir = "dir1";
|
||||||
let dir2 = "test_install_target_dir_dir_e2";
|
let dir2 = "dir2";
|
||||||
|
|
||||||
let file = "test_install_target_dir_file_e";
|
let file = "file";
|
||||||
let mode_arg = "--mode=333";
|
let mode_arg = "--mode=333";
|
||||||
|
|
||||||
at.touch(file);
|
at.touch(file);
|
||||||
|
@ -145,8 +145,8 @@ fn test_install_mode_numeric() {
|
||||||
#[test]
|
#[test]
|
||||||
fn test_install_mode_symbolic() {
|
fn test_install_mode_symbolic() {
|
||||||
let (at, mut ucmd) = at_and_ucmd!();
|
let (at, mut ucmd) = at_and_ucmd!();
|
||||||
let dir = "test_install_target_dir_dir_f";
|
let dir = "target_dir";
|
||||||
let file = "test_install_target_dir_file_f";
|
let file = "source_file";
|
||||||
let mode_arg = "--mode=o+wx";
|
let mode_arg = "--mode=o+wx";
|
||||||
|
|
||||||
at.touch(file);
|
at.touch(file);
|
||||||
|
@ -163,8 +163,8 @@ fn test_install_mode_symbolic() {
|
||||||
#[test]
|
#[test]
|
||||||
fn test_install_mode_failing() {
|
fn test_install_mode_failing() {
|
||||||
let (at, mut ucmd) = at_and_ucmd!();
|
let (at, mut ucmd) = at_and_ucmd!();
|
||||||
let dir = "test_install_target_dir_dir_g";
|
let dir = "target_dir";
|
||||||
let file = "test_install_target_dir_file_g";
|
let file = "source_file";
|
||||||
let mode_arg = "--mode=999";
|
let mode_arg = "--mode=999";
|
||||||
|
|
||||||
at.touch(file);
|
at.touch(file);
|
||||||
|
@ -185,7 +185,7 @@ fn test_install_mode_failing() {
|
||||||
#[test]
|
#[test]
|
||||||
fn test_install_mode_directories() {
|
fn test_install_mode_directories() {
|
||||||
let (at, mut ucmd) = at_and_ucmd!();
|
let (at, mut ucmd) = at_and_ucmd!();
|
||||||
let component = "test_install_target_dir_component_h";
|
let component = "component";
|
||||||
let directories_arg = "-d";
|
let directories_arg = "-d";
|
||||||
let mode_arg = "--mode=333";
|
let mode_arg = "--mode=333";
|
||||||
|
|
||||||
|
@ -203,8 +203,8 @@ fn test_install_mode_directories() {
|
||||||
#[test]
|
#[test]
|
||||||
fn test_install_target_file() {
|
fn test_install_target_file() {
|
||||||
let (at, mut ucmd) = at_and_ucmd!();
|
let (at, mut ucmd) = at_and_ucmd!();
|
||||||
let file1 = "test_install_target_file_file_i1";
|
let file1 = "source_file";
|
||||||
let file2 = "test_install_target_file_file_i2";
|
let file2 = "target_file";
|
||||||
|
|
||||||
at.touch(file1);
|
at.touch(file1);
|
||||||
at.touch(file2);
|
at.touch(file2);
|
||||||
|
@ -217,8 +217,8 @@ fn test_install_target_file() {
|
||||||
#[test]
|
#[test]
|
||||||
fn test_install_target_new_file() {
|
fn test_install_target_new_file() {
|
||||||
let (at, mut ucmd) = at_and_ucmd!();
|
let (at, mut ucmd) = at_and_ucmd!();
|
||||||
let file = "test_install_target_new_filer_file_j";
|
let file = "file";
|
||||||
let dir = "test_install_target_new_file_dir_j";
|
let dir = "target_dir";
|
||||||
|
|
||||||
at.touch(file);
|
at.touch(file);
|
||||||
at.mkdir(dir);
|
at.mkdir(dir);
|
||||||
|
@ -234,8 +234,8 @@ fn test_install_target_new_file() {
|
||||||
#[test]
|
#[test]
|
||||||
fn test_install_target_new_file_with_group() {
|
fn test_install_target_new_file_with_group() {
|
||||||
let (at, mut ucmd) = at_and_ucmd!();
|
let (at, mut ucmd) = at_and_ucmd!();
|
||||||
let file = "test_install_target_new_filer_file_j";
|
let file = "file";
|
||||||
let dir = "test_install_target_new_file_dir_j";
|
let dir = "target_dir";
|
||||||
let gid = get_effective_gid();
|
let gid = get_effective_gid();
|
||||||
|
|
||||||
at.touch(file);
|
at.touch(file);
|
||||||
|
@ -264,8 +264,8 @@ fn test_install_target_new_file_with_group() {
|
||||||
#[test]
|
#[test]
|
||||||
fn test_install_target_new_file_with_owner() {
|
fn test_install_target_new_file_with_owner() {
|
||||||
let (at, mut ucmd) = at_and_ucmd!();
|
let (at, mut ucmd) = at_and_ucmd!();
|
||||||
let file = "test_install_target_new_filer_file_j";
|
let file = "file";
|
||||||
let dir = "test_install_target_new_file_dir_j";
|
let dir = "target_dir";
|
||||||
let uid = get_effective_uid();
|
let uid = get_effective_uid();
|
||||||
|
|
||||||
at.touch(file);
|
at.touch(file);
|
||||||
|
@ -294,9 +294,9 @@ fn test_install_target_new_file_with_owner() {
|
||||||
#[test]
|
#[test]
|
||||||
fn test_install_target_new_file_failing_nonexistent_parent() {
|
fn test_install_target_new_file_failing_nonexistent_parent() {
|
||||||
let (at, mut ucmd) = at_and_ucmd!();
|
let (at, mut ucmd) = at_and_ucmd!();
|
||||||
let file1 = "test_install_target_new_file_failing_file_k1";
|
let file1 = "source_file";
|
||||||
let file2 = "test_install_target_new_file_failing_file_k2";
|
let file2 = "target_file";
|
||||||
let dir = "test_install_target_new_file_failing_dir_k";
|
let dir = "target_dir";
|
||||||
|
|
||||||
at.touch(file1);
|
at.touch(file1);
|
||||||
|
|
||||||
|
@ -312,8 +312,8 @@ fn test_install_target_new_file_failing_nonexistent_parent() {
|
||||||
#[test]
|
#[test]
|
||||||
fn test_install_preserve_timestamps() {
|
fn test_install_preserve_timestamps() {
|
||||||
let (at, mut ucmd) = at_and_ucmd!();
|
let (at, mut ucmd) = at_and_ucmd!();
|
||||||
let file1 = "test_install_target_dir_file_a1";
|
let file1 = "source_file";
|
||||||
let file2 = "test_install_target_dir_file_a2";
|
let file2 = "target_file";
|
||||||
at.touch(file1);
|
at.touch(file1);
|
||||||
|
|
||||||
ucmd.arg(file1).arg(file2).arg("-p").succeeds().no_stderr();
|
ucmd.arg(file1).arg(file2).arg("-p").succeeds().no_stderr();
|
||||||
|
@ -338,8 +338,8 @@ fn test_install_preserve_timestamps() {
|
||||||
#[test]
|
#[test]
|
||||||
fn test_install_copy_file() {
|
fn test_install_copy_file() {
|
||||||
let (at, mut ucmd) = at_and_ucmd!();
|
let (at, mut ucmd) = at_and_ucmd!();
|
||||||
let file1 = "test_install_target_dir_file_a1";
|
let file1 = "source_file";
|
||||||
let file2 = "test_install_target_dir_file_a2";
|
let file2 = "target_file";
|
||||||
|
|
||||||
at.touch(file1);
|
at.touch(file1);
|
||||||
ucmd.arg(file1).arg(file2).succeeds().no_stderr();
|
ucmd.arg(file1).arg(file2).succeeds().no_stderr();
|
||||||
|
@ -353,7 +353,7 @@ fn test_install_copy_file() {
|
||||||
fn test_install_target_file_dev_null() {
|
fn test_install_target_file_dev_null() {
|
||||||
let (at, mut ucmd) = at_and_ucmd!();
|
let (at, mut ucmd) = at_and_ucmd!();
|
||||||
let file1 = "/dev/null";
|
let file1 = "/dev/null";
|
||||||
let file2 = "test_install_target_file_file_i2";
|
let file2 = "target_file";
|
||||||
|
|
||||||
ucmd.arg(file1).arg(file2).succeeds().no_stderr();
|
ucmd.arg(file1).arg(file2).succeeds().no_stderr();
|
||||||
assert!(at.file_exists(file2));
|
assert!(at.file_exists(file2));
|
||||||
|
@ -362,9 +362,9 @@ fn test_install_target_file_dev_null() {
|
||||||
#[test]
|
#[test]
|
||||||
fn test_install_nested_paths_copy_file() {
|
fn test_install_nested_paths_copy_file() {
|
||||||
let (at, mut ucmd) = at_and_ucmd!();
|
let (at, mut ucmd) = at_and_ucmd!();
|
||||||
let dir1 = "test_install_target_new_file_dir_l";
|
let file1 = "source_file";
|
||||||
let dir2 = "test_install_target_new_file_dir_m";
|
let dir1 = "source_dir";
|
||||||
let file1 = "test_install_target_file_file_l1";
|
let dir2 = "target_dir";
|
||||||
|
|
||||||
at.mkdir(dir1);
|
at.mkdir(dir1);
|
||||||
at.mkdir(dir2);
|
at.mkdir(dir2);
|
||||||
|
@ -380,8 +380,8 @@ fn test_install_nested_paths_copy_file() {
|
||||||
#[test]
|
#[test]
|
||||||
fn test_install_failing_omitting_directory() {
|
fn test_install_failing_omitting_directory() {
|
||||||
let (at, mut ucmd) = at_and_ucmd!();
|
let (at, mut ucmd) = at_and_ucmd!();
|
||||||
let dir1 = "source_dir";
|
|
||||||
let file1 = "source_file";
|
let file1 = "source_file";
|
||||||
|
let dir1 = "source_dir";
|
||||||
let dir2 = "target_dir";
|
let dir2 = "target_dir";
|
||||||
|
|
||||||
at.mkdir(dir1);
|
at.mkdir(dir1);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue