emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/boxy 792192b 3/8: Test chinese characters


From: ELPA Syncer
Subject: [elpa] externals/boxy 792192b 3/8: Test chinese characters
Date: Wed, 13 Oct 2021 15:57:09 -0400 (EDT)

branch: externals/boxy
commit 792192b56b0a022a6831a90b1f4b35c8bfed0aa3
Author: Tyler Grinn <tylergrinn@gmail.com>
Commit: Tyler Grinn <tylergrinn@gmail.com>

    Test chinese characters
---
 tests/boxy-test-chinese.el | 51 ++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 51 insertions(+)

diff --git a/tests/boxy-test-chinese.el b/tests/boxy-test-chinese.el
new file mode 100644
index 0000000..0d9f30e
--- /dev/null
+++ b/tests/boxy-test-chinese.el
@@ -0,0 +1,51 @@
+;;; boxy-test-chinese.el --- Chinese test cases for boxy -*- lexical-binding: 
t -*-
+
+;; Copyright (C) 2021 Free Software Foundation, Inc.
+
+;; Author: Tyler Grinn <tylergrinn@gmail.com>
+
+;;; Code:
+
+;;;; Requirements
+
+(require 'boxy-test-setup)
+
+;;;; Tests
+
+(ert-deftest boxy-test-chinese-hello ()
+  (let* ((world (boxy-box))
+         (thing (boxy-box :name "thing" :margin-y 0))
+         (hello (boxy-box :name "你好" :rel "in")))
+    (boxy-add-next thing world)
+    (boxy-add-next hello thing)
+    (boxy-pp world)
+    (with-current-buffer (get-buffer "*Boxy*")
+      (should (string= (buffer-string)
+           "
+╭──────╮
+│thing │
+│╭────╮│
+││你好││
+│╰────╯│
+╰──────╯
+")))))
+
+(ert-deftest boxy-test-chinese-greeting ()
+  (let* ((world (boxy-box))
+         (greeting (boxy-box :name "我叫泰勒" :margin-y 0))
+         (hello (boxy-box :name "你好" :rel "in")))
+    (boxy-add-next greeting world)
+    (boxy-add-next hello greeting)
+    (boxy-pp world)
+    (with-current-buffer (get-buffer "*Boxy*")
+      (should (string= (buffer-string)
+           "
+╭────────╮
+│我叫泰勒│
+│╭────╮  │
+││你好│  │
+│╰────╯  │
+╰────────╯
+")))))
+
+



reply via email to

[Prev in Thread] Current Thread [Next in Thread]