@@ -138,6 +138,33 @@ fn remove_toolchain() {
138
138
} ) ;
139
139
}
140
140
141
+ #[ test]
142
+ fn add_remove_multiple_toolchains ( ) {
143
+ fn go ( add : & str , rm : & str ) {
144
+ setup ( & |config| {
145
+ expect_ok ( config, & [ "rustup" , "toolchain" , add, "1.13.0" , "1.14.0" ] ) ;
146
+ expect_ok ( config, & [ "rustup" , "toolchain" , "list" ] ) ;
147
+ expect_stdout_ok ( config, & [ "rustup" , "toolchain" , "list" ] ,
148
+ "1.13.0" ) ;
149
+ expect_stdout_ok ( config, & [ "rustup" , "toolchain" , "list" ] ,
150
+ "1.14.0" ) ;
151
+
152
+ expect_ok ( config, & [ "rustup" , "toolchain" , rm, "1.13.0" , "1.14.0" ] ) ;
153
+ expect_ok ( config, & [ "rustup" , "toolchain" , "list" ] ) ;
154
+ expect_not_stdout_ok ( config, & [ "rustup" , "toolchain" , "list" ] ,
155
+ "1.13.0" ) ;
156
+ expect_not_stdout_ok ( config, & [ "rustup" , "toolchain" , "list" ] ,
157
+ "1.14.0" ) ;
158
+ } ) ;
159
+ }
160
+
161
+ for add in & [ "add" , "update" , "install" ] {
162
+ for rm in & [ "remove" , "uninstall" ] {
163
+ go ( add, rm) ;
164
+ }
165
+ }
166
+ }
167
+
141
168
#[ test]
142
169
fn remove_default_toolchain_err_handling ( ) {
143
170
setup ( & |config| {
0 commit comments