File tree Expand file tree Collapse file tree 1 file changed +48
-0
lines changed
Expand file tree Collapse file tree 1 file changed +48
-0
lines changed Original file line number Diff line number Diff line change @@ -684,3 +684,51 @@ Caused by:
684684"# ] ] ,
685685 ) ;
686686}
687+
688+ #[ cargo_test]
689+ fn disallow_glob_syntax ( ) {
690+ // Reserved for future extension
691+ write_config_toml ( "include = 'config-*.toml'" ) ;
692+ let gctx = GlobalContextBuilder :: new ( )
693+ . unstable_flag ( "config-include" )
694+ . build_err ( ) ;
695+ assert_error (
696+ gctx. unwrap_err ( ) ,
697+ str![ [ r#"
698+ could not load Cargo configuration
699+
700+ Caused by:
701+ failed to load config include `config-*.toml` from `[ROOT]/.cargo/config.toml`
702+
703+ Caused by:
704+ failed to read configuration file `[ROOT]/.cargo/config-*.toml`
705+
706+ Caused by:
707+ [NOT_FOUND]
708+ "# ] ] ,
709+ ) ;
710+ }
711+
712+ #[ cargo_test]
713+ fn disallow_template_syntax ( ) {
714+ // Reserved for future extension
715+ write_config_toml ( "include = '{workspace-root}/config.toml'" ) ;
716+ let gctx = GlobalContextBuilder :: new ( )
717+ . unstable_flag ( "config-include" )
718+ . build_err ( ) ;
719+ assert_error (
720+ gctx. unwrap_err ( ) ,
721+ str![ [ r#"
722+ could not load Cargo configuration
723+
724+ Caused by:
725+ failed to load config include `{workspace-root}/config.toml` from `[ROOT]/.cargo/config.toml`
726+
727+ Caused by:
728+ failed to read configuration file `[ROOT]/.cargo/{workspace-root}/config.toml`
729+
730+ Caused by:
731+ [NOT_FOUND]
732+ "# ] ] ,
733+ ) ;
734+ }
You can’t perform that action at this time.
0 commit comments