@@ -355,6 +355,8 @@ impl TailwindClass {
355355 StyleSelector :: At { kind, query, .. } => {
356356 has_at_rule = Some ( ( kind, query) ) ;
357357 }
358+ // Note: TailwindVariant::to_selector() never produces Global, but this arm
359+ // is required for exhaustive matching. Kept as no-op for forward compatibility.
358360 StyleSelector :: Global ( _, _) => { }
359361 }
360362 }
@@ -5930,4 +5932,70 @@ mod tests {
59305932 let result = parse_single_class ( class) ;
59315933 assert ! ( result. is_none( ) ) ;
59325934 }
5935+
5936+ // ============================================================================
5937+ // WAVE 8: Coverage Gap Tests for Lines 816, 866, 295
5938+ // ============================================================================
5939+
5940+ // Wave 8.1: has_tailwind_classes with arbitrary CSS syntax (line 816)
5941+ // Classes with [...] that don't match any prefix trigger the arbitrary check
5942+ // Note: Classes with ':' get split (variant prefix removal), so avoid them
5943+ #[ rstest]
5944+ #[ case( "custom-[value]" ) ]
5945+ #[ case( "xyz-[test]" ) ]
5946+ #[ case( "my-class-[10px]" ) ]
5947+ #[ case( "foo-[bar]" ) ]
5948+ fn test_has_tailwind_classes_arbitrary_css_syntax ( #[ case] class : & str ) {
5949+ assert ! ( has_tailwind_classes( class) ) ;
5950+ }
5951+
5952+ // Wave 8.2: is_likely_tailwind_class with pure arbitrary syntax (line 816)
5953+ // These classes have brackets but don't match any standard prefix
5954+ // The check at line 816 triggers when a class has [...] but doesn't match prefixes
5955+ #[ rstest]
5956+ #[ case( "custom-[value]" ) ]
5957+ #[ case( "xyz-[100px]" ) ]
5958+ #[ case( "my-[test]" ) ]
5959+ #[ case( "unknown-[arbitrary]" ) ]
5960+ fn test_is_likely_tailwind_class_pure_arbitrary_syntax ( #[ case] class : & str ) {
5961+ assert ! ( is_likely_tailwind_class( class) ) ;
5962+ }
5963+
5964+ // Wave 8.3: parse_tailwind_to_styles integration for rounded variants (lines 2130-2151)
5965+ #[ test]
5966+ #[ serial]
5967+ fn test_parse_tailwind_to_styles_rounded_integration ( ) {
5968+ reset_class_map ( ) ;
5969+ reset_file_map ( ) ;
5970+
5971+ let styles = parse_tailwind_to_styles (
5972+ "rounded-none rounded-sm rounded-md rounded-lg rounded-xl rounded-2xl rounded-3xl rounded-full" ,
5973+ None ,
5974+ ) ;
5975+ assert_eq ! ( styles. len( ) , 8 ) ;
5976+ }
5977+
5978+ // Wave 8.4: parse_tailwind_to_styles integration for border widths (lines 2223-2232)
5979+ #[ test]
5980+ #[ serial]
5981+ fn test_parse_tailwind_to_styles_border_width_integration ( ) {
5982+ reset_class_map ( ) ;
5983+ reset_file_map ( ) ;
5984+
5985+ let styles = parse_tailwind_to_styles ( "border border-0 border-2 border-4 border-8" , None ) ;
5986+ assert_eq ! ( styles. len( ) , 5 ) ;
5987+ }
5988+
5989+ // Wave 8.5: is_valid_tailwind_value fraction edge case (line 866)
5990+ // Edge case where value starts with '/' - empty first part is vacuously all-digits
5991+ #[ rstest]
5992+ #[ case( "/2" , true ) ]
5993+ #[ case( "/12" , true ) ]
5994+ #[ case( "/123" , true ) ]
5995+ fn test_is_valid_tailwind_value_slash_prefix_fraction (
5996+ #[ case] value : & str ,
5997+ #[ case] expected : bool ,
5998+ ) {
5999+ assert_eq ! ( is_valid_tailwind_value( value) , expected) ;
6000+ }
59336001}
0 commit comments