Kaynağa Gözat

Fix failing tests

Benjamin Sago 6 yıl önce
ebeveyn
işleme
9e1200f9b7
4 değiştirilmiş dosya ile 7 ekleme ve 7 silme
  1. 4 4
      src/options/view.rs
  2. 1 1
      xtests/error_lt
  3. 1 1
      xtests/error_ltr
  4. 1 1
      xtests/error_value

+ 4 - 4
src/options/view.rs

@@ -518,7 +518,7 @@ mod test {
         test!(modified:  TimeTypes <- ["--modified"];          Both => Ok(TimeTypes { modified: true,  changed: false, accessed: false, created: false }));
         test!(m:         TimeTypes <- ["-m"];                  Both => Ok(TimeTypes { modified: true,  changed: false, accessed: false, created: false }));
         test!(time_mod:  TimeTypes <- ["--time=modified"];     Both => Ok(TimeTypes { modified: true,  changed: false, accessed: false, created: false }));
-        test!(time_m:    TimeTypes <- ["-tmod"];               Both => Ok(TimeTypes { modified: true,  changed: false, accessed: false, created: false }));
+        test!(t_m:       TimeTypes <- ["-tmod"];               Both => Ok(TimeTypes { modified: true,  changed: false, accessed: false, created: false }));
 
         // Changed
         #[cfg(target_family = "unix")]
@@ -526,7 +526,7 @@ mod test {
         #[cfg(target_family = "unix")]
         test!(time_ch:   TimeTypes <- ["--time=changed"];      Both => Ok(TimeTypes { modified: false, changed: true,  accessed: false, created: false }));
         #[cfg(target_family = "unix")]
-        test!(time_c:    TimeTypes <- ["-t", "ch"];            Both => Ok(TimeTypes { modified: false, changed: true,  accessed: false, created: false }));
+        test!(t_ch:    TimeTypes <- ["-t", "ch"];            Both => Ok(TimeTypes { modified: false, changed: true,  accessed: false, created: false }));
 
         // Accessed
         test!(acc:       TimeTypes <- ["--accessed"];          Both => Ok(TimeTypes { modified: false, changed: false, accessed: true,  created: false }));
@@ -544,7 +544,7 @@ mod test {
         #[cfg(not(target_os = "linux"))]
         test!(time_cr:   TimeTypes <- ["--time=created"];      Both => Ok(TimeTypes { modified: false, changed: false, accessed: false, created: true  }));
         #[cfg(not(target_os = "linux"))]
-        test!(time_c:    TimeTypes <- ["-tcr"];                Both => Ok(TimeTypes { modified: false, changed: false, accessed: false, created: true  }));
+        test!(t_cr:      TimeTypes <- ["-tcr"];                Both => Ok(TimeTypes { modified: false, changed: false, accessed: false, created: true  }));
 
         // Multiples
         test!(time_uu:   TimeTypes <- ["-u", "--modified"];    Both => Ok(TimeTypes { modified: true, changed: false, accessed: true,  created: false }));
@@ -552,7 +552,7 @@ mod test {
 
         // Errors
         test!(time_tea:  TimeTypes <- ["--time=tea"];          Both => err Misfire::BadArgument(&flags::TIME, OsString::from("tea")));
-        test!(time_ea:   TimeTypes <- ["-tea"];                Both => err Misfire::BadArgument(&flags::TIME, OsString::from("ea")));
+        test!(t_ea:      TimeTypes <- ["-tea"];                Both => err Misfire::BadArgument(&flags::TIME, OsString::from("ea")));
 
         // Overriding
         test!(overridden:   TimeTypes <- ["-tcr", "-tmod"];    Last => Ok(TimeTypes { modified: true,  changed: false, accessed: false, created: false }));

+ 1 - 1
xtests/error_lt

@@ -1,2 +1,2 @@
-Flag -t needs a value (choices: modified, accessed, created)
+Flag -t needs a value (choices: modified, changed, accessed, created)
 To sort newest files last, try "--sort newest", or just "-snew"

+ 1 - 1
xtests/error_ltr

@@ -1,2 +1,2 @@
-Option --time (-t) has no "r" setting (choices: modified, accessed, created)
+Option --time (-t) has no "r" setting (choices: modified, changed, accessed, created)
 To sort oldest files last, try "--sort oldest", or just "-sold"

+ 1 - 1
xtests/error_value

@@ -1 +1 @@
-Flag --time needs a value (choices: modified, accessed, created)
+Flag --time needs a value (choices: modified, changed, accessed, created)