diff options
| author | Paul Eggert | 2017-09-25 11:19:07 -0700 |
|---|---|---|
| committer | Paul Eggert | 2017-09-25 11:19:07 -0700 |
| commit | abcb2e62dae6aa26308f7ac9efc89247f89cbe65 (patch) | |
| tree | fd2c052c3ec67555b0a92dc86da7ecba9b1ab3f6 /test/src | |
| parent | 0bd61c212fe53fb843a10da9a2da88e110d3785a (diff) | |
| parent | 49cd561dc62ea6b3fbedab7aef0f020733f4cf09 (diff) | |
| download | emacs-abcb2e62dae6aa26308f7ac9efc89247f89cbe65.tar.gz emacs-abcb2e62dae6aa26308f7ac9efc89247f89cbe65.zip | |
Merge from origin/emacs-26
49cd561dc6 * test/lisp/tramp-tests.el (tramp-test21-file-links): Spec...
b719f6b20b Loosen strict parsing requirement for desktop files
c7a0c13777 * lisp/xdg.el (xdg-thumb-uri): Fix doc string.
dc6b3560e5 Fix documentation of `make-frame' and related variables an...
3d3778d82a Accept new `always' value for option `buffer-offer-save'
638f64c40a Improve new NS scrolling variable names
d93301242f Document 'replace-buffer-contents' in the manual.
00e4e3e9d2 Fix undecorated frame resizing issues on NS (bug#28512)
820739bbb5 ; * doc/emacs/display.texi (Display Custom): Fix wording.
f2b2201594 ; Spelling and URL fixes
0e143b1fc5 Documentation improvements for 'display-line-numbers'
f656ccdb43 ; Fix typo
d64da52d57 Fix last change in bat-mode.el
908af46abd Fix restoring in GUI sessions desktop saved in TTY sessions
51cbd85454 Improve syntax highlighting in bat-mode
0273916618 Document the 'list-FOO' convention
d24ec58540 Expose viewing conditions in CAM02-UCS metric
a81d5a3d3f Revert "Set frame size to actual requested size (bug#18215)"
0bf066d4b2 Add tests for Edebug
68baca3ee1 Catch more messages in ert-with-message-capture
28e0c410c9 ; * lisp/mouse.el (secondary-selection-exist-p): Doc fix.
31e1d9ef2f Support setting region from secondary selection and vice v...
047f02f00f Fix new copy-directory bug with empty dirs
fbd15836af * doc/lispref/strings.texi (Formatting Strings): Improve i...
f16a8d5dbd Fix 2 testsuite tests for MS-Windows
965cffd89c Rename timer-list to list-timers
a5fec62b51 Provide native touchpad scrolling on macOS
7b3d1c6beb Fix MinGW64 build broken by recent MinGW64 import libraries
c83d0c5fdf Fix crashes in 'move-point-visually' in minibuffer windows
7f3d5f929d * src/emacs.c (usage_message): Don't mention 'find-file'.
6845282200 Fix a minor inaccuracy in the Emacs manual
74d7bb9498 Fix errors in flyspell-post-command-hook
40fdbb01d0 Work on Tramp's file-truename
1a01423b3c Fix bug with make-directory on MS-Windows root
066efb8666 Fix log-view-diff-common when point is after last entry
3f006b56cd Adapt fileio-tests--symlink-failure to Cygwin
ee512e9a82 Ignore buffers whose name begins with a space in save-some...
9e1b5bd92c Improve tramp-interrupt-process robustness
8d4223e61b Minor Tramp doc update
331d0e520f Fix gensym
466df76f7d Cleanup in files-tests.el
6359fe630a Remove old cl-assert calls in 'newline'
059184e645 Avoid crash with C-g C-g in GC
541006c536 Fix format-time-string %Z bug with negative tz
679e05eeb9 message-citation-line-format %Z is now tz name
4e8888d438 Use doc-view or pdf-tools on any window-system
5f28f0db73 Fix bug with min and max and NaNs
37b5e661d2 Fix recently-introduced copy-directory bug
6bbbc38b34 Merge from Gnulib
57249fb297 Fix compatibility problem in Tramp
411bec82c4 Avoid GCC 7 compilation warning in eval.c
34a6774daa ; Partially revert c3445aed5194
Diffstat (limited to 'test/src')
| -rw-r--r-- | test/src/data-tests.el | 6 | ||||
| -rw-r--r-- | test/src/editfns-tests.el | 8 | ||||
| -rw-r--r-- | test/src/fileio-tests.el | 2 | ||||
| -rw-r--r-- | test/src/lcms-tests.el | 37 |
4 files changed, 47 insertions, 6 deletions
diff --git a/test/src/data-tests.el b/test/src/data-tests.el index 5dc26348a6f..8de8c145d40 100644 --- a/test/src/data-tests.el +++ b/test/src/data-tests.el | |||
| @@ -101,7 +101,11 @@ | |||
| 101 | (should (= 3 (apply #'min '(3 8 3)))) | 101 | (should (= 3 (apply #'min '(3 8 3)))) |
| 102 | (should-error (min 9 8 'foo)) | 102 | (should-error (min 9 8 'foo)) |
| 103 | (should-error (min (make-marker))) | 103 | (should-error (min (make-marker))) |
| 104 | (should (eql 1 (min (point-min-marker) 1)))) | 104 | (should (eql 1 (min (point-min-marker) 1))) |
| 105 | (should (isnan (min 0.0e+NaN))) | ||
| 106 | (should (isnan (min 0.0e+NaN 1 2))) | ||
| 107 | (should (isnan (min 1.0 0.0e+NaN))) | ||
| 108 | (should (isnan (min 1.0 0.0e+NaN 1.1)))) | ||
| 105 | 109 | ||
| 106 | ;; Bool vector tests. Compactly represent bool vectors as hex | 110 | ;; Bool vector tests. Compactly represent bool vectors as hex |
| 107 | ;; strings. | 111 | ;; strings. |
diff --git a/test/src/editfns-tests.el b/test/src/editfns-tests.el index 1c3fde888f6..70dc9372fad 100644 --- a/test/src/editfns-tests.el +++ b/test/src/editfns-tests.el | |||
| @@ -166,6 +166,14 @@ | |||
| 166 | (should (string-equal | 166 | (should (string-equal |
| 167 | (format-time-string format look '(-28800 "PST")) | 167 | (format-time-string format look '(-28800 "PST")) |
| 168 | "1972-06-30 15:59:59.999 -0800 (PST)")) | 168 | "1972-06-30 15:59:59.999 -0800 (PST)")) |
| 169 | ;; Negative UTC offset, as a Lisp integer. | ||
| 170 | (should (string-equal | ||
| 171 | (format-time-string format look -28800) | ||
| 172 | ;; MS-Windows build replaces unrecognizable TZ values, | ||
| 173 | ;; such as "-08", with "ZZZ". | ||
| 174 | (if (eq system-type 'windows-nt) | ||
| 175 | "1972-06-30 15:59:59.999 -0800 (ZZZ)" | ||
| 176 | "1972-06-30 15:59:59.999 -0800 (-08)"))) | ||
| 169 | ;; Positive UTC offset that is not an hour multiple, as a string. | 177 | ;; Positive UTC offset that is not an hour multiple, as a string. |
| 170 | (should (string-equal | 178 | (should (string-equal |
| 171 | (format-time-string format look "IST-5:30") | 179 | (format-time-string format look "IST-5:30") |
diff --git a/test/src/fileio-tests.el b/test/src/fileio-tests.el index a56fb4474d6..01c280d2752 100644 --- a/test/src/fileio-tests.el +++ b/test/src/fileio-tests.el | |||
| @@ -35,6 +35,8 @@ | |||
| 35 | (char 0)) | 35 | (char 0)) |
| 36 | (while (and (not failure) (< char 127)) | 36 | (while (and (not failure) (< char 127)) |
| 37 | (setq char (1+ char)) | 37 | (setq char (1+ char)) |
| 38 | (when (and (eq system-type 'cygwin) (eq char 92)) | ||
| 39 | (setq char (1+ char))) | ||
| 38 | (setq failure (try-link (string char) link))) | 40 | (setq failure (try-link (string char) link))) |
| 39 | (or failure | 41 | (or failure |
| 40 | (try-link "/:" link))) | 42 | (try-link "/:" link))) |
diff --git a/test/src/lcms-tests.el b/test/src/lcms-tests.el index 3d0942c8d15..d6d1d16b9ad 100644 --- a/test/src/lcms-tests.el +++ b/test/src/lcms-tests.el | |||
| @@ -21,9 +21,11 @@ | |||
| 21 | 21 | ||
| 22 | ;;; Commentary: | 22 | ;;; Commentary: |
| 23 | 23 | ||
| 24 | ;; Some "exact" values computed using the colorspacious python library | 24 | ;; Some reference values computed using the colorspacious python |
| 25 | ;; written by Nathaniel J. Smith. See | 25 | ;; library, assimilated from its test suite, or adopted from its |
| 26 | ;; https://colorspacious.readthedocs.io/en/v1.1.0/ | 26 | ;; aggregation of gold values. |
| 27 | ;; See https://colorspacious.readthedocs.io/en/v1.1.0/ and | ||
| 28 | ;; https://github.com/njsmith/colorspacious | ||
| 27 | 29 | ||
| 28 | ;; Other references: | 30 | ;; Other references: |
| 29 | ;; http://www.babelcolor.com/index_htm_files/A%20review%20of%20RGB%20color%20spaces.pdf | 31 | ;; http://www.babelcolor.com/index_htm_files/A%20review%20of%20RGB%20color%20spaces.pdf |
| @@ -49,6 +51,11 @@ B is considered the exact value." | |||
| 49 | (lcms-approx-p a2 b2 delta) | 51 | (lcms-approx-p a2 b2 delta) |
| 50 | (lcms-approx-p a3 b3 delta)))) | 52 | (lcms-approx-p a3 b3 delta)))) |
| 51 | 53 | ||
| 54 | (defun lcms-rgb255->xyz (rgb) | ||
| 55 | "Return XYZ tristimulus values corresponding to RGB." | ||
| 56 | (let ((rgb1 (mapcar (lambda (x) (/ x 255.0)) rgb))) | ||
| 57 | (apply #'color-srgb-to-xyz rgb1))) | ||
| 58 | |||
| 52 | (ert-deftest lcms-cri-cam02-ucs () | 59 | (ert-deftest lcms-cri-cam02-ucs () |
| 53 | "Test use of `lcms-cam02-ucs'." | 60 | "Test use of `lcms-cam02-ucs'." |
| 54 | (skip-unless (featurep 'lcms2)) | 61 | (skip-unless (featurep 'lcms2)) |
| @@ -56,8 +63,8 @@ B is considered the exact value." | |||
| 56 | (should-error (lcms-cam02-ucs '(0 0 0) 'error)) | 63 | (should-error (lcms-cam02-ucs '(0 0 0) 'error)) |
| 57 | (should-not | 64 | (should-not |
| 58 | (lcms-approx-p | 65 | (lcms-approx-p |
| 59 | (let ((lcms-d65-xyz '(0.44757 1.0 0.40745))) | 66 | (let ((wp '(0.44757 1.0 0.40745))) |
| 60 | (lcms-cam02-ucs '(0.5 0.5 0.5) '(0 0 0))) | 67 | (lcms-cam02-ucs '(0.5 0.5 0.5) '(0 0 0) wp)) |
| 61 | (lcms-cam02-ucs '(0.5 0.5 0.5) '(0 0 0)))) | 68 | (lcms-cam02-ucs '(0.5 0.5 0.5) '(0 0 0)))) |
| 62 | (should (eql 0.0 (lcms-cam02-ucs '(0.5 0.5 0.5) '(0.5 0.5 0.5)))) | 69 | (should (eql 0.0 (lcms-cam02-ucs '(0.5 0.5 0.5) '(0.5 0.5 0.5)))) |
| 63 | (should | 70 | (should |
| @@ -87,4 +94,24 @@ B is considered the exact value." | |||
| 87 | (apply #'color-xyz-to-xyy (lcms-temp->white-point 7504)) | 94 | (apply #'color-xyz-to-xyy (lcms-temp->white-point 7504)) |
| 88 | '(0.29902 0.31485 1.0)))) | 95 | '(0.29902 0.31485 1.0)))) |
| 89 | 96 | ||
| 97 | (ert-deftest lcms-dE-cam02-ucs-silver () | ||
| 98 | "Test CRI-CAM02-UCS deltaE metric values from colorspacious." | ||
| 99 | (skip-unless (featurep 'lcms2)) | ||
| 100 | (should | ||
| 101 | (lcms-approx-p | ||
| 102 | (lcms-cam02-ucs (lcms-rgb255->xyz '(173 52 52)) | ||
| 103 | (lcms-rgb255->xyz '(59 120 51)) | ||
| 104 | lcms-colorspacious-d65 | ||
| 105 | (list 20 (/ 64 float-pi 5) 1 1)) | ||
| 106 | 44.698469808449964 | ||
| 107 | 0.03)) | ||
| 108 | (should | ||
| 109 | (lcms-approx-p | ||
| 110 | (lcms-cam02-ucs (lcms-rgb255->xyz '(69 100 52)) | ||
| 111 | (lcms-rgb255->xyz '(59 120 51)) | ||
| 112 | lcms-colorspacious-d65 | ||
| 113 | (list 20 (/ 64 float-pi 5) 1 1)) | ||
| 114 | 8.503323264883667 | ||
| 115 | 0.04))) | ||
| 116 | |||
| 90 | ;;; lcms-tests.el ends here | 117 | ;;; lcms-tests.el ends here |