emacs/test/src
Paul Eggert 4a56ca5bbf %o and %x can now format signed integers
Optionally treat integers as signed numbers with %o
and %x format specifiers, instead of treating them as
a machine-dependent two’s complement representation.
This option is more machine-independent, allows formats
like "#x%x" to be useful for reading later, and is
better-insulated for future changes involving bignums.
Setting the new variable ‘binary-as-unsigned’ to nil
enables the new behavior (Bug#32252).
This is a simplified version of the change proposed in:
https://lists.gnu.org/r/emacs-devel/2018-07/msg00763.html
I simplified that proposal by omitting bitwidth modifiers, as
I could not find an any example uses in the Emacs source code
that needed them and doing them correctly would have been
quite a bit more work for apparently little benefit.
* doc/lispref/strings.texi (Formatting Strings):
Document that %x and %o format negative integers in a
platform-dependent way.  Also, document how to format
numbers so that the same values can be read back in.
* etc/NEWS: Document the change.
* src/editfns.c (styled_format): Treat integers as signed
numbers even with %o and %x, if binary-as-unsigned is nil.
Support the + and space flags with %o and %x, since they’re
about signs.
(syms_of_editfns): New variable binary-as-unsigned.
* test/src/editfns-tests.el (read-large-integer):
Test that maximal integers can be read after printing
with all integer formats, if binary-as-unsigned is nil.
2018-07-26 00:39:17 -07:00
..
regex-resources * test/src/regex-resources/PTESTS: Convert to UTF-8. 2016-12-12 23:17:19 -08:00
alloc-tests.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
buffer-tests.el Add tests for buffer-base-buffer function (Bug#30905) 2018-04-11 21:16:49 -04:00
callint-tests.el Fix off-by-one history pruning (bug#31211) 2018-05-02 20:18:07 -04:00
callproc-tests.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
casefiddle-tests.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
charset-tests.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
chartab-tests.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
cmds-tests.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
coding-tests.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
data-tests.el Fix bug#30846, along with misc cleanups found along the way 2018-06-03 12:48:14 -04:00
decompress-tests.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
doc-tests.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
editfns-tests.el %o and %x can now format signed integers 2018-07-26 00:39:17 -07:00
emacs-module-tests.el * lisp/subr.el (dotimes): Deprecate RESULT field. (Bug#16206) 2018-04-28 23:20:33 +03:00
eval-tests.el Give warning if losing value to defvaralias (Bug#5950) 2018-06-12 07:40:33 -04:00
fileio-tests.el Merge from origin/emacs-26 2018-01-01 01:13:04 -08:00
floatfns-tests.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
fns-tests.el Fix bug with eql etc. on NaNs 2018-07-18 03:18:53 -07:00
font-tests.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
inotify-tests.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
json-tests.el Skip a json.c test unless functions being tested exist 2018-06-19 03:02:09 +01:00
keyboard-tests.el Update copyright year to 2018 2018-01-01 01:25:56 -08:00
keymap-tests.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
lcms-tests.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
lread-tests.el Fix failed assertion when load-force-doc-strings 2018-05-22 12:42:16 -07:00
marker-tests.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
minibuf-tests.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
print-tests.el Honor print-charset-text-property value of nil (Bug#31376) 2018-05-23 07:53:58 -04:00
process-tests.el Don’t assume ordering in make-process/mix-stderr 2018-05-21 12:31:54 -07:00
regex-tests.el Raise limit of regexp repetition (Bug#24914) 2018-01-26 20:49:44 -05:00
syntax-tests.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
textprop-tests.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
thread-tests.el thread-join returns the result of finished thread 2018-07-22 11:53:24 +02:00
undo-tests.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
xml-tests.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00