Feature: Add flag for screen readers

Screen reader mode will,
Reverse direction
Not shows symbols (directory hierarchy or percentage bars)
Adds a column 'depth' to show depth of directory
This commit is contained in:
andy.boot
2023-01-08 11:51:20 +00:00
parent 1e87a0661b
commit 184d1ec5e8
11 changed files with 105 additions and 23 deletions
+17
View File
@@ -137,6 +137,23 @@ pub fn test_output_skip_total() {
assert!(!output.contains("(total)"));
}
#[test]
pub fn test_output_screen_reader() {
let output = build_command(vec!["--screen-reader", "-c", "tests/test_dir/"]);
println!("{}", output);
assert!(output.contains("test_dir 0"));
assert!(output.contains("many 1"));
assert!(output.contains("hello_file 2"));
assert!(output.contains("a_file 2"));
// Verify no 'symbols' reported by screen reader
assert!(!output.contains(""));
for block in ['█', '▓', '▒', '░'] {
assert!(!output.contains(block));
}
}
#[test]
pub fn test_show_files_by_regex_match_lots() {
// Check we can see '.rs' files in the tests directory