@@ -138,6 +138,32 @@ 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
+ clitools:: setup ( Scenario :: MultiHost , & |config| {
145
+ let triple1 = this_host_triple ( ) ;
146
+ let triple2 = clitools:: MULTI_ARCH1 ;
147
+
148
+ expect_ok ( config, & [ "rustup" , "toolchain" , add, triple1, triple2] ) ;
149
+ expect_ok ( config, & [ "rustup" , "toolchain" , "list" ] ) ;
150
+ expect_stdout_ok ( config, & [ "rustup" , "toolchain" , "list" ] , triple1) ;
151
+ expect_stdout_ok ( config, & [ "rustup" , "toolchain" , "list" ] , triple2) ;
152
+
153
+ expect_ok ( config, & [ "rustup" , "toolchain" , rm, triple1, triple2] ) ;
154
+ expect_ok ( config, & [ "rustup" , "toolchain" , "list" ] ) ;
155
+ expect_not_stdout_ok ( config, & [ "rustup" , "toolchain" , "list" ] , triple1) ;
156
+ expect_not_stdout_ok ( config, & [ "rustup" , "toolchain" , "list" ] , triple2) ;
157
+ } ) ;
158
+ }
159
+
160
+ for add in & [ "add" , "update" , "install" ] {
161
+ for rm in & [ "remove" , "uninstall" ] {
162
+ go ( add, rm) ;
163
+ }
164
+ }
165
+ }
166
+
141
167
#[ test]
142
168
fn remove_default_toolchain_err_handling ( ) {
143
169
setup ( & |config| {
0 commit comments