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