tests: add tests for unicode case conversion issues
Changes submitted by Vladimir Sedach to the ecl-devel mailing list.
This commit is contained in:
parent
04aa7c539e
commit
4cac9bc5e0
3 changed files with 44 additions and 1 deletions
|
|
@ -25,6 +25,7 @@
|
|||
(:file "package-extensions")
|
||||
(:file "hash-tables")
|
||||
(:file "external-formats" :if-feature :unicode)
|
||||
(:file "unicode" :if-feature :unicode)
|
||||
(:file "complex")))
|
||||
(:module stress-tests
|
||||
:default-component-class asdf:cl-source-file.lsp
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
;;;; Declare the suites
|
||||
(suite 'make-check
|
||||
'(executable ieee-fp eprocess package-ext hash-tables ansi+ mixed
|
||||
cmp emb ffi mop run-program mp complex))
|
||||
cmp emb ffi mop run-program mp complex #+unicode unicode))
|
||||
|
||||
(suite 'ecl-tests
|
||||
'(make-check eformat))
|
||||
|
|
|
|||
42
src/tests/normal-tests/unicode.lsp
Normal file
42
src/tests/normal-tests/unicode.lsp
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
;;;; -*- encoding:utf-8; Mode: Lisp; Syntax: Common-Lisp; indent-tabs-mode: nil -*-
|
||||
;;;; vim: set filetype=lisp tabstop=8 shiftwidth=2 expandtab:
|
||||
|
||||
;;;; Author: Vladimir Sedach <vas@oneofus.la>
|
||||
;;;; Created: 2020-05-03
|
||||
;;;; Contains: Unicode handling in the compiler and runtime
|
||||
|
||||
(in-package :cl-test)
|
||||
|
||||
(suite 'unicode)
|
||||
|
||||
;;; Date: 2020-05-03
|
||||
;;; From: Vladimir Sedach <vas@oneofus.la>
|
||||
;;; Fixed: 2020-05-03 (Vladimir Sedach)
|
||||
;;; Description:
|
||||
;;;
|
||||
;;; Compiler does not handle non-ASCII symbols correctly when
|
||||
;;; READTABLE-CASE is :INVERT
|
||||
;;;
|
||||
(test unicode.0001.compiler-unicode-inverted-case
|
||||
(let ((test-readtable (copy-readtable)))
|
||||
(dolist (case '(:invert :upcase :downcase :preserve))
|
||||
(setf (readtable-case test-readtable) case)
|
||||
(let ((*readtable* test-readtable))
|
||||
(is (= 3
|
||||
(funcall
|
||||
(compile nil
|
||||
(cons 'lambda
|
||||
(read-from-string "((𝛅 𝛜) (+ 𝛅 𝛜))")))
|
||||
1 2)))))))
|
||||
|
||||
;;; Date: 2020-05-03
|
||||
;;; From: Vladimir Sedach <vas@oneofus.la>
|
||||
;;; Fixed: 2020-05-03 (Vladimir Sedach)
|
||||
;;; Description:
|
||||
;;;
|
||||
;;; Pathname :common case conversion fails on Unicode pathnames
|
||||
;;;
|
||||
(test unicode.0002.pathname-common-unicode
|
||||
(is (equal
|
||||
"ДАННЫЕ"
|
||||
(pathname-name (pathname "/tmp/данные.txt") :case :common))))
|
||||
Loading…
Add table
Reference in a new issue