@@ -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
+ setup ( & |config| {
145
+ let tch1 = "beta" ;
146
+ let tch2 = "nightly" ;
147
+
148
+ expect_ok ( config, & [ "rustup" , "toolchain" , add, tch1, tch2] ) ;
149
+ expect_ok ( config, & [ "rustup" , "toolchain" , "list" ] ) ;
150
+ expect_stdout_ok ( config, & [ "rustup" , "toolchain" , "list" ] , tch1) ;
151
+ expect_stdout_ok ( config, & [ "rustup" , "toolchain" , "list" ] , tch2) ;
152
+
153
+ expect_ok ( config, & [ "rustup" , "toolchain" , rm, tch1, tch2] ) ;
154
+ expect_ok ( config, & [ "rustup" , "toolchain" , "list" ] ) ;
155
+ expect_not_stdout_ok ( config, & [ "rustup" , "toolchain" , "list" ] , tch1) ;
156
+ expect_not_stdout_ok ( config, & [ "rustup" , "toolchain" , "list" ] , tch2) ;
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