@@ -103,7 +103,7 @@ mod tests {
103
103
query:: { Added , Changed , Or , With , Without } ,
104
104
schedule:: { Schedule , Stage , SystemStage } ,
105
105
system:: {
106
- IntoExclusiveSystem , IntoSystem , Local , NonSend , NonSendMut , ParamSet , Query ,
106
+ Commands , IntoExclusiveSystem , IntoSystem , Local , NonSend , NonSendMut , ParamSet , Query ,
107
107
RemovedComponents , Res , ResMut , System , SystemState ,
108
108
} ,
109
109
world:: { FromWorld , World } ,
@@ -906,4 +906,23 @@ mod tests {
906
906
expected_ids
907
907
) ;
908
908
}
909
+
910
+ #[ test]
911
+ fn commands_param_set ( ) {
912
+ // Regression test for #4676
913
+ let mut world = World :: new ( ) ;
914
+ let entity = world. spawn ( ) . id ( ) ;
915
+
916
+ run_system (
917
+ & mut world,
918
+ move |mut commands_set : ParamSet < ( Commands , Commands ) > | {
919
+ commands_set. p0 ( ) . entity ( entity) . insert ( A ) ;
920
+ commands_set. p1 ( ) . entity ( entity) . insert ( B ) ;
921
+ } ,
922
+ ) ;
923
+
924
+ let entity = world. entity ( entity) ;
925
+ assert ! ( entity. contains:: <A >( ) ) ;
926
+ assert ! ( entity. contains:: <B >( ) ) ;
927
+ }
909
928
}
0 commit comments