diff --git a/ansi-tests/aux.lsp b/ansi-tests/aux.lsp
index ff37580ae56c3c3ebde49493815ed0ef665bbd59..65a62af39dea097e96147f05b77b593f33ad8983 100644
--- a/ansi-tests/aux.lsp
+++ b/ansi-tests/aux.lsp
@@ -143,3 +143,10 @@ condition itself on other errors."
 
 (defun is-eq-p (x) #'(lambda (y) (eq x y)))
 (defun is-not-eq-p (x) #'(lambda (y) (not (eq x y))))
+
+(defun char-invertcase (c)
+  (if (upper-case-p c) (char-downcase c)
+    (char-upcase c)))
+
+(defun string-invertcase (s)
+  (map 'string #'char-invertcase s))