directories.rs 811 B

123456789101112131415161718192021222324
  1. extern crate exa;
  2. use exa::Exa;
  3. /// --------------------------------------------------------------------------
  4. /// These tests assume that the ‘generate annoying testcases’ script has been
  5. /// run first. Otherwise, they will break!
  6. /// --------------------------------------------------------------------------
  7. static DIRECTORIES: &'static str = concat!(
  8. "\x1B[1;34m", "attributes", "\x1B[0m", '\n',
  9. //"\x1B[1;34m", "filenames", "\x1B[0m", '\n',
  10. "\x1B[1;34m", "links", "\x1B[0m", '\n',
  11. "\x1B[1;34m", "passwd", "\x1B[0m", '\n',
  12. "\x1B[1;34m", "permissions", "\x1B[0m", '\n',
  13. );
  14. #[test]
  15. fn directories() {
  16. let mut output = Vec::<u8>::new();
  17. Exa::new( &[ "-1", "testcases" ], &mut output).unwrap().run().unwrap();
  18. assert_eq!(output, DIRECTORIES.as_bytes());
  19. }