File tree 1 file changed +33
-0
lines changed 1 file changed +33
-0
lines changed Original file line number Diff line number Diff line change @@ -684,6 +684,39 @@ fn template_workspace_path_hash_should_handle_symlink() {
684
684
}
685
685
}
686
686
687
+ #[ cargo_test]
688
+ fn template_should_handle_ignore_unmatched_brackets ( ) {
689
+ let p = project ( )
690
+ . file ( "src/lib.rs" , "" )
691
+ . file (
692
+ ".cargo/config.toml" ,
693
+ r#"
694
+ [build]
695
+ build-dir = "foo/{bar"
696
+ "# ,
697
+ )
698
+ . build ( ) ;
699
+
700
+ p. cargo ( "build -Z build-dir" )
701
+ . masquerade_as_nightly_cargo ( & [ "build-dir" ] )
702
+ . run ( ) ;
703
+
704
+ let p = project ( )
705
+ . file ( "src/lib.rs" , "" )
706
+ . file (
707
+ ".cargo/config.toml" ,
708
+ r#"
709
+ [build]
710
+ build-dir = "foo/}bar"
711
+ "# ,
712
+ )
713
+ . build ( ) ;
714
+
715
+ p. cargo ( "build -Z build-dir" )
716
+ . masquerade_as_nightly_cargo ( & [ "build-dir" ] )
717
+ . run ( ) ;
718
+ }
719
+
687
720
fn parse_workspace_manifest_path_hash ( hash_dir : & PathBuf ) -> PathBuf {
688
721
// Since the hash will change between test runs simply find the first directories and assume
689
722
// that is the hash dir. The format is a 2 char directory followed by the remaining hash in the
You can’t perform that action at this time.
0 commit comments