File tree Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -117,4 +117,34 @@ mod test {
117
117
118
118
assert_eq ! ( parsed, expected) ;
119
119
}
120
+
121
+ #[ test]
122
+ fn test_invalid_identifier ( ) {
123
+ let err = from_str ( "!" ) . unwrap_err ( ) ;
124
+ assert_eq ! ( "" , err. to_string( ) ) ;
125
+ }
126
+
127
+ #[ test]
128
+ fn test_invalid_child ( ) {
129
+ let err = from_str ( "a.." ) . unwrap_err ( ) ;
130
+ assert_eq ! ( "" , err. to_string( ) ) ;
131
+ }
132
+
133
+ #[ test]
134
+ fn test_invalid_subscript ( ) {
135
+ let err = from_str ( "a[b]" ) . unwrap_err ( ) ;
136
+ assert_eq ! ( "" , err. to_string( ) ) ;
137
+ }
138
+
139
+ #[ test]
140
+ fn test_incomplete_subscript ( ) {
141
+ let err = from_str ( "a[0" ) . unwrap_err ( ) ;
142
+ assert_eq ! ( "" , err. to_string( ) ) ;
143
+ }
144
+
145
+ #[ test]
146
+ fn test_invalid_postfix ( ) {
147
+ let err = from_str ( "a!b" ) . unwrap_err ( ) ;
148
+ assert_eq ! ( "" , err. to_string( ) ) ;
149
+ }
120
150
}
You can’t perform that action at this time.
0 commit comments