From 965bc9e37a1e362eb70b8be312cd614df6f18153 Mon Sep 17 00:00:00 2001 From: Benjamin Sago Date: Sat, 19 Aug 2017 22:39:34 +0100 Subject: [PATCH] Print the parsed options to the debug log MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It adds a lot of lines to the output, so I’m not convinced it’s worth it, but… --- src/exa.rs | 3 +++ xtests/run.sh | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/exa.rs b/src/exa.rs index 7bc53c0..584820c 100644 --- a/src/exa.rs +++ b/src/exa.rs @@ -70,6 +70,9 @@ impl<'args, 'w, W: Write + 'w> Exa<'args, 'w, W> { pub fn new(args: I, writer: &'w mut W) -> Result, Misfire> where I: Iterator { 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 } }) } diff --git a/xtests/run.sh b/xtests/run.sh index d97cd45..d04a675 100755 --- a/xtests/run.sh +++ b/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...