File: zipcode-test.el

package info (click to toggle)
skkdic 20230109-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 33,844 kB
  • sloc: asm: 3,379; makefile: 274; lisp: 209; sh: 49
file content (63 lines) | stat: -rw-r--r-- 2,768 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
;;; zipcode-test.el --- X֔ԍeXg -*- mode: emacs-lisp; coding: japanese-shift-jis-2004; -*-

;; Copyright (C) 2020 Tsuyoshi Kitamoto  <tsuyoshi.kitamoto@gmail.com>
;; Author: 2020 Tsuyoshi Kitamoto  <tsuyoshi.kitamoto@gmail.com>

;; This program is free software; you can redistribute it and/or
;; modify it under the terms of the GNU General Public License as
;; published by the Free Software Foundation; either version 2, or
;; (at your option) any later version.

;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
;; General Public License for more details.

;; You should have received a copy of the GNU General Public License
;; along with this program, If not, see <http://www.gnu.org/licenses/>.

;;; Commentary:

;;; Code:

(require 'ert)

;; ken_all.csv
;;   26102,"602  ","6020033","","ļзޮ","޶","s{",
;;   "ss㋞","o쒬iGےʍoAGےʍo쉺AoʉGې",0,0,0,0,0,0

;; ZIPCODE-MK
;;   mkdic-process-kyoto()

;; SKK-JISYO.zipcode
;; 6020033 /s{ss㋞Gےʍo鍡o쒬
;;         /s{ss㋞Gےʍo쉺鍡o쒬
;;         /s{ss㋞捡oʉGېo쒬
;;         /s{ss㋞捡oʎo쒬/

(ert-deftest jisyo-zipcode/test1 ()
  (should
   (string-equal "s{ss㋞Gےʍo鍡o쒬/s{ss㋞Gےʍo쉺鍡o쒬/s{ss㋞捡oʉGېo쒬/s{ss㋞捡oʎo쒬/"
                 (with-temp-buffer
                   (let ((large-file-warning-threshold 20000000)
	                 (coding-system-for-read 'euc-jp))
                     (insert-file-contents (expand-file-name "SKK-JISYO.zipcode" "./"))
                     (goto-char (point-min))
                     (search-forward "6020033 /")
                     (buffer-substring (point)
                                       (progn (end-of-line) (point))))))))

;; ɑȂłKR͂ȂBړ]Ȃł낤ƏƂđIł݂B
(ert-deftest jisyo-office-zipcode/test1 ()
  (should
   (string-equal " @ scւQڂP|Q/"
                 (with-temp-buffer
                   (let ((large-file-warning-threshold 20000000)
	                 (coding-system-for-read 'euc-jp))
                     (insert-file-contents (expand-file-name "SKK-JISYO.office.zipcode" "./"))
                     (goto-char (point-min))
                     (search-forward "1008926 /")
                     (buffer-substring (point)
                                       (progn (end-of-line) (point))))))))

;;; zipcode-test.el ends here