links.rs 969 B

123456789101112131415161718192021
  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 LINKS: &'static str = concat!(
  8. "\x1B[36m", "broken", "\x1B[0m", " ", "\x1B[31m", "->", "\x1B[0m", " ", "\x1B[4;31m", "testcases/links/nowhere", "\x1B[0m", '\n',
  9. "\x1B[36m", "root", "\x1B[0m", " ", "\x1B[38;5;244m", "->", "\x1B[0m", " ", "\x1B[36m", "/", "\x1B[0m", '\n',
  10. "\x1B[36m", "usr", "\x1B[0m", " ", "\x1B[38;5;244m", "->", "\x1B[0m", " ", "\x1B[36m", "/", "\x1B[1;34m", "usr", "\x1B[0m", '\n',
  11. );
  12. #[test]
  13. fn links() {
  14. let mut output = Vec::<u8>::new();
  15. Exa::new( &[ "-1", "testcases/links" ], &mut output).unwrap().run().unwrap();
  16. assert_eq!(output, LINKS.as_bytes());
  17. }