File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -150,6 +150,30 @@ fn dependent_alias() {
150
150
. run ( ) ;
151
151
}
152
152
153
+ #[ cargo_test]
154
+ fn builtin_alias_shadowing_external_subcommand ( ) {
155
+ let p = project ( )
156
+ . file ( "Cargo.toml" , & basic_bin_manifest ( "foo" ) )
157
+ . file ( "src/main.rs" , "fn main() {}" )
158
+ . executable ( "cargo-t" , "" )
159
+ . build ( ) ;
160
+
161
+ let mut paths: Vec < _ > = env:: split_paths ( & env:: var_os ( "PATH" ) . unwrap_or_default ( ) ) . collect ( ) ;
162
+ paths. push ( p. root ( ) ) ;
163
+ let path = env:: join_paths ( paths) . unwrap ( ) ;
164
+
165
+ p. cargo ( "t" )
166
+ . env ( "PATH" , & path)
167
+ . with_stderr (
168
+ "\
169
+ [COMPILING] foo v0.5.0 [..]
170
+ [FINISHED] test [unoptimized + debuginfo] target(s) in [..]
171
+ [RUNNING] unittests src/main.rs [..]
172
+ " ,
173
+ )
174
+ . run ( ) ;
175
+ }
176
+
153
177
#[ cargo_test]
154
178
fn alias_shadowing_external_subcommand ( ) {
155
179
let echo = echo_subcommand ( ) ;
You can’t perform that action at this time.
0 commit comments