File tree 1 file changed +18
-1
lines changed 1 file changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -261,7 +261,7 @@ pub const DEFAULT_TYPES: &[(&str, &[&str])] = &[
261
261
( "ts" , & [ "*.ts" , "*.tsx" ] ) ,
262
262
( "twig" , & [ "*.twig" ] ) ,
263
263
( "txt" , & [ "*.txt" ] ) ,
264
- ( "typoscript" , & [ "*.typoscript" , "*.ts" ] ) ,
264
+ ( "typoscript" , & [ "*.typoscript" ] ) ,
265
265
( "vala" , & [ "*.vala" ] ) ,
266
266
( "vb" , & [ "*.vb" ] ) ,
267
267
( "vcl" , & [ "*.vcl" ] ) ,
@@ -292,3 +292,20 @@ pub const DEFAULT_TYPES: &[(&str, &[&str])] = &[
292
292
] ) ,
293
293
( "zstd" , & [ "*.zst" , "*.zstd" ] ) ,
294
294
] ;
295
+
296
+ // See `cargo test --lib -- --nocapture default_types::check_duplicates`
297
+ #[ test]
298
+ fn check_duplicates ( ) {
299
+ let mut reverse = std:: collections:: BTreeMap :: new ( ) ;
300
+ for ( name, exts) in DEFAULT_TYPES {
301
+ for ext in * exts {
302
+ reverse. entry ( ext) . or_insert ( Vec :: new ( ) ) . push ( name) ;
303
+ }
304
+ }
305
+
306
+ for ( ext, names) in reverse {
307
+ if 1 < names. len ( ) {
308
+ println ! ( "{ext} is under multiple names: {names:?}" ) ;
309
+ }
310
+ }
311
+ }
You can’t perform that action at this time.
0 commit comments