File tree 1 file changed +27
-0
lines changed
1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -769,6 +769,33 @@ mod test {
769
769
assert ! ( build_file_content. contains( "name = \" mock_crate\" " ) ) ;
770
770
}
771
771
772
+ #[ test]
773
+ fn test_disable_pipelining ( ) {
774
+ let mut context = Context :: default ( ) ;
775
+ let crate_id = CrateId :: new ( "mock_crate" . to_owned ( ) , "0.1.0" . to_owned ( ) ) ;
776
+ context. crates . insert (
777
+ crate_id. clone ( ) ,
778
+ CrateContext {
779
+ name : crate_id. name ,
780
+ version : crate_id. version ,
781
+ targets : BTreeSet :: from ( [ Rule :: Library ( mock_target_attributes ( ) ) ] ) ,
782
+ disable_pipelining : true ,
783
+ ..CrateContext :: default ( )
784
+ } ,
785
+ ) ;
786
+
787
+ let renderer = Renderer :: new ( mock_render_config ( ) ) ;
788
+ let output = renderer. render ( & context) . unwrap ( ) ;
789
+
790
+ let build_file_content = output
791
+ . get ( & PathBuf :: from ( "BUILD.mock_crate-0.1.0.bazel" ) )
792
+ . unwrap ( ) ;
793
+
794
+ eprintln ! ( "{}" , build_file_content) ;
795
+
796
+ assert ! ( build_file_content. contains( "disable_pipelining = True" ) ) ;
797
+ }
798
+
772
799
#[ test]
773
800
fn render_cargo_build_script ( ) {
774
801
let mut context = Context :: default ( ) ;
You can’t perform that action at this time.
0 commit comments