2020-02-29 05:57:09 +09:00
|
|
|
|
;;; zipcode-test.el --- <20>X<EFBFBD>֔ԍ<D694><D48D><EFBFBD><EFBFBD><EFBFBD><EFBFBD>e<EFBFBD>X<EFBFBD>g -*- mode: emacs-lisp; coding: japanese-shift-jis-2004; -*-
|
|
|
|
|
|
|
2020-03-07 14:20:33 +09:00
|
|
|
|
;; 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/>.
|
|
|
|
|
|
|
2020-02-29 05:57:09 +09:00
|
|
|
|
;;; Commentary:
|
|
|
|
|
|
|
|
|
|
|
|
;;; Code:
|
|
|
|
|
|
|
|
|
|
|
|
(require 'ert)
|
|
|
|
|
|
|
|
|
|
|
|
;; ken_all.csv
|
|
|
|
|
|
;; 26102,"602 ","6020033","<22><><EFBFBD><EFBFBD><EFBFBD>","<22><><EFBFBD>ļ<EFBFBD>зޮ<D0B7><DEAE>","<22><><EFBFBD><EFBFBD><DEB6><EFBFBD><EFBFBD><EFBFBD>","<22><><EFBFBD>s<EFBFBD>{",
|
|
|
|
|
|
;; "<22><><EFBFBD>s<EFBFBD>s<EFBFBD>㋞<E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BFBD><EFBFBD><EFBFBD><EFBFBD>o<EFBFBD>쒬/
|
|
|
|
|
|
|
|
|
|
|
|
(ert-deftest jisyo-zipcode/test1 ()
|
|
|
|
|
|
(should
|
|
|
|
|
|
(string-equal "<EFBFBD><EFBFBD><EFBFBD>s<EFBFBD>{<7B><><EFBFBD>s<EFBFBD>s<EFBFBD>㋞<EFBFBD><E38B9E><EFBFBD>G<EFBFBD>ےʍ<DB92><CA8D>o<EFBFBD><6F><EFBFBD><EFBFBD><EFBFBD>鍡<EFBFBD>o<EFBFBD>쒬/<2F><><EFBFBD>s<EFBFBD>{<7B><><EFBFBD>s<EFBFBD>s<EFBFBD>㋞<EFBFBD><E38B9E><EFBFBD>G<EFBFBD>ےʍ<DB92><CA8D>o<EFBFBD>쉺<EFBFBD>鍡<EFBFBD>o<EFBFBD>쒬/<2F><><EFBFBD>s<EFBFBD>{<7B><><EFBFBD>s<EFBFBD>s<EFBFBD>㋞<EFBFBD>捡<EFBFBD>o<EFBFBD><6F><EFBFBD>ʉG<CA89>ې<EFBFBD><DB90><EFBFBD><EFBFBD><EFBFBD><EFBFBD>o<EFBFBD>쒬/<2F><><EFBFBD>s<EFBFBD>{<7B><><EFBFBD>s<EFBFBD>s<EFBFBD>㋞<EFBFBD>捡<EFBFBD>o<EFBFBD><6F><EFBFBD>ʎ<EFBFBD><CA8E><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>o<EFBFBD>쒬/"
|
|
|
|
|
|
(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))))))))
|
|
|
|
|
|
|
|
|
|
|
|
;; <20><><EFBFBD>ɑ<EFBFBD><C991><EFBFBD><EFBFBD>Ȃł<C882><C582><EFBFBD><EFBFBD>K<EFBFBD>R<EFBFBD><52><EFBFBD>͂Ȃ<CD82><C882>B<EFBFBD>ړ]<5D><><EFBFBD>Ȃ<EFBFBD><C882>ł<EFBFBD><C582>낤<EFBFBD><EB82A4><EFBFBD>Ə<EFBFBD><C68F>Ƃ<EFBFBD><C682>đI<C491><49><EFBFBD>ł݂<C582><DD82><EFBFBD><EFBFBD><EFBFBD><EFBFBD>B
|
|
|
|
|
|
(ert-deftest jisyo-office-zipcode/test1 ()
|
|
|
|
|
|
(should
|
|
|
|
|
|
(string-equal "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> @ <20><><EFBFBD><EFBFBD><EFBFBD>s<EFBFBD><73><EFBFBD><EFBFBD><EFBFBD>c<EFBFBD><63><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ւQ<D682><51><EFBFBD>ڂP<DA82>|<7C>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
|