aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--test/automated/Makefile.in8
-rw-r--r--test/automated/flymake-tests.el1
-rw-r--r--test/automated/python-tests.el21
-rw-r--r--test/automated/tildify-tests.el3
4 files changed, 25 insertions, 8 deletions
diff --git a/test/automated/Makefile.in b/test/automated/Makefile.in
index 174b3b6dffe..59a88663e2a 100644
--- a/test/automated/Makefile.in
+++ b/test/automated/Makefile.in
@@ -52,9 +52,15 @@ unexport EMACSDATA EMACSDOC EMACSPATH GREP_OPTIONS
52## To run tests under a debugger, set this to eg: "gdb --args". 52## To run tests under a debugger, set this to eg: "gdb --args".
53GDB = 53GDB =
54 54
55# The locale to run tests under. Tests should work if this is set to
56# any supported locale. Use the C locale by default, as it should be
57# supported everywhere.
58TEST_LOCALE = C
59
55# The actual Emacs command run in the targets below. 60# The actual Emacs command run in the targets below.
56# Prevent any setting of EMACSLOADPATH in user environment causing problems. 61# Prevent any setting of EMACSLOADPATH in user environment causing problems.
57emacs = EMACSLOADPATH= LC_ALL=C EMACS_TEST_DIRECTORY=$(srcdir) $(GDB) "$(EMACS)" $(EMACSOPT) 62emacs = EMACSLOADPATH= LC_ALL=$(TEST_LOCALE) EMACS_TEST_DIRECTORY=$(srcdir) \
63 $(GDB) "$(EMACS)" $(EMACSOPT)
58 64
59.PHONY: all check 65.PHONY: all check
60 66
diff --git a/test/automated/flymake-tests.el b/test/automated/flymake-tests.el
index 23dbb3d010c..a77c31638a5 100644
--- a/test/automated/flymake-tests.el
+++ b/test/automated/flymake-tests.el
@@ -34,6 +34,7 @@
34(defun flymake-tests--current-face (file predicate) 34(defun flymake-tests--current-face (file predicate)
35 (let ((buffer (find-file-noselect 35 (let ((buffer (find-file-noselect
36 (expand-file-name file flymake-tests-data-directory))) 36 (expand-file-name file flymake-tests-data-directory)))
37 (process-environment (cons "LC_ALL=C" process-environment))
37 (i 0)) 38 (i 0))
38 (unwind-protect 39 (unwind-protect
39 (with-current-buffer buffer 40 (with-current-buffer buffer
diff --git a/test/automated/python-tests.el b/test/automated/python-tests.el
index 219f99eed62..d9b4c3e1b06 100644
--- a/test/automated/python-tests.el
+++ b/test/automated/python-tests.el
@@ -2920,7 +2920,8 @@ and `python-shell-interpreter-args' in the new shell buffer."
2920 :type 'user-error))) 2920 :type 'user-error)))
2921 (should 2921 (should
2922 (string= (cadr error-data) 2922 (string= (cadr error-data)
2923 "Invalid regexp \\( in `python-shell-prompt-input-regexps'")))) 2923 (format-message
2924 "Invalid regexp \\( in `python-shell-prompt-input-regexps'")))))
2924 2925
2925(ert-deftest python-shell-prompt-validate-regexps-2 () 2926(ert-deftest python-shell-prompt-validate-regexps-2 ()
2926 "Check `python-shell-prompt-output-regexps' are validated." 2927 "Check `python-shell-prompt-output-regexps' are validated."
@@ -2929,7 +2930,8 @@ and `python-shell-interpreter-args' in the new shell buffer."
2929 :type 'user-error))) 2930 :type 'user-error)))
2930 (should 2931 (should
2931 (string= (cadr error-data) 2932 (string= (cadr error-data)
2932 "Invalid regexp \\( in `python-shell-prompt-output-regexps'")))) 2933 (format-message
2934 "Invalid regexp \\( in `python-shell-prompt-output-regexps'")))))
2933 2935
2934(ert-deftest python-shell-prompt-validate-regexps-3 () 2936(ert-deftest python-shell-prompt-validate-regexps-3 ()
2935 "Check `python-shell-prompt-regexp' is validated." 2937 "Check `python-shell-prompt-regexp' is validated."
@@ -2938,7 +2940,8 @@ and `python-shell-interpreter-args' in the new shell buffer."
2938 :type 'user-error))) 2940 :type 'user-error)))
2939 (should 2941 (should
2940 (string= (cadr error-data) 2942 (string= (cadr error-data)
2941 "Invalid regexp \\( in `python-shell-prompt-regexp'")))) 2943 (format-message
2944 "Invalid regexp \\( in `python-shell-prompt-regexp'")))))
2942 2945
2943(ert-deftest python-shell-prompt-validate-regexps-4 () 2946(ert-deftest python-shell-prompt-validate-regexps-4 ()
2944 "Check `python-shell-prompt-block-regexp' is validated." 2947 "Check `python-shell-prompt-block-regexp' is validated."
@@ -2947,7 +2950,8 @@ and `python-shell-interpreter-args' in the new shell buffer."
2947 :type 'user-error))) 2950 :type 'user-error)))
2948 (should 2951 (should
2949 (string= (cadr error-data) 2952 (string= (cadr error-data)
2950 "Invalid regexp \\( in `python-shell-prompt-block-regexp'")))) 2953 (format-message
2954 "Invalid regexp \\( in `python-shell-prompt-block-regexp'")))))
2951 2955
2952(ert-deftest python-shell-prompt-validate-regexps-5 () 2956(ert-deftest python-shell-prompt-validate-regexps-5 ()
2953 "Check `python-shell-prompt-pdb-regexp' is validated." 2957 "Check `python-shell-prompt-pdb-regexp' is validated."
@@ -2956,7 +2960,8 @@ and `python-shell-interpreter-args' in the new shell buffer."
2956 :type 'user-error))) 2960 :type 'user-error)))
2957 (should 2961 (should
2958 (string= (cadr error-data) 2962 (string= (cadr error-data)
2959 "Invalid regexp \\( in `python-shell-prompt-pdb-regexp'")))) 2963 (format-message
2964 "Invalid regexp \\( in `python-shell-prompt-pdb-regexp'")))))
2960 2965
2961(ert-deftest python-shell-prompt-validate-regexps-6 () 2966(ert-deftest python-shell-prompt-validate-regexps-6 ()
2962 "Check `python-shell-prompt-output-regexp' is validated." 2967 "Check `python-shell-prompt-output-regexp' is validated."
@@ -2965,7 +2970,8 @@ and `python-shell-interpreter-args' in the new shell buffer."
2965 :type 'user-error))) 2970 :type 'user-error)))
2966 (should 2971 (should
2967 (string= (cadr error-data) 2972 (string= (cadr error-data)
2968 "Invalid regexp \\( in `python-shell-prompt-output-regexp'")))) 2973 (format-message
2974 "Invalid regexp \\( in `python-shell-prompt-output-regexp'")))))
2969 2975
2970(ert-deftest python-shell-prompt-validate-regexps-7 () 2976(ert-deftest python-shell-prompt-validate-regexps-7 ()
2971 "Check default regexps are valid." 2977 "Check default regexps are valid."
@@ -2982,7 +2988,8 @@ and `python-shell-interpreter-args' in the new shell buffer."
2982 :type 'user-error))) 2988 :type 'user-error)))
2983 (should 2989 (should
2984 (string= (cadr error-data) 2990 (string= (cadr error-data)
2985 "Invalid regexp \\( in `python-shell-prompt-output-regexp'")))) 2991 (format-message
2992 "Invalid regexp \\( in `python-shell-prompt-output-regexp'")))))
2986 2993
2987(ert-deftest python-shell-prompt-set-calculated-regexps-2 () 2994(ert-deftest python-shell-prompt-set-calculated-regexps-2 ()
2988 "Check `python-shell-prompt-input-regexps' are set." 2995 "Check `python-shell-prompt-input-regexps' are set."
diff --git a/test/automated/tildify-tests.el b/test/automated/tildify-tests.el
index b53f58c279e..788abe7f731 100644
--- a/test/automated/tildify-tests.el
+++ b/test/automated/tildify-tests.el
@@ -55,6 +55,7 @@ If IS-XML is non-nil, <pre> tag is not treated specially."
55INPUT is the initial content of the buffer and EXPECTED is expected result 55INPUT is the initial content of the buffer and EXPECTED is expected result
56after `tildify-buffer' is run." 56after `tildify-buffer' is run."
57 (with-temp-buffer 57 (with-temp-buffer
58 (setq-local buffer-file-coding-system 'utf-8)
58 (dolist (mode modes) 59 (dolist (mode modes)
59 (erase-buffer) 60 (erase-buffer)
60 (funcall mode) 61 (funcall mode)
@@ -187,6 +188,7 @@ The function must terminate as soon as callback returns nil."
187 188
188(defun tildify-space-test--test (modes nbsp env-open &optional set-space-string) 189(defun tildify-space-test--test (modes nbsp env-open &optional set-space-string)
189 (with-temp-buffer 190 (with-temp-buffer
191 (setq-local buffer-file-coding-system 'utf-8)
190 (dolist (mode modes) 192 (dolist (mode modes)
191 (funcall mode) 193 (funcall mode)
192 (when set-space-string 194 (when set-space-string
@@ -226,6 +228,7 @@ The function must terminate as soon as callback returns nil."
226(defun tildify-space-undo-test--test 228(defun tildify-space-undo-test--test
227 (modes nbsp env-open &optional set-space-string) 229 (modes nbsp env-open &optional set-space-string)
228 (with-temp-buffer 230 (with-temp-buffer
231 (setq-local buffer-file-coding-system 'utf-8)
229 (dolist (mode modes) 232 (dolist (mode modes)
230 (funcall mode) 233 (funcall mode)
231 (when set-space-string 234 (when set-space-string