@@ -864,6 +864,7 @@ fn test_parse() {
864864
865865 // fixed: dot plus nanoseconds
866866 check ! ( "" , [ fix!( Nanosecond ) ] ; ) ; // no field set, but not an error
867+ check ! ( "." , [ fix!( Nanosecond ) ] ; TOO_SHORT ) ;
867868 check ! ( "4" , [ fix!( Nanosecond ) ] ; TOO_LONG ) ; // never consumes `4`
868869 check ! ( "4" , [ fix!( Nanosecond ) , num!( Second ) ] ; second: 4 ) ;
869870 check ! ( ".0" , [ fix!( Nanosecond ) ] ; nanosecond: 0 ) ;
@@ -886,13 +887,13 @@ fn test_parse() {
886887 check ! ( ".000000000547" , [ fix!( Nanosecond ) ] ; nanosecond: 0 ) ;
887888 check ! ( ".0000000009999999999999999999999999" , [ fix!( Nanosecond ) ] ; nanosecond: 0 ) ;
888889 check ! ( ".4🤠" , [ fix!( Nanosecond ) , lit!( "🤠" ) ] ; nanosecond: 400_000_000 ) ;
889- check ! ( "." , [ fix!( Nanosecond ) ] ; TOO_SHORT ) ;
890890 check ! ( ".4x" , [ fix!( Nanosecond ) ] ; TOO_LONG ) ;
891891 check ! ( ". 4" , [ fix!( Nanosecond ) ] ; INVALID ) ;
892892 check ! ( " .4" , [ fix!( Nanosecond ) ] ; TOO_LONG ) ; // no automatic trimming
893893
894894 // fixed: nanoseconds without the dot
895895 check ! ( "" , [ internal_fix!( Nanosecond3NoDot ) ] ; TOO_SHORT ) ;
896+ check ! ( "." , [ internal_fix!( Nanosecond3NoDot ) ] ; TOO_SHORT ) ;
896897 check ! ( "0" , [ internal_fix!( Nanosecond3NoDot ) ] ; TOO_SHORT ) ;
897898 check ! ( "4" , [ internal_fix!( Nanosecond3NoDot ) ] ; TOO_SHORT ) ;
898899 check ! ( "42" , [ internal_fix!( Nanosecond3NoDot ) ] ; TOO_SHORT ) ;
@@ -908,6 +909,7 @@ fn test_parse() {
908909 check ! ( ".421" , [ internal_fix!( Nanosecond3NoDot ) ] ; INVALID ) ;
909910
910911 check ! ( "" , [ internal_fix!( Nanosecond6NoDot ) ] ; TOO_SHORT ) ;
912+ check ! ( "." , [ internal_fix!( Nanosecond6NoDot ) ] ; TOO_SHORT ) ;
911913 check ! ( "0" , [ internal_fix!( Nanosecond6NoDot ) ] ; TOO_SHORT ) ;
912914 check ! ( "1234" , [ internal_fix!( Nanosecond6NoDot ) ] ; TOO_SHORT ) ;
913915 check ! ( "12345" , [ internal_fix!( Nanosecond6NoDot ) ] ; TOO_SHORT ) ;
@@ -921,6 +923,7 @@ fn test_parse() {
921923 check ! ( ".42100" , [ internal_fix!( Nanosecond6NoDot ) ] ; INVALID ) ;
922924
923925 check ! ( "" , [ internal_fix!( Nanosecond9NoDot ) ] ; TOO_SHORT ) ;
926+ check ! ( "." , [ internal_fix!( Nanosecond9NoDot ) ] ; TOO_SHORT ) ;
924927 check ! ( "42195" , [ internal_fix!( Nanosecond9NoDot ) ] ; TOO_SHORT ) ;
925928 check ! ( "12345678" , [ internal_fix!( Nanosecond9NoDot ) ] ; TOO_SHORT ) ;
926929 check ! ( "421950803" , [ internal_fix!( Nanosecond9NoDot ) ] ; nanosecond: 421_950_803 ) ;
0 commit comments