Преглед изворни кода

Print the parsed options to the debug log

It adds a lot of lines to the output, so I’m not convinced it’s worth it, but…
Benjamin Sago пре 8 година
родитељ
комит
965bc9e37a
2 измењених фајлова са 4 додато и 1 уклоњено
  1. 3 0
      src/exa.rs
  2. 1 1
      xtests/run.sh

+ 3 - 0
src/exa.rs

@@ -70,6 +70,9 @@ impl<'args, 'w, W: Write + 'w> Exa<'args, 'w, W> {
     pub fn new<I>(args: I, writer: &'w mut W) -> Result<Exa<'args, 'w, W>, Misfire>
     where I: Iterator<Item=&'args OsString> {
         Options::parse(args, &LiveVars).map(move |(options, args)| {
+            debug!("Dir action from arguments: {:#?}", options.dir_action);
+            debug!("Filter from arguments: {:#?}", options.filter);
+            debug!("View from arguments: {:#?}", options.view.mode);
             Exa { options, writer, args }
         })
     }

+ 1 - 1
xtests/run.sh

@@ -195,7 +195,7 @@ $exa -ll          2>&1 | diff -q - $results/error_twice      || exit 1
 
 # Debug mode
 # (uses an empty directory so it prints nothing to stdout)
-EXA_DEBUG="1" $exa $testcases/attributes/dirs/no-xattrs_empty -lh 2>&1 | diff -q - $results/debug  || exit 1
+EXA_DEBUG="1" $exa $testcases/attributes/dirs/no-xattrs_empty -lh 2>&1 | tail -n 2 | diff -q - $results/debug  || exit 1
 
 
 # And finally...