exa/tests/permissions.rs

22 lines
744 B
Rust
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

extern crate exa;
use exa::Exa;
/// --------------------------------------------------------------------------
/// These tests assume that the generate annoying testcases script has been
/// run first. Otherwise, they will break!
/// --------------------------------------------------------------------------
static PERMISSIONS: &'static str = concat!(
"\x1B[1;32m", "all-permissions", "\x1B[0m", '\n',
"\x1B[1;34m", "forbidden-directory", "\x1B[0m", '\n',
"no-permissions", '\n',
);
#[test]
fn permissions() {
let mut output = Vec::<u8>::new();
Exa::new( &[ "-1", "testcases/permissions" ], &mut output).unwrap().run().unwrap();
assert_eq!(output, PERMISSIONS.as_bytes());
}