aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2022-10-04 19:15:17 +0300
committerEli Zaretskii2022-10-04 19:15:17 +0300
commitdb6072f530744fff3f5da50d26b91e2b5185fd84 (patch)
treea50c960025937b0ea1ffc296fa1f3fd1366eda13
parenta36ecc408a30c76d287351b38956f998f84cb8a7 (diff)
downloademacs-db6072f530744fff3f5da50d26b91e2b5185fd84.tar.gz
emacs-db6072f530744fff3f5da50d26b91e2b5185fd84.zip
Revert "Improve manual display tests of undisplayable chars (bug#58168)"
This reverts commit 849b7756fd31a69791e67dfe010b1e10f0168c83. Please don't rush installing changes that are still being discussed.
-rw-r--r--test/manual/redisplay-testsuite.el35
1 files changed, 8 insertions, 27 deletions
diff --git a/test/manual/redisplay-testsuite.el b/test/manual/redisplay-testsuite.el
index 5495146b872..01b0a895a42 100644
--- a/test/manual/redisplay-testsuite.el
+++ b/test/manual/redisplay-testsuite.el
@@ -305,7 +305,7 @@ static unsigned char x_bits[] = {0xff, 0x81, 0xbd, 0xa5, 0xa5, 0xbd, 0x81, 0xff
305 (let ((label (if display-raw-bytes-as-hex "\\x80" "\\200"))) 305 (let ((label (if display-raw-bytes-as-hex "\\x80" "\\200")))
306 (overlay-put test-redisplay-5a-expected-overlay 'display 306 (overlay-put test-redisplay-5a-expected-overlay 'display
307 (propertize label 'face 'escape-glyph))) 307 (propertize label 'face 'escape-glyph)))
308 (let ((label (if display-raw-bytes-as-hex "\\xfc" "\\374"))) 308 (let ((label (if display-raw-bytes-as-hex "\\x3fffc" "\\777774")))
309 (overlay-put test-redisplay-5b-expected-overlay 'display 309 (overlay-put test-redisplay-5b-expected-overlay 'display
310 (propertize label 'face 'escape-glyph)))) 310 (propertize label 'face 'escape-glyph))))
311 311
@@ -320,36 +320,18 @@ static unsigned char x_bits[] = {0xff, 0x81, 0xbd, 0xa5, 0xa5, 0xbd, 0x81, 0xff
320 (test-insert-overlay " " 'display "\200")) 320 (test-insert-overlay " " 'display "\200"))
321 (insert "\n\n") 321 (insert "\n\n")
322 (insert " Expected: ") 322 (insert " Expected: ")
323 ;; This tests a large codepoint, to make sure the internal buffer we
324 ;; use to produce the representation is large enough.
325 (aset printable-chars #x3fffc nil)
323 (setq test-redisplay-5b-expected-overlay 326 (setq test-redisplay-5b-expected-overlay
324 (test-insert-overlay " " 'display 327 (test-insert-overlay " " 'display
325 (propertize "\\374" 'face 'escape-glyph))) 328 (propertize "\\777774" 'face 'escape-glyph)))
326 (insert "\n Result: ") 329 (insert "\n Result: ")
327 (setq test-redisplay-5b-result-overlay 330 (setq test-redisplay-5b-result-overlay
328 (test-insert-overlay " " 'display (char-to-string #x3ffffc))) 331 (test-insert-overlay " " 'display (char-to-string #x3fffc)))
329 (insert "\n\n")
330 (insert-button "Toggle between octal and hex display for raw bytes"
331 'action 'test-redisplay-5-toggle)
332 (insert "\n\n"))
333
334(defun test-redisplay-6 ()
335 (insert "Test 6: Display of unprintable Unicode chars:\n\n")
336 (insert " Expected: ")
337 (test-insert-overlay " " 'display
338 (propertize "\\200" 'face 'escape-glyph))
339 (insert " (representing U+0100)")
340 (insert "\n Result: ")
341 (test-insert-overlay " " 'display "\u0080")
342 (insert "\n\n") 332 (insert "\n\n")
343 ;; This tests a large codepoint, to make sure the internal buffer we 333 (insert-button "Toggle between octal and hex display"
344 ;; use to produce the representation is large enough. 334 'action 'test-redisplay-5-toggle))
345 (insert " Expected: ")
346 (aset printable-chars #x10abcd nil)
347 (test-insert-overlay " " 'display
348 (propertize "\\4125715" 'face 'escape-glyph))
349 (insert " (representing U+0010ABCD)")
350 (insert "\n Result: ")
351 (test-insert-overlay " " 'display "\U0010ABCD")
352 (insert "\n\n"))
353 335
354(defun test-redisplay () 336(defun test-redisplay ()
355 (interactive) 337 (interactive)
@@ -367,7 +349,6 @@ static unsigned char x_bits[] = {0xff, 0x81, 0xbd, 0xa5, 0xa5, 0xbd, 0x81, 0xff
367 (test-redisplay-3) 349 (test-redisplay-3)
368 (test-redisplay-4) 350 (test-redisplay-4)
369 (test-redisplay-5) 351 (test-redisplay-5)
370 (test-redisplay-6)
371 (goto-char (point-min)))) 352 (goto-char (point-min))))
372 353
373;;; redisplay-testsuite.el ends here 354;;; redisplay-testsuite.el ends here