@@ -259,23 +259,19 @@ fn test_incomplete_key_no_value() {
259
259
#[ test]
260
260
fn missing_trailing_semicolon ( ) {
261
261
let input = "http::host=localhost;port=9000" ;
262
- let config = parse_conf_str ( input) ;
263
- assert ! ( config. is_err( ) ) ;
264
- let err = config. unwrap_err ( ) ;
265
- assert_eq ! ( ErrorKind :: MissingTrailingSemicolon , err. kind( ) ) ;
266
- assert_eq ! ( err. position( ) , 30 ) ;
267
- assert_eq ! ( err. to_string( ) , "missing trailing semicolon at position 30" ) ;
262
+ let config = parse_conf_str ( input) . unwrap ( ) ;
263
+ assert_eq ! ( config. service( ) , "http" ) ;
264
+ assert_eq ! ( config. get( "host" ) , Some ( "localhost" ) ) ;
265
+ assert_eq ! ( config. get( "port" ) , Some ( "9000" ) ) ;
268
266
}
269
267
270
268
#[ test]
271
269
fn escaped_semicolon_missing_trailing ( ) {
272
270
let input = "http::host=localhost;port=9000;;" ;
273
- let config = parse_conf_str ( input) ;
274
- assert ! ( config. is_err( ) ) ;
275
- let err = config. unwrap_err ( ) ;
276
- assert_eq ! ( err. kind( ) , ErrorKind :: MissingTrailingSemicolon ) ;
277
- assert_eq ! ( err. position( ) , 32 ) ;
278
- assert_eq ! ( err. to_string( ) , "missing trailing semicolon at position 32" ) ;
271
+ let config = parse_conf_str ( input) . unwrap ( ) ;
272
+ assert_eq ! ( config. service( ) , "http" ) ;
273
+ assert_eq ! ( config. get( "host" ) , Some ( "localhost" ) ) ;
274
+ assert_eq ! ( config. get( "port" ) , Some ( "9000;" ) ) ;
279
275
}
280
276
281
277
#[ test]
0 commit comments