• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 use std::{env, fs};
2 
main()3 fn main() {
4     // our source file should be readable
5     let path = env::var("SOURCE_FILE").unwrap();
6     let generated_data = fs::read_to_string(&path).unwrap();
7     assert_eq!(generated_data, "source\n");
8 
9     // our generated data file should be readable
10     let path = env::var("GENERATED_DATA").unwrap();
11     let generated_data = fs::read_to_string(&path).unwrap();
12     assert_eq!(generated_data, "hello\n");
13 
14     // and we should be able to read (and thus execute) our tool
15     let path = env::var("SOME_TOOL").unwrap();
16     assert!(!fs::read(&path).unwrap().is_empty());
17 }
18