summaryrefslogtreecommitdiff
path: root/test/src/coding-tests.el
diff options
context:
space:
mode:
authorMattias EngdegÄrd <mattiase@acm.org>2020-04-09 16:19:14 +0200
committerMattias EngdegÄrd <mattiase@acm.org>2020-04-09 16:20:15 +0200
commite18c24b35a7cf9bb1b91288b706fa448ed28a7c2 (patch)
tree6fdab5cd6b6b8101f629bada4eeaea2e6303c6a3 /test/src/coding-tests.el
parent50618cc30381521f0e16c7813d48d0e5c821a076 (diff)
downloademacs-e18c24b35a7cf9bb1b91288b706fa448ed28a7c2.tar.gz
Set last-coding-system-used upon ASCII conversion bypass (bug#40407)
Spotted by Kazuhiro Ito. * src/coding.c (code_convert_string): Set Vlast_coding_system if appropriate. * test/src/coding-tests.el (coding-nocopy-ascii): Add test.
Diffstat (limited to 'test/src/coding-tests.el')
-rw-r--r--test/src/coding-tests.el3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/src/coding-tests.el b/test/src/coding-tests.el
index 9f6fac3edd8..a741e233d39 100644
--- a/test/src/coding-tests.el
+++ b/test/src/coding-tests.el
@@ -393,7 +393,8 @@
(should-not (eq (decode-coding-string s coding nil) s))
(should-not (eq (encode-coding-string s coding nil) s))
(should (eq (decode-coding-string s coding t) s))
- (should (eq (encode-coding-string s coding t) s)))
+ (should (eq (encode-coding-string s coding t) s))
+ (should (eq last-coding-system-used coding)))
;; With EOL conversion inhibited.
(let ((inhibit-eol-conversion t))