File tree Expand file tree Collapse file tree
crates/cli/tests/coverage Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -92,9 +92,21 @@ fn effective_plugin_toml_sources_reports_empty_and_sorted_contributors() {
9292 std:: fs:: write ( & project_plugins, "version = 1\n components = []\n " ) . unwrap ( ) ;
9393 std:: fs:: write ( & user_plugins, "version = 1\n components = []\n " ) . unwrap ( ) ;
9494
95- let mut expected = vec ! [ project_plugins. canonicalize( ) . unwrap( ) , user_plugins] ;
95+ let sources = effective_plugin_toml_sources ( ) . unwrap ( ) ;
96+ assert ! ( sources. is_sorted( ) ) ;
97+ assert ! ( sources. windows( 2 ) . all( |paths| paths[ 0 ] != paths[ 1 ] ) ) ;
98+
99+ let mut actual = sources
100+ . iter ( )
101+ . map ( |path| path. canonicalize ( ) . unwrap ( ) )
102+ . collect :: < Vec < _ > > ( ) ;
103+ actual. sort ( ) ;
104+ let mut expected = [ project_plugins, user_plugins]
105+ . iter ( )
106+ . map ( |path| path. canonicalize ( ) . unwrap ( ) )
107+ . collect :: < Vec < _ > > ( ) ;
96108 expected. sort ( ) ;
97- assert_eq ! ( effective_plugin_toml_sources ( ) . unwrap ( ) , expected) ;
109+ assert_eq ! ( actual , expected) ;
98110}
99111
100112fn isolated_config_path ( temp : & tempfile:: TempDir ) -> std:: path:: PathBuf {
You can’t perform that action at this time.
0 commit comments