Current section

Files

Jump to
yamerl testsuite data yamler_compat float.data
Raw

testsuite/data/yamler_compat/float.data

# libyaml fails to parse several nodes (commented out, here). However,
# if I understand YAML 1.1 correctly, they should be accepted, either as
# strings or as floats.
- 0
- +0
- -0
- 123
- +123
- -123
- 12.34
- +12.34
- -12.34
#- 12e10 # Rejected
#- +12e10 # Rejected
#- -12e10 # Rejected
#- 1.2e11 # Parsed as a valid float by libyaml
- 1.2e+11
- 1.2e-11
#- 1.0e10 # Parsed as a valid float by libyaml
#- 1.0E10 # Parsed as a valid float by libyaml
- .
#- .1 # Rejected
#- .e+3 # Parsed as a string by yamerl
#- 1. # Rejected
#- 1.e+3 # Rejected
#- 190:20:30.15 # Parsed as a string by libyaml
#- +190:20:30.15 # Parsed as a string by libyaml
#- -190:20:30.15 # Parsed as a string by libyaml
- .inf
- +.inf
- -.inf
- .nan
- .Inf
- .INF
- .iNF
- .NaN
- .NAN
- .Nan
- .nAN
- Not a float.0e+10
- +Not a float.0e+10
- -Not a float.0e+10