File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
crates/prek/src/languages/dotnet Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -87,6 +87,7 @@ impl DotnetRequest {
8787mod tests {
8888 use super :: * ;
8989 use crate :: config:: Language ;
90+ use crate :: languages:: version:: LanguageRequest ;
9091 use rustc_hash:: FxHashSet ;
9192 use std:: path:: PathBuf ;
9293
@@ -149,6 +150,19 @@ mod tests {
149150 assert ! ( !DotnetRequest :: Major ( 8 ) . is_any( ) ) ;
150151 assert ! ( !DotnetRequest :: MajorMinor ( 8 , 0 ) . is_any( ) ) ;
151152 assert ! ( !DotnetRequest :: MajorMinorPatch ( 8 , 0 , 100 ) . is_any( ) ) ;
153+
154+ // Test through LanguageRequest dispatch
155+ let req = LanguageRequest :: parse ( Language :: Dotnet , "net" ) . unwrap ( ) ;
156+ assert ! ( req. is_any( ) ) ;
157+ let req = LanguageRequest :: parse ( Language :: Dotnet , "8" ) . unwrap ( ) ;
158+ assert ! ( !req. is_any( ) ) ;
159+ }
160+
161+ #[ test]
162+ fn test_tool_buckets ( ) {
163+ let buckets = Language :: Dotnet . tool_buckets ( ) ;
164+ assert_eq ! ( buckets. len( ) , 1 ) ;
165+ assert ! ( buckets. iter( ) . any( |b| b. as_ref( ) == "dotnet" ) ) ;
152166 }
153167
154168 #[ test]
You can’t perform that action at this time.
0 commit comments