I switched from read to our custom parsing because read expects the 0o prefix instead of C-style 0. We only handle integers for now, as read for Double does not support decimal numbers with 0x prefix and I did not want to implement decimals myself.
Additionally, add support for + sign.
Also merge negative.settings test file into dconf.settings since that one aggregates configuration keys from real dconf dumps. Instead create numbers.settings that tests all possible numeric values.
Currently unhandled cases:
zero-trailing=0.
zero-leading=.0
hex-float=0x10.1
GLib’s GVariant parses octal decimals a base 10. This is probably expected, as the docs only mention hex floats.
oct-float=010.1
oct-sci=010e10
GLib’s GVariant parses the following as a double, probably confusing it with scientific notation:
I switched from
read
to our custom parsing becauseread
expects the0o
prefix instead of C-style0
. We only handle integers for now, asread
forDouble
does not support decimal numbers with0x
prefix and I did not want to implement decimals myself.Additionally, add support for + sign.
Also merge
negative.settings
test file intodconf.settings
since that one aggregates configuration keys from real dconf dumps. Instead createnumbers.settings
that tests all possible numeric values.Currently unhandled cases:
GLib’s GVariant parses octal decimals a base 10. This is probably expected, as the docs only mention hex floats.
GLib’s GVariant parses the following as a double, probably confusing it with scientific notation: