OSDN Git Service

work ti33950
[nvdajp/nvdajpmiscdep.git] / jptools / harness.py
index 7dcb999..69479dc 100644 (file)
@@ -82,6 +82,21 @@ tests = [
                'inpos':  [0,0,0,0,1,2,3,4,4,5,6,7,8,8,9,10,11,12,12,12,12,13,14,15,16,16,17,18,19,20,20,21,22],\r
                },\r
        {\r
+               'text': 'a\ta',\r
+               'input': 'a a',\r
+               'output': '⠰⠁ ⠰⠁',\r
+               },\r
+       {\r
+               'text': 'あ\tあ',\r
+               'input': 'ア ア',\r
+               'output': '⠁ ⠁',\r
+               },\r
+       {\r
+               'text': 'あ\u200bあ',\r
+               'input': 'ア ア',\r
+               'output': '⠁ ⠁',\r
+               },\r
+       {\r
                'text': 'ab 123 あab 123 あ',\r
                'input': 'ab 123 ア ab 123 ア',\r
                'output': '⠰⠁⠃ ⠼⠁⠃⠉ ⠁ ⠰⠁⠃ ⠼⠁⠃⠉ ⠁',\r
@@ -294,6 +309,8 @@ tests = [
                'inpos':  [0,0,0,1,2,3,4,5,5,5],\r
                'comment': 'Latinの 0x002D HYPHEN-MINUS は 0x2212 MUNUS SIGN に正規化しない',\r
                },\r
+       {'text':'ト゚', 'input':'ト'}, # U+309a\r
+       {'text':'ト ゚', 'input':'ト'}, # U+309a\r
        {\r
                'input': 'Aア',\r
                'output': '⠰⠠⠁⠤⠁',\r
@@ -548,18 +565,52 @@ tests = [
                'comment': 'braille space should be changed to 0x20.',\r
                },\r
        {\r
+               'text': '⠁⠂⠃⠄⠅⠆⠇⠈⠉⠊⠋⠌⠍⠎⠏⠐⠑⠒⠓⠔⠕⠖⠗⠘⠙⠚⠛⠜⠝⠞⠟',\r
                'input': '⠁⠂⠃⠄⠅⠆⠇⠈⠉⠊⠋⠌⠍⠎⠏⠐⠑⠒⠓⠔⠕⠖⠗⠘⠙⠚⠛⠜⠝⠞⠟',\r
                'output': '⠁⠂⠃⠄⠅⠆⠇⠈⠉⠊⠋⠌⠍⠎⠏⠐⠑⠒⠓⠔⠕⠖⠗⠘⠙⠚⠛⠜⠝⠞⠟',\r
                'inpos1': [0,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],\r
                'comment': 'braille code should not be changed.',\r
                },\r
        {\r
+               'text': '⠁⡀あ',\r
+               'input': '⠁⡀ア',\r
+               'output': '⠁⡀⠁',\r
+               'comment': 'braille code should not be changed.',\r
+               },\r
+       {\r
+               'text': '⠁⡀',\r
+               'input': '⠁⡀',\r
+               'output': '⠁⡀',\r
+               'comment': 'braille code should not be changed.',\r
+               },\r
+       {\r
+               'text': '⠁⡀ ',\r
+               'input': '⠁⡀ ',\r
+               'output': '⠁⡀ ',\r
+               'comment': 'braille code (with space) should not be changed.',\r
+               },\r
+       {\r
+               'text': '⠒⠓⠔⠕⠖⠗⠘⠙あ⠚⠛⠜⠝⠞⠟ ',\r
+               'input': '⠒⠓⠔⠕⠖⠗⠘⠙ア⠚⠛⠜⠝⠞⠟ ',\r
+               'comment': 'braille code (with space) should not be changed.',\r
+               },\r
+\r
+\r
+       {\r
+               'text': '⠠⠡⠢⠣⠤⠥⠦⠧⠨⠩⠪⠫⠬⠭⠮⠯⠰⠱⠲⠳⠴⠵⠶⠷⠸⠹⠺⠻⠼⠽⠾⠿',\r
                'input': '⠠⠡⠢⠣⠤⠥⠦⠧⠨⠩⠪⠫⠬⠭⠮⠯⠰⠱⠲⠳⠴⠵⠶⠷⠸⠹⠺⠻⠼⠽⠾⠿',\r
                'output': '⠠⠡⠢⠣⠤⠥⠦⠧⠨⠩⠪⠫⠬⠭⠮⠯⠰⠱⠲⠳⠴⠵⠶⠷⠸⠹⠺⠻⠼⠽⠾⠿',\r
                'inpos1': [0,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],\r
                'comment': 'braille code should not be changed.',\r
                },\r
        {\r
+               'text': '⡀⡁⡂⡃⡄⡅⡆⡇⡈⡉⡊⡋⡌⡍⡎⡏⡐⡑⡒⡓⡔⡕⡖⡗⡘⡙⡚⡛⡜⡝⡞⡟',\r
+               'input': '⡀⡁⡂⡃⡄⡅⡆⡇⡈⡉⡊⡋⡌⡍⡎⡏⡐⡑⡒⡓⡔⡕⡖⡗⡘⡙⡚⡛⡜⡝⡞⡟',\r
+               'output': '⡀⡁⡂⡃⡄⡅⡆⡇⡈⡉⡊⡋⡌⡍⡎⡏⡐⡑⡒⡓⡔⡕⡖⡗⡘⡙⡚⡛⡜⡝⡞⡟',\r
+               'inpos1': [0,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],\r
+               'comment': 'braille code should not be changed.',\r
+               },\r
+       {\r
                'text': '《本章のねらい》',\r
                'input': '《ホンショーノ ネライ》',\r
                'output': '⠐⠶⠮⠴⠈⠺⠒⠎ ⠏⠑⠃⠶⠂',\r
@@ -601,10 +652,14 @@ tests = [
                'text': 'オペレーティングシステム',\r
                'input': 'オペレーティング システム',\r
                },\r
-       #{\r
-       #       'text': 'トーキングインストーラー',\r
-       #       'input': 'トーキング インストーラー',\r
-       #       },\r
+       {\r
+               'text': 'インストーラー',\r
+               'input': 'インストーラー',\r
+               },\r
+       {\r
+               'text': 'トーキングインストーラー',\r
+               'input': 'トーキング インストーラー',\r
+               },\r
        {\r
                'text': 'アイスクリーム', \r
                'input': 'アイス クリーム',\r
@@ -3494,6 +3549,10 @@ tests = [
                'text': '私としては',\r
                'input': 'ワタシト シテワ', # 'ワタクシト シテワ',\r
                },\r
+       {\r
+               'comment': '前の語と結びついている場合は続ける',\r
+               'text':'主として', 'input':'シュトシテ'\r
+               },\r
        { 'note': '7.「なさい・なさる」などが、独立の動詞であれば前を区切って書く。' },\r
        {\r
                'comment': '点訳のてびき第3版 第3章 その1 5 No.65',\r
@@ -3798,12 +3857,12 @@ tests = [
        #       'input': 'マル 1ニチ'\r
        #   'comment': '「マルツイタチ」にしないために辞書登録が必要',\r
        #       },\r
-       #{\r
-       #       'comment': '点訳のてびき第3版 第3章 その2 2 備考1',\r
-       #       'text': '元副総理',\r
-       #       'input': 'モト フクソーリ'\r
-       #   'comment': 'not モト フク ソーリ',\r
-       #       },\r
+       {\r
+               'comment': '点訳のてびき第3版 第3章 その2 2 備考1',\r
+               'text': '元副総理',\r
+               'input': 'モト フクソーリ',\r
+               'comment': 'not モト フク ソーリ',\r
+               },\r
        {\r
                'comment': '点訳のてびき第3版 第3章 その2 2 備考1',\r
                'text': '新時刻表',\r
@@ -4448,53 +4507,49 @@ tests = [
        {   'text':'http:/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'input':'http:/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'},\r
        {   'text':'http://aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'input':'⠠⠦http://aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa⠠⠴'},\r
 \r
-       #{   'text':'障害者協会', 'input':'ショーガイシャ キョーカイ'},\r
+       {   'text':'障害者協会', 'input':'ショーガイシャ キョーカイ'},\r
        {   'text':'久代', 'input':'ヒサヨ'},\r
        {   'text':" 御園 ", 'input':' ミソノ'},\r
        #{   'text':" 西本 ", 'input':' ニシモト'},\r
        {   'text':'参加者 御園、田中、中原、御園', 'input':'サンカシャ ミソノ、タナカ、ナカハラ、ミソノ'},\r
-       #{   'text':'有り難うございました', 'input':'アリガトー ゴザイマシタ'},\r
+       {   'text':'有り難うございました', 'input':'アリガトー ゴザイマシタ'},\r
        #{   'text':'いう', 'input':'イウ'},\r
-       #{   'text':'森田知事', 'input':'モリタ チジ'},\r
+       {   'text':'森田知事', 'input':'モリタ チジ'},\r
        #{   'text':'自ら行う', 'input':'ミズカラ オコナウ'},\r
-       #{   'text':'おはようございます', 'input':'オハヨー ゴザイマス'},\r
-       #{   'text':'森田県知事', 'input':'モリタ ケンチジ'},\r
-       #{   'text':'森田副知事', 'input':'モリタ フクチジ'},\r
-       #{   'text':'京丹後市', 'input':'キョータンゴシ'},\r
-       #{   'text':'人として', 'input':'ヒトトシテ'},\r
-       #{   'text':'立ってなさい', 'input':'タッテナサイ'},\r
-       #{   'text':'見てなさい', 'input':'ミテナサイ'},\r
-       #{   'text':'お黙りなさい', 'input':'オダマリナサイ'},\r
+       {   'text':'おはようございます', 'input':'オハヨー ゴザイマス'},\r
+       {   'text':'森田県知事', 'input':'モリタ ケンチジ'},\r
+       {   'text':'森田副知事', 'input':'モリタ フクチジ'},\r
+       {   'text':'京丹後市', 'input':'キョータンゴシ'},\r
        #{   'text':'二人して', 'input':'フタリシテ'},\r
-       #{   'text':'京丹後', 'input':'キョータンゴ'},\r
+       {   'text':'京丹後', 'input':'キョータンゴ'},\r
        {   'text':'次世代型点字ピンディスプレイ', 'input':'ジセダイガタ テンジピンディスプレイ'},\r
-       #{   'text':'世界初', 'input':'セカイ ハツ'},\r
-       #{   'text':'見出しレベル3', 'input':'ミダシ レベル 3'},\r
-       #{   'text':'もうすぐ', 'input':'モー スグ'},\r
+       {   'text':'世界初', 'input':'セカイ ハツ'},\r
+       {   'text':'見出しレベル3', 'input':'ミダシ レベル 3'},\r
+       {   'text':'もうすぐ', 'input':'モー スグ'},\r
        #{   'text':'最上', 'input':'モガミ'},\r
        #{   'text':'間人', 'input':'タイザ'},\r
 \r
-       #{   'text':'秋子嬢', 'input':'アキコジョー'},\r
+       {   'text':'秋子嬢', 'input':'アキコジョー'},\r
        {   'text':'宗谷岬', 'input':'ソーヤ ミサキ'},\r
-       #{   'text':'宗谷岬周辺の丘陵地帯', 'input':'ソーヤ ミサキ シューヘンノ キューリョー チタイ'},\r
-       #{   'text':'比治山峠', 'input':'ヒジヤマ トーゲ'},\r
-       #{   'text':'丹後半島', 'input':'タンゴ ハントー'},\r
+       {   'text':'宗谷岬周辺の丘陵地帯', 'input':'ソーヤ ミサキ シューヘンノ キューリョー チタイ'},\r
+       {   'text':'比治山峠', 'input':'ヒジヤマ トーゲ'},\r
+       {   'text':'丹後半島', 'input':'タンゴ ハントー'},\r
 \r
        # 人名に造語要素が続く場合で、2拍以下の場合は\r
        # 続けるのが原則ですが、自立性が強く、意味の理解を助ける\r
        # 場合は、前を区切って書く\r
-       #{   'text':'上田訳', 'input':'ウエダ ヤク'},\r
-       #{   'text':'村岡花子訳', 'input':'ムラオカ ハナコ ヤク'},\r
-       #{   'text':'西本訳', 'input':'ニシモト ヤク'},\r
+       {   'text':'上田訳', 'input':'ウエダ ヤク'},\r
+       {   'text':'村岡花子訳', 'input':'ムラオカ ハナコ ヤク'},\r
+       {   'text':'西本訳', 'input':'ニシモト ヤク'},\r
 \r
-       #{   'text':'鈴木作', 'input':'スズキ サク'},\r
-       #{   'text':'運慶作', 'input':'ウンケイ サク'},\r
-       #{   'text':'快慶作', 'input':'カイケイ サク'},\r
-       #{   'text':'ゴッホ作', 'input':'ゴッホ サク'},\r
+       {   'text':'鈴木作', 'input':'スズキ サク'},\r
+       {   'text':'運慶作', 'input':'ウンケイ サク'},\r
+       {   'text':'快慶作', 'input':'カイケイ サク'},\r
+       {   'text':'ゴッホ作', 'input':'ゴッホ サク'},\r
 \r
-       #{   'text':'リンカーン談', 'input':'リンカーン ダン'},\r
-       #{   'text':'細川談', 'input':'ホソカワ ダン'},\r
-       #{   'text':'西本談', 'input':'ニシモト ダン'},\r
+       {   'text':'リンカーン談', 'input':'リンカーン ダン'},\r
+       {   'text':'細川談', 'input':'ホソカワ ダン'},\r
+       {   'text':'西本談', 'input':'ニシモト ダン'},\r
 \r
        {   'text':'田中著', 'input':'タナカ チョ'},\r
        {   'text':'山田耕筰曲', 'input':'ヤマダ コーサク キョク'},\r
@@ -4502,5 +4557,72 @@ tests = [
        {   'text':'ゴッホ絵', 'input':'ゴッホ エ'},\r
        {   'text':'鈴木アナ', 'input':'スズキ アナ'},\r
        {   'text':'岡本プロ', 'input':'オカモト プロ'},\r
+\r
+       #{   'text':'びっくら放いた', 'input':'ビックラ コイタ'},\r
+       #{   'text':'五倍子', 'input':'ゴバイシ'},\r
+\r
+       { 'note': '+ 踊り字 +' },\r
+       # http://ja.wikipedia.org/wiki/%E8%B8%8A%E3%82%8A%E5%AD%97\r
+\r
+       # 同の字点\r
+       # 々   3005    [クリカエシキゴー]      オドリジ\r
+       {   'text':'呉々', 'input':'クレグレ'},\r
+       {   'text':'呉々も', 'input':'クレグレモ'},\r
+       {   'text':'時々', 'input':'トキドキ'},\r
+       {   'text':'代々木', 'input':'ヨヨギ'},\r
+       {   'text':'複々線', 'input':'フクフクセン'},\r
+       {   'text':'複々々線', 'input':'フクフクフクセン'},\r
+       {   'text':'複々々々線', 'input':'フクフクフクフクセン'},\r
+       {   'text':'複々々々々線', 'input':'フクフクフクフクフクセン'},\r
+       {   'text':'小々々支川', 'input':'ショーショーショーシセン'},\r
+       {   'text':'結婚式々場', 'input':'ケッコンシキ シキジョー'},\r
+\r
+       # 平仮名繰り返し記号\r
+       # ゝ   309d    [ヒラガナクリカエシ]   クリカエシ\r
+       # ゞ   309e    [ヒラガナダクテンクリカエシ]       クリカエシ ダクテン\r
+       {   'text':'すゝめ', 'input':'ススメ'},\r
+       {   'text':'すゞめ', 'input':'スズメ'},\r
+       {   'text':'いすゞ', 'input':'イスズ'},\r
+       {   'text':'づゝ', 'input':'ヅツ'},\r
+       {   'text':'ぶゞ', 'input':'ブブ'},\r
+       {   'text':'ふゞ', 'input':'フブ'},\r
+\r
+       # 片仮名繰り返し記号\r
+       # ヽ   30fd    [カタカナクリカエシ]   クリカエシ\r
+       # ヾ   30fe    [カタカナダクテンクリカエシ]       クリカエシ ダクテン\r
+       {   'text':'スヽメ', 'input':'ススメ'},\r
+       {   'text':'イスヽ', 'input':'イスス'},\r
+       {   'text':'イスヾ', 'input':'イスズ'},\r
+       {   'text':'ヅヽ', 'input':'ヅツ'},\r
+       {   'text':'ブヾ', 'input':'ブブ'},\r
+\r
+       # 同上記号\r
+       # 仝   4edd    [ドージョー]       ドージョー\r
+       {   'text':'仝', 'input':'ドージョー'},\r
+\r
+       # ノノ字点(ののじてん)・同じく記号\r
+       # 〃   3003    [オナジク]  オナジク\r
+       {   'text':'〃', 'input':'オナジク'},\r
+\r
+       # 二の字点(にのじてん)\r
+       # 文字説明に未登録\r
+       # 〻    303b\r
+       {   'text':'〻', 'input':'ニノジテン'},\r
+       {   'text':'各〻', 'input':'オノオノ'},\r
+       {   'text':'屡〻', 'input':'シバシバ'},\r
+\r
+       # くの字点(くのじてん)\r
+       # 文字説明に未登録\r
+       # 〱    3031 くの字点\r
+       # 〲    3032 くの字点(濁点)\r
+       # 〳    3033 くの字点上\r
+       # 〴    3034 くの字点上(濁点)\r
+       # 〵    3035 くの字点下\r
+       {   'text':'〱', 'input':'クノジテン'},\r
+       {   'text':'〲', 'input':'クノジテン ダクテン'},\r
+       {   'text':'〳', 'input':'クノジテン ウエ'},\r
+       {   'text':'〴', 'input':'クノジテン ウエ ダクテン'},\r
+       {   'text':'〵', 'input':'クノジテン シタ'},\r
+\r
        ]\r
 \r