1 //! Tests for the boostrap process wrapper 2 3 use std::fs::read_to_string; 4 5 use runfiles::Runfiles; 6 7 /// Test that the shell process wrapper starts with the expected shebang to 8 /// avoid breaking the contract with the `bootstrap_process_wrapper` rule. 9 #[test] test_shebang()10fn test_shebang() { 11 let rfiles = Runfiles::create().unwrap(); 12 13 let script = runfiles::rlocation!( 14 rfiles, 15 "rules_rust/util/process_wrapper/private/process_wrapper.sh" 16 ); 17 18 let content = read_to_string(script).unwrap(); 19 assert!( 20 content.starts_with("#!/usr/bin/env bash"), 21 "The shell script does not start with the expected shebang." 22 ) 23 } 24