diff options
Diffstat (limited to 'test/src')
| -rw-r--r-- | test/src/editfns-tests.el | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/src/editfns-tests.el b/test/src/editfns-tests.el index 1ed0bd5bbaf..c828000bb4f 100644 --- a/test/src/editfns-tests.el +++ b/test/src/editfns-tests.el | |||
| @@ -176,6 +176,14 @@ | |||
| 176 | (should-error (format "%o" -1e-37) | 176 | (should-error (format "%o" -1e-37) |
| 177 | :type 'overflow-error)) | 177 | :type 'overflow-error)) |
| 178 | 178 | ||
| 179 | ;; Bug#31938 | ||
| 180 | (ert-deftest format-%d-float () | ||
| 181 | (should (string-equal (format "%d" -1.1) "-1")) | ||
| 182 | (should (string-equal (format "%d" -0.9) "0")) | ||
| 183 | (should (string-equal (format "%d" -0.0) "0")) | ||
| 184 | (should (string-equal (format "%d" 0.0) "0")) | ||
| 185 | (should (string-equal (format "%d" 0.9) "0")) | ||
| 186 | (should (string-equal (format "%d" 1.1) "1"))) | ||
| 179 | 187 | ||
| 180 | ;;; Check format-time-string with various TZ settings. | 188 | ;;; Check format-time-string with various TZ settings. |
| 181 | ;;; Use only POSIX-compatible TZ values, since the tests should work | 189 | ;;; Use only POSIX-compatible TZ values, since the tests should work |