• R/O
  • HTTP
  • SSH
  • HTTPS

bashlib-develop: Commit

開発中の bashlib


Commit MetaInfo

Revision8409a74ea7a9f722ed903714343d73c59de1cf07 (tree)
Zeit2011-10-09 09:07:06
AutorYour Name <you@exam...>
CommiterYour Name

Log Message

update

Ändern Zusammenfassung

Diff

--- /dev/null
+++ b/document/MakeEnglish.vbs
@@ -0,0 +1,96 @@
1+Option Explicit
2+
3+'// Copyright (C) 2007-2011 Sofrware Design Gallery "Sage Plaisir 21" All Rights Reserved.
4+
5+
6+Sub Main( Opt, AppKey )
7+ Dim out : out = GetAbsPath( "..\english", Empty )
8+ Dim w_:Set w_=AppKey.NewWritable( out ).Enable() '// ƒXƒNƒŠƒvƒg‚ªA‚±‚̃tƒ@ƒCƒ‹‚ª‚ ‚éƒtƒHƒ‹ƒ_[ˆÈ‰º‚ð‘‚«ž‚݂ł«‚邿‚¤‚É‚·‚éB
9+ Dim ds_: Set ds_ = new CurDirStack
10+
11+ echo_line
12+ echo "‰pŒê”Å("+ out +")‚ðˆê“xíœ‚µ‚āAì‚è’¼‚µ‚Ü‚·B"
13+ Pause
14+
15+ del out
16+
17+ copy "README", out
18+ copy "..\menu", out
19+ copy "..\sample", out
20+ copy "..\scriptlib", out
21+ copy "..\test\Test.sh", out+"\test"
22+ copy "..\test\ans", out+"\test"
23+
24+ pushd out +"\sample"
25+ Translate "samples.trans", "JP", "EN"
26+
27+ cd out +"\scriptlib"
28+ Translate "bashlib.trans", "JP", "EN"
29+
30+ popd
31+
32+ ren out +"\test", "test_patch"
33+
34+ echo "scriptlib(vbslib) ‚ðíœ‚µ‚Ä‚­‚¾‚³‚¢B"
35+End Sub
36+
37+
38+
39+
40+
41+
42+
43+
44+
45+
46+'--- start of vbslib include ------------------------------------------------------
47+
48+'// ‚±‚±‚Ì“à•”‚©‚ç Main ŠÖ”‚ðŒÄ‚яo‚µ‚Ä‚¢‚Ü‚·B
49+'// ‚Ü‚½Ascriptlib ƒtƒHƒ‹ƒ_[‚ð’T‚µ‚āAvbslib ‚ðƒCƒ“ƒNƒ‹[ƒh‚µ‚Ä‚¢‚Ü‚·
50+
51+'// vbslib is provided under 3-clause BSD license.
52+'// Copyright (C) 2007-2011 Sofrware Design Gallery "Sage Plaisir 21" All Rights Reserved.
53+
54+Dim g_Vers : If IsEmpty( g_Vers ) Then
55+Set g_Vers = CreateObject("Scripting.Dictionary") : g_Vers.Add "vbslib", 4.0
56+Dim g_debug, g_debug_params, g_admin, g_vbslib_path, g_CommandPrompt, g_fs, g_sh, g_AppKey
57+Dim g_MainPath, g_SrcPath, g_f, g_include_path, i, g_debug_tree, g_debug_process, g_b_compile_debug
58+g_SrcPath = WScript.ScriptFullName : g_MainPath = g_SrcPath
59+SetupVbslibParameters
60+Set g_fs = CreateObject( "Scripting.FileSystemObject" )
61+Set g_sh = WScript.CreateObject("WScript.Shell") : g_f = g_sh.CurrentDirectory
62+g_sh.CurrentDirectory = g_fs.GetParentFolderName( WScript.ScriptFullName )
63+For i = 20 To 1 Step -1 : If g_fs.FileExists(g_vbslib_path) Then Exit For
64+g_vbslib_path = "..\" + g_vbslib_path : Next
65+If g_fs.FileExists(g_vbslib_path) Then g_vbslib_path = g_fs.GetAbsolutePathName( g_vbslib_path )
66+g_sh.CurrentDirectory = g_f
67+If i=0 Then WScript.Echo "Not found " + g_fs.GetFileName( g_vbslib_path ) +vbCR+vbLF+_
68+ "Let's download vbslib "&g_Vers.Item("vbslib")&" and Copy scriptlib folder." : Stop : WScript.Quit 1
69+Set g_f = g_fs.OpenTextFile( g_vbslib_path ): Execute g_f.ReadAll() : g_f = Empty
70+If ResumePush Then On Error Resume Next
71+ CallMainFromVbsLib
72+ResumePop : On Error GoTo 0
73+End If
74+'---------------------------------------------------------------------------------
75+
76+Sub SetupDebugTools()
77+ set_input ""
78+ SetBreakByFName Empty
79+ SetStartSectionTree ""
80+End Sub
81+
82+Sub SetupVbslibParameters()
83+ '--- start of parameters for vbslib include -------------------------------
84+ '// g_Vers("OldMain") = 1
85+ g_vbslib_path = "scriptlib\vbs_inc.vbs"
86+ g_CommandPrompt = 2
87+
88+ g_debug = 0 '// release:0, debug:99, -1:call SetupDebugTools
89+ '// ‚l‚rƒIƒtƒBƒX‚âƒRƒ“ƒpƒCƒ‰‚ª‚ ‚ê‚΁Ag_debug ‚ð 1 ˆÈã‚É‚·‚邯ƒfƒoƒbƒK[‚ªŽg‚¦‚Ü‚·B
90+ '// ƒXƒeƒbƒvŽÀs‚ðŠJŽn‚·‚éêŠ‚âA•ϐ”‚Ì’l‚ðŠm”F‚µ‚½‚¢êŠ‚ɁAStop –½—ß‚ð‹Lq‚µ‚Ä‚­‚¾‚³‚¢B
91+
92+ '--- end of parameters for vbslib include ---------------------------------
93+End Sub
94+'--- end of vbslib include --------------------------------------------------------
95+
96+
--- /dev/null
+++ b/document/README
@@ -0,0 +1,25 @@
1+ ((( bashlib 1 - Short Hand Library for bash )))
2+
3+bashlib provides basic functions, when you used bash shell as script engine.
4+bashlib runs on bash ver3 pre-installed in Ubuntu, MacOS X, and so on.
5+
6+
7+You can try it now ...
8+ for Ubuntu : Double click "menu" file and select "Run in Terminal".
9+ for MacOS X : Double click "menu" file.
10+ for shell : cd bashlib and ./menu
11+
12+- document (folder) : Document of bashlib
13+- scriptlib (folder) : bashlib script library
14+- samples (folder) : The sample of main scripts
15+- test (folder) : Test Kit. This folder is made by menu
16+
17+
18+Copyright and License:
19+ bashlib ver1 Oct.9, 2011
20+ Copyright (c) 2011, T's-Neko at Sage Plaisir 21 (Japan)
21+ All rights reserved. Based on 3-clause BSD license.
22+
23+Support:
24+ Sofrware Design Gallery "Sage Plaisir 21" http://www.sage-p.com/
25+
--- a/document/bashlib.html
+++ b/document/bashlib.html
@@ -15,13 +15,13 @@
1515 <A href="#table-of-contents" style="color:blue;">→ もくじ</A>
1616 </DIV>
1717
18-<svg width="691" height="961" __viewBox="00000 00000 00691 64483">
19- <g id="page1" width="627" height="941" transform="translate(+10,+10)">
18+<svg width="691" height="1007" __viewBox="00000 00000 00691 64529">
19+ <g id="page1" width="627" height="987" transform="translate(+10,+10)">
2020 <line class="page_bound" x1="-0.5" y1="-0.5" x2="627.5" y2="-0.5" style="stroke:rgb(0,0,0);stroke-width:1"/>
21- <line class="page_bound" x1="-0.5" y1="-0.5" x2="-0.5" y2="941.5" style="stroke:rgb(0,0,0);stroke-width:1"/>
22- <line class="page_bound" x1="627.5" y1="-0.5" x2="627.5" y2="941.5" style="stroke:rgb(0,0,0);stroke-width:1"/>
23- <line class="page_bound" x1="-0.5" y1="941.5" x2="627.5" y2="941.5" style="stroke:rgb(0,0,0);stroke-width:1"/>
24- <image x="47" y="620" width="16" height="16" xlink:href="data:;base64,
21+ <line class="page_bound" x1="-0.5" y1="-0.5" x2="-0.5" y2="987.5" style="stroke:rgb(0,0,0);stroke-width:1"/>
22+ <line class="page_bound" x1="627.5" y1="-0.5" x2="627.5" y2="987.5" style="stroke:rgb(0,0,0);stroke-width:1"/>
23+ <line class="page_bound" x1="-0.5" y1="987.5" x2="627.5" y2="987.5" style="stroke:rgb(0,0,0);stroke-width:1"/>
24+ <image x="47" y="617" width="16" height="16" xlink:href="data:;base64,
2525 iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAAXNSR0IArs4c6QAAAARnQU1BAACx
2626
2727 jwv8YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAJZJREFU
@@ -31,7 +31,7 @@ OE+VUgkOwCAI216mT9vT8GWOwwOqmRlZFjRtoeBda716lFI4zTnxn0hyi5TkpgUTPEdvWWKqGM5g
3131 gjT0OOtRPg4imsIdg4Qu3xRWzoEAdTYtaYXHd+gdIkEb+EMAA3MybqTBw1b+q6U43mnELw0rgF1Y
3232
3333 azBtjuMG2473FVb0wbS9Hw86TwkGAoTw+Pwj2+aD/AJj5Kw2fzgGpAAAAABJRU5ErkJggg=="/>
34- <image x="47" y="643" width="16" height="16" xlink:href="data:;base64,
34+ <image x="47" y="640" width="16" height="16" xlink:href="data:;base64,
3535 iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAAXNSR0IArs4c6QAAAARnQU1BAACx
3636
3737 jwv8YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAJZJREFU
@@ -41,7 +41,7 @@ OE+VUgkOwCAI216mT9vT8GWOwwOqmRlZFjRtoeBda716lFI4zTnxn0hyi5TkpgUTPEdvWWKqGM5g
4141 gjT0OOtRPg4imsIdg4Qu3xRWzoEAdTYtaYXHd+gdIkEb+EMAA3MybqTBw1b+q6U43mnELw0rgF1Y
4242
4343 azBtjuMG2473FVb0wbS9Hw86TwkGAoTw+Pwj2+aD/AJj5Kw2fzgGpAAAAABJRU5ErkJggg=="/>
44- <image x="184" y="584" width="31" height="28" xlink:href="data:;base64,
44+ <image x="184" y="581" width="31" height="28" xlink:href="data:;base64,
4545 /9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAMCAgMCAgMDAwMEAwMEBQgFBQQEBQoHBwYIDAoMDAsK
4646
4747 CwsNDhIQDQ4RDgsLEBYQERMUFRUVDA8XGBYUGBIUFRT/2wBDAQMEBAUEBQkFBQkUDQsNFBQUFBQU
@@ -89,7 +89,7 @@ MznCM1yyV0fjz8I/irqvxS8eeJvDs/7Y0XhuOyv1tdG1DU/CMMcWtQkf61S7IIju4COckEEdwP0J
8989 /ZM/ZO1T9nbX/H/iPxH4+m+IHifxhLZte3zaYliiLbrIqYRXbJIlOTkDCjjqT7BH8H/AcMiSR+Cf
9090
9191 DiSIwZWXSbcFSDkEHZ1FdaAB261pOtUqK05N+rIhRp03eEUvRH//2Q=="/>
92- <image x="47" y="666" width="16" height="16" xlink:href="data:;base64,
92+ <image x="47" y="663" width="16" height="16" xlink:href="data:;base64,
9393 iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAAXNSR0IArs4c6QAAAARnQU1BAACx
9494
9595 jwv8YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAJZJREFU
@@ -132,43 +132,43 @@ azBtjuMG2473FVb0wbS9Hw86TwkGAoTw+Pwj2+aD/AJj5Kw2fzgGpAAAAABJRU5ErkJggg=="/>
132132 <rect x="26.5" y="431.5" width="108" height="26" style="fill:rgb(254,210,129);stroke:rgb(0,0,0);stroke-width:1"/>
133133 <text x="45.5px" y="448.5px" style="fill:rgb(0,0,0);font-family:MS-PGothic,sans-serif;font-size:10pt;font-weight:bold;text-anchor:start" xml:space="preserve">ダウンロード</text>
134134 </g>
135- <a xlink:href="bashlib-1.0.0.tar.bz2" target="_blank">
135+ <a xlink:href="http://www.sage-p.com/b/bashlib-1.0.0.tar.bz2" target="_blank">
136136 <text x="155.5px" y="448.5px" style="fill:rgb(0,0,255);font-family:メイリオ;font-size:10pt;font-weight:bold;text-anchor:start" xml:space="preserve">→ bashlib-1.0.0.tar.bz2</text>
137137 </a>
138138 <text x="344.5px" y="448.5px" style="fill:rgb(0,128,0);font-family:メイリオ;font-size:10pt;text-anchor:start" xml:space="preserve">for bash ver3以上 (Linux, MacOS X)</text>
139- <text x="19.5px" y="720.5px" style="fill:rgb(64,128,128);font-family:メイリオ;font-size:10pt;font-weight:bold;text-anchor:start" xml:space="preserve">ライセンス</text>
139+ <text x="19.5px" y="745.5px" style="fill:rgb(64,128,128);font-family:メイリオ;font-size:10pt;font-weight:bold;text-anchor:start" xml:space="preserve">ライセンス</text>
140140 <a xlink:href="http://ja.wikipedia.org/wiki/BSD%E3%83%A9%E3%82%A4%E3%82%BB%E3%83%B3%E3%82%B9" target="_blank">
141- <text x="74.5px" y="858.5px" style="fill:rgb(0,0,255);font-family:メイリオ;font-size:10pt;text-anchor:start" xml:space="preserve">→ BSDライセンス - Wikipedia (Web)</text>
141+ <text x="74.5px" y="883.5px" style="fill:rgb(0,0,255);font-family:メイリオ;font-size:10pt;text-anchor:start" xml:space="preserve">→ BSDライセンス - Wikipedia (Web)</text>
142142 </a>
143143 <g>
144- <rect x="37.5" y="794.5" width="502" height="40" style="fill:rgb(231,231,231);stroke:rgb(0,0,0);stroke-width:1"/>
145- <text x="45.5px" y="810.5px" style="fill:rgb(0,0,0);font-family:Osaka-mono,MS-Gothic,monospace;font-size:9pt;text-anchor:start" xml:space="preserve">bashlib is provided under 3-clause BSD license.<tspan x="45.5px" y="825.5px" xml:space="preserve">Copyright (C) 2011 Sofrware Design Gallery "Sage Plaisir 21" All Rights Reserved.</tspan></text>
144+ <rect x="37.5" y="819.5" width="502" height="40" style="fill:rgb(231,231,231);stroke:rgb(0,0,0);stroke-width:1"/>
145+ <text x="45.5px" y="835.5px" style="fill:rgb(0,0,0);font-family:Osaka-mono,MS-Gothic,monospace;font-size:9pt;text-anchor:start" xml:space="preserve">bashlib is provided under 3-clause BSD license.<tspan x="45.5px" y="850.5px" xml:space="preserve">Copyright (C) 2011 Sofrware Design Gallery "Sage Plaisir 21" All Rights Reserved.</tspan></text>
146146 </g>
147- <text x="27.5px" y="858.5px" style="fill:rgb(0,0,0);font-family:メイリオ;font-size:10pt;text-anchor:start" xml:space="preserve">参考</text>
148- <text x="30.5px" y="749.5px" style="fill:rgb(0,0,0);font-family:メイリオ;font-size:10pt;text-anchor:start" xml:space="preserve">無料でお使いいただけますが、無保証です。<tspan x="30.5px" y="764.5px" xml:space="preserve">再頒布や加工もファイルに書かれた下記を削除しなければ自由にできます。</tspan>
149- <tspan x="30.5px" y="779.5px" xml:space="preserve">bashlib を参考にして作成したスクリプトやライブラリの著作権は、あなたにあります。</tspan></text>
147+ <text x="27.5px" y="883.5px" style="fill:rgb(0,0,0);font-family:メイリオ;font-size:10pt;text-anchor:start" xml:space="preserve">参考</text>
148+ <text x="30.5px" y="774.5px" style="fill:rgb(0,0,0);font-family:メイリオ;font-size:10pt;text-anchor:start" xml:space="preserve">無料でお使いいただけますが、無保証です。<tspan x="30.5px" y="789.5px" xml:space="preserve">再頒布や加工もファイルに書かれた下記を削除しなければ自由にできます。</tspan>
149+ <tspan x="30.5px" y="804.5px" xml:space="preserve">bashlib を参考にして作成したスクリプトやライブラリの著作権は、あなたにあります。</tspan></text>
150150 <a xlink:href="http://www.sage-p.com/" target="_blank">
151- <text x="108.5px" y="901.5px" style="fill:rgb(0,0,255);font-family:メイリオ;font-size:10pt;text-anchor:start" xml:space="preserve">ソフトウェアデザイン館 Sage Plaisir 21 http://www.sage-p.com/</text>
151+ <text x="108.5px" y="926.5px" style="fill:rgb(0,0,255);font-family:メイリオ;font-size:10pt;text-anchor:start" xml:space="preserve">ソフトウェアデザイン館 Sage Plaisir 21 http://www.sage-p.com/</text>
152152 </a>
153- <text x="19.5px" y="901.5px" style="fill:rgb(64,128,128);font-family:メイリオ;font-size:10pt;font-weight:bold;text-anchor:start" xml:space="preserve">サポート先</text>
153+ <text x="19.5px" y="926.5px" style="fill:rgb(64,128,128);font-family:メイリオ;font-size:10pt;font-weight:bold;text-anchor:start" xml:space="preserve">サポート先</text>
154154 <text x="480.5px" y="35.5px" style="fill:rgb(0,0,0);font-family:メイリオ;font-size:10pt;text-anchor:start" xml:space="preserve">2011/10/9</text>
155155 <g>
156156 <rect x="16.5" y="13.5" width="38" height="36" style="fill:rgb(0,0,0);stroke:rgb(192,192,192);stroke-width:2"/>
157157 <text x="24.5px" y="35.5px" style="fill:rgb(192,192,192);font-family:MS-PGothic,sans-serif;font-size:10pt;font-weight:bold;text-anchor:start" xml:space="preserve">$ </text>
158158 </g>
159- <text x="234.5px" y="655.5px" style="fill:rgb(0,0,0);font-family:メイリオ;font-size:10pt;text-anchor:start" xml:space="preserve">bashlib がベースとするシェルスクリプトの説明です</text>
160- <text x="234.5px" y="631.5px" style="fill:rgb(0,0,0);font-family:メイリオ;font-size:10pt;text-anchor:start" xml:space="preserve">bashlib のマニュアル(本書)です</text>
161- <text x="70.5px" y="631.5px" style="fill:rgb(0,0,0);font-family:メイリオ;font-size:10pt;text-anchor:start" xml:space="preserve">bashlib ヘルプ</text>
162- <text x="19.5px" y="602.5px" style="fill:rgb(64,128,128);font-family:メイリオ;font-size:10pt;font-weight:bold;text-anchor:start" xml:space="preserve">画面で見るマニュアル</text>
159+ <text x="234.5px" y="652.5px" style="fill:rgb(0,0,0);font-family:メイリオ;font-size:10pt;text-anchor:start" xml:space="preserve">bashlib がベースとするシェルスクリプトの説明です</text>
160+ <text x="234.5px" y="628.5px" style="fill:rgb(0,0,0);font-family:メイリオ;font-size:10pt;text-anchor:start" xml:space="preserve">bashlib のマニュアル(本書)です</text>
161+ <text x="70.5px" y="628.5px" style="fill:rgb(0,0,0);font-family:メイリオ;font-size:10pt;text-anchor:start" xml:space="preserve">bashlib ヘルプ</text>
162+ <text x="19.5px" y="599.5px" style="fill:rgb(64,128,128);font-family:メイリオ;font-size:10pt;font-weight:bold;text-anchor:start" xml:space="preserve">画面で見るマニュアル</text>
163163 <a onclick="return false">
164- <text x="70.5px" y="655.5px" style="fill:rgb(0,0,255);font-family:メイリオ;font-size:10pt;text-anchor:start" xml:space="preserve">シェルスクリプト(bash)</text>
164+ <text x="70.5px" y="652.5px" style="fill:rgb(0,0,255);font-family:メイリオ;font-size:10pt;text-anchor:start" xml:space="preserve">シェルスクリプト(bash)</text>
165165 </a>
166- <text x="19.5px" y="551.5px" style="fill:rgb(64,128,128);font-family:メイリオ;font-size:10pt;font-weight:bold;text-anchor:start" xml:space="preserve">インストール</text>
166+ <text x="19.5px" y="548.5px" style="fill:rgb(64,128,128);font-family:メイリオ;font-size:10pt;font-weight:bold;text-anchor:start" xml:space="preserve">インストール</text>
167167 <a xlink:href="#" onclick="window.location.hash='install'; return false">
168- <text x="138.5px" y="551.5px" style="fill:rgb(0,0,255);font-family:メイリオ;font-size:10pt;text-anchor:start" xml:space="preserve">→ インストール</text>
168+ <text x="138.5px" y="548.5px" style="fill:rgb(0,0,255);font-family:メイリオ;font-size:10pt;text-anchor:start" xml:space="preserve">→ インストール</text>
169169 </a>
170170 <a xlink:href="#" onclick="window.location.hash='uninst'; return false">
171- <text x="279.5px" y="551.5px" style="fill:rgb(0,0,255);font-family:メイリオ;font-size:10pt;text-anchor:start" xml:space="preserve">→ アンインストール</text>
171+ <text x="279.5px" y="548.5px" style="fill:rgb(0,0,255);font-family:メイリオ;font-size:10pt;text-anchor:start" xml:space="preserve">→ アンインストール</text>
172172 </a>
173173 <text x="34.5px" y="480.5px" style="fill:rgb(0,0,0);font-family:メイリオ;font-size:10pt;text-anchor:start" xml:space="preserve">とりあえず動かしてみたいときは、</text>
174174 <text x="383.5px" y="35.5px" style="fill:rgb(0,0,0);font-family:メイリオ;font-size:10pt;text-anchor:start" xml:space="preserve"> version 1</text>
@@ -188,14 +188,19 @@ azBtjuMG2473FVb0wbS9Hw86TwkGAoTw+Pwj2+aD/AJj5Kw2fzgGpAAAAABJRU5ErkJggg=="/>
188188 <text x="248.5px" y="480.5px" style="fill:rgb(0,0,255);font-family:メイリオ;font-size:10pt;text-anchor:start" xml:space="preserve">bashlib の menu</text>
189189 </a>
190190 <text x="364.5px" y="480.5px" style="fill:rgb(0,0,0);font-family:メイリオ;font-size:10pt;text-anchor:start" xml:space="preserve">を開いてください。</text>
191- <text x="34.5px" y="498.5px" style="fill:rgb(0,0,0);font-family:メイリオ;font-size:10pt;text-anchor:start" xml:space="preserve">この文書の固定幅フォントは、Ubuntu の Chrome と FireFox に合わせてあります。</text>
191+ <text x="34.5px" y="498.5px" style="fill:rgb(0,0,0);font-family:メイリオ;font-size:10pt;text-anchor:start" xml:space="preserve">この文書(HTML5)を見るときは、Chrome または Mac OS X の Safari をお使いください。</text>
192192 <a onclick="return false">
193- <text x="70.5px" y="679.5px" style="fill:rgb(0,0,255);font-family:メイリオ;font-size:10pt;text-anchor:start" xml:space="preserve">UNIX &amp; Linux</text>
193+ <text x="70.5px" y="676.5px" style="fill:rgb(0,0,255);font-family:メイリオ;font-size:10pt;text-anchor:start" xml:space="preserve">UNIX &amp; Linux</text>
194194 </a>
195- <text x="234.5px" y="679.5px" style="fill:rgb(0,0,0);font-family:メイリオ;font-size:10pt;text-anchor:start" xml:space="preserve">ファイルやシェルの基本的なコマンドの説明です。</text>
195+ <text x="234.5px" y="676.5px" style="fill:rgb(0,0,0);font-family:メイリオ;font-size:10pt;text-anchor:start" xml:space="preserve">ファイルやシェルの基本的なコマンドの説明です。</text>
196196 <a xlink:href="http://www.sage-p.com/freesoft.htm" target="_blank">
197- <text x="338.5px" y="923.5px" style="fill:rgb(0,0,255);font-family:メイリオ;font-size:7pt;text-anchor:start" xml:space="preserve">この文書は Snap Note を使って作られています。</text>
197+ <text x="338.5px" y="948.5px" style="fill:rgb(0,0,255);font-family:メイリオ;font-size:7pt;text-anchor:start" xml:space="preserve">この文書は Snap Note を使って作られています。</text>
198198 </a>
199+ <text x="70.5px" y="700.5px" style="fill:rgb(0,0,0);font-family:メイリオ;font-size:8pt;text-anchor:start" xml:space="preserve">上記リンク先は、</text>
200+ <a xlink:href="http://www.sage-p.com/vbslib/bashlib.files/bashlib.html" target="_blank">
201+ <text x="159.5px" y="700.5px" style="fill:rgb(0,0,255);font-family:メイリオ;font-size:8pt;text-anchor:start" xml:space="preserve">Internet Explorer 版の文書</text>
202+ </a>
203+ <text x="301.5px" y="700.5px" style="fill:rgb(0,0,0);font-family:メイリオ;font-size:8pt;text-anchor:start" xml:space="preserve">でのみ参照できます。</text>
199204 </g>
200205
201206 </svg>
@@ -1115,7 +1120,7 @@ g_flags = new Array( 0,
11151120 </TD></TR></TABLE>
11161121
11171122
1118-<svg width="00691" height="64483">
1123+<svg width="00691" height="64529">
11191124
11201125 <g id="page2" width="578" height="868" transform="translate(+10,+10)">
11211126 <line class="page_bound" x1="-0.5" y1="-0.5" x2="578.5" y2="-0.5" style="stroke:rgb(0,0,0);stroke-width:1"/>
--- a/english/README
+++ b/english/README
@@ -12,7 +12,7 @@ You can try it now ...
1212 - document (folder) : Document of bashlib
1313 - scriptlib (folder) : bashlib script library
1414 - samples (folder) : The sample of main scripts
15-- test (folder) : Test Kit
15+- test (folder) : Test Kit. This folder is made by menu
1616
1717
1818 Copyright and License:
--- a/english/menu
+++ b/english/menu
@@ -33,7 +33,7 @@ function Main_func()
3333 "Test" "Test_sth_func" \
3434
3535 SetAttr_as_AssociativeArrayName_func $obj MenuCaption \
36- "1" "Open help (for HTML5+SVG browser) [Help]" \
36+ "1" "Open Japanese help (for HTML5+SVG browser, Chrome, Safari) [Help]" \
3737 "2" "Search file [SearchFile]" \
3838 "3" "New - Shell script file for bashlib [NewSh]" \
3939 "4" "New - Menu with shorthand prompt [NewMenu]" \
@@ -61,7 +61,7 @@ $declare_AssociativeArrayClass g_InputCommandOpt
6161 #//*********************************************************************
6262 function Help_sth_func()
6363 {
64- local abs_path ; GetAbsPath_func "document/bashlib.html" ; abs_path="$g_Ret"
64+ local abs_path ; GetAbsPath_func "../document/bashlib.html" ; abs_path="$g_Ret"
6565 local commands
6666 local apps
6767
@@ -187,7 +187,7 @@ function NewShSub_sth_func()
187187
188188 #// guide
189189 name=`basename "$path"`
190- echo "You can start by input \"./name\" in shell"
190+ echo "You can start by input \"./$name\" in shell"
191191 }
192192
193193
@@ -272,10 +272,10 @@ function chmod_x_sth_func()
272272 #//*********************************************************************
273273 function Test_sth_func()
274274 {
275- if [ ! -e "test" ];then
276- if [ -e "../test/Test.sh" ];then
277- cp -rap "../test" "."
278- fi
275+ if [ -e "test_patch" ];then
276+ cp -Rap "../test" "."
277+ cp -Rap test_patch/* "test"
278+ rm -r "test_patch"
279279 fi
280280
281281 test/Test.sh
--- a/english/sample/samples.trans
+++ b/english/sample/samples.trans
@@ -1,6 +1,7 @@
11 <?xml version="1.0" encoding="UTF-8"?>
22 <Translate>
33 <File charset="utf-8">../menu</File>
4+<File charset="utf-8">../test/Test.sh</File>
45 <File charset="utf-8">Menu.sh</File>
56 <File charset="utf-8">OptionCall.sh</File>
67 <File charset="utf-8">Sample.sh</File>
@@ -24,7 +25,8 @@
2425 <!-- ../menu -->
2526
2627 <T><JP>ヘルプを開く (HTML5+SVG 対応ブラウザで見えます) </JP>
27- <EN>Open help (for HTML5+SVG browser)</EN></T>
28+ <EN>Open japanese help (for HTML5+SVG browser)</EN></T>
29+<T><JP>document/bashlib.html</JP><EN>../document/bashlib.html</EN></T>
2830 <T><JP>ファイルを検索する</JP><EN>Search file</EN></T>
2931 <T><JP>新規作成する - bashlib が使えるシェル・スクリプト・ファイル</JP>
3032 <EN>New - Shell script file for bashlib</EN></T>
@@ -48,7 +50,7 @@
4850 <T><JP>$parent_path/scriptlib フォルダーを作成しました。</JP>
4951 <EN>Created $parent_path/scriptlib folder.</EN></T>
5052 <T><JP>シェルから、『./$name』と入力すると起動できます。</JP>
51- <EN>You can start by input \"./name\" in shell</EN></T>
53+ <EN>You can start by input \"./$name\" in shell</EN></T>
5254 <T><JP>圧縮ファイルのパス</JP><EN>compressed file path</EN></T>
5355 <T><JP>ファイル名を一覧する</JP><EN>List up file names</EN></T>
5456 <T><JP>解凍先フォルダーのパス</JP><EN>Extracted folder path</EN></T>
@@ -61,6 +63,13 @@
6163 <EN>Test of error message</EN></T>
6264
6365
66+<!-- ../test/Test.sh -->
67+<T><JP>テスト済みバージョン:</JP><EN>Tested version : </EN></T>
68+<T><JP>このマシンのバージョン:</JP><EN>This machine's version : </EN></T>
69+<T><JP> echo "手動テスト(T_*_Manullay.sh) は別途行ってください。"</JP><EN></EN></T>
70+<T><JP> echo "bashlib へのシンボリック・リンクの中でもテストしてください。"</JP><EN></EN></T>
71+
72+
6473 <!-- Menu.sh -->
6574 <T><JP>何か文字を入力してください</JP><EN>Type any characters</EN></T>
6675 <T><JP>入力した内容は、『$g_Ret』です。</JP><EN>Input characters are \"$g_Ret\".</EN></T>
--- a/english/scriptlib/bashlib.trans
+++ b/english/scriptlib/bashlib.trans
@@ -3,6 +3,17 @@
33 <File charset="utf-8">bashlib.sh</File>
44 <File charset="utf-8">bashlib_inc.sh</File>
55 <File charset="utf-8">bashlib3.sh</File>
6+<File charset="utf-8">../test/ans/T_CheckMaxArgCount_ans.txt</File>
7+<File charset="utf-8">../test/ans/T_CheckPipeStatus_ans.txt</File>
8+<File charset="utf-8">../test/ans/T_DoneInErrMode_ans.txt</File>
9+<File charset="utf-8">../test/ans/T_ErrorInErrMode_ans.txt</File>
10+<File charset="utf-8">../test/ans/T_NotTryLoop_ans.txt</File>
11+<File charset="utf-8">../test/ans/T_TryLv0_ans.txt</File>
12+<File charset="utf-8">../test/ans/T_TryLv1_ans.txt</File>
13+<File charset="utf-8">../test/ans/T_TryLv1Clear_ans.txt</File>
14+<File charset="utf-8">../test/ans/T_TryLv1Proc1_ans.txt</File>
15+<File charset="utf-8">../test/ans/T_TryLv2_ans.txt</File>
16+<File charset="utf-8">../test/ans/T_TryLv2Change_ans.txt</File>
617
718 <T><JP>続行するには Enter キーを押してください . . .</JP><EN>Press Enter key to continue ...</EN></T>
819
@@ -37,6 +48,9 @@
3748 <EN>Parameters length is short. specified=${#Arguments[@]}, requested</EN></T>
3849 <T><JP>パラメーターが多すぎます。 指定=${#Arguments[@]}, 要求</JP>
3950 <EN>Parameters length is long. specified=${#Arguments[@]}, requested</EN></T>
51+<T><JP>パラメーターが多すぎます。 指定=2, 要求=1</JP>
52+ <EN>Parameters length is long. specified=2, requested=1</EN></T>
53+
4054
4155 <T><JP>すでにファイルが存在しています。</JP><EN>Already file exists.</EN></T>
4256 <T><JP>すでにフォルダーが存在しています。</JP><EN>Already folder exists.</EN></T>
@@ -76,6 +90,9 @@
7690 <EN>(Hint for developer) If you want to step runnning, call \"debugger\" at starting point.</EN></T>
7791 <T><JP>下記コールツリーの最も下の関数が、\` \` を使って echo 出力を取得しているときは、取得しないようにすると、更にコール先の関数が表示されます。</JP>
7892 <EN>Cut \` \` from call and get echo return, then show callstack inside.</EN></T>
93+<T><JP>(開発者向けヒント)ステップ実行したいときは、開始するところから "debugger" 関数を呼び出してください。 下記コールツリーの最も下の関数が、` ` を使って echo 出力を取得しているときは、取得しないようにすると、更にコール先の関数が表示されます。</JP>
94+ <EN>(Hint for developer) If you want to step runnning, call "debugger" at starting point. Cut ` ` from call and get echo return, then show callstack inside.</EN></T>
95+
7996 <T><JP>エラー処理中に別のエラーが発生しました。</JP>
8097 <EN>Another error is raised in error handling mode</EN></T>
8198 <T><JP>コールツリー:</JP><EN>Call tree:</EN></T>
--- /dev/null
+++ b/english/test_patch/Test.sh
@@ -0,0 +1,45 @@
1+#!/bin/bash -eE
2+ #// Content-Type: text/plain; charset=utf-8
3+ #// -eE option is stop, when error was raised.
4+ #// -x option is display commands one by one.
5+
6+function Main_func()
7+{
8+ echo "Tested version : GNU bash 4.1.5, 3.2.48"
9+ echo "This machine's version :"
10+ /bin/bash --version | head -n 1
11+ Pause_func --time_out=10
12+ ./T_Menu.sh
13+ ./T_File.sh
14+ ./T_Err.sh
15+ ./T_Str.sh
16+
17+
18+}
19+
20+
21+
22+
23+
24+
25+
26+
27+
28+
29+#//--- start of bashlib include ------------------------------------------------------
30+
31+#// <<< set up bashlib and call Main_func >>>
32+
33+#// bashlib is provided under 3-clause BSD license.
34+#// Copyright (C) 2011 Sofrware Design Gallery "Sage Plaisir 21" All Rights Reserved.
35+
36+g_BashLibPath="scriptlib/bashlib_inc.sh"; g_Ver="1.0"
37+g_StartInPath=`pwd`; cd "`dirname "$BASH_SOURCE"`"; g_Arguments=( "$BASH_SOURCE" "$@" )
38+for (( i = 0; i < 20; i ++ ));do
39+ if [ -e "$g_BashLibPath" ];then break ;else g_BashLibPath="../$g_BashLibPath" ;fi ;done
40+if [ "$i" == "20" ];then echo "${g_BashLibPath##*../} is not found.
41+Download bashlib $g_Ver and copy scriptlib folder"; exit 1 ;fi
42+source "$g_BashLibPath" #// include
43+CallMain_func
44+#//--- end of bashlib include --------------------------------------------------------
45+
--- /dev/null
+++ b/english/test_patch/ans/T_AnyTypeError_ans.txt
@@ -0,0 +1,11 @@
1+
2+((( T_AnyTypeErrorSub_func )))
3+./T_Err_Sub.sh: line xx: NotDefined_func: コマンドが見つかりません
4+<ERROR msg="local と同時に関数呼び出しするとエラーが発生しても中断しません"/>
5+
6+./T_Err_Sub.sh: line xx: NotDefined: コマンドが見つかりません
7+<ERROR msg="local と同時に関数呼び出しするとエラーが発生しても中断しません"/>
8+
9+./T_Err_Sub.sh: line xx: NotDefined_func: コマンドが見つかりません
10+
11+
--- /dev/null
+++ b/english/test_patch/ans/T_AnyTypeError_en_ans.txt
@@ -0,0 +1,11 @@
1+
2+((( T_AnyTypeErrorSub_func )))
3+./T_Err_Sub.sh: line xx: NotDefined_func: command not found
4+<ERROR msg="local と同時に関数呼び出しするとエラーが発生しても中断しません"/>
5+
6+./T_Err_Sub.sh: line xx: NotDefined: command not found
7+<ERROR msg="local と同時に関数呼び出しするとエラーが発生しても中断しません"/>
8+
9+./T_Err_Sub.sh: line xx: NotDefined_func: command not found
10+
11+
--- /dev/null
+++ b/english/test_patch/ans/T_Assert_ans.txt
@@ -0,0 +1,13 @@
1+
2+((( T_AssertSub_func )))
3+<ERROR msg="Assert failed"><Expression><![CDATA[
4+"$var1" == "ABC"
5+]]></Expression><Result><![CDATA[
6+abc == ABC
7+]]></Result></ERROR>
8+<ERROR msg="Assert failed"><Expression><![CDATA[
9+$( ReturnIt_func "あいう" ) == "アイウ"
10+]]></Expression><Result><![CDATA[
11+あいう == アイウ
12+]]></Result></ERROR>
13+call EchoTest_func
--- /dev/null
+++ b/english/test_patch/ans/T_CheckMaxArgCount_ans.txt
@@ -0,0 +1,5 @@
1+
2+((( T_CheckMaxArgCountSub_func )))
3+Parameters length is long. specified=2, requested=1
4+command line: T_CheckMaxArgCountSubSub_func 1 B
5+This error is OK
--- /dev/null
+++ b/english/test_patch/ans/T_CheckPipeStatus_ans.txt
@@ -0,0 +1,17 @@
1+
2+((( T_CheckPipeStatusSub_func )))
3+1st
4+${PIPESTATUS[@]} = 1 0
5+This error is OK
6+2nd
7+${PIPESTATUS[@]} = 1 0
8+<ERROR/>
9+Exit Status = 1
10+-------------------------------------------------------------------------------
11+(Hint for developer) If you want to step runnning, call "debugger" at starting point. Cut ` ` from call and get echo return, then show callstack inside.
12+Call tree:
13+(global) ./T_Err_Sub.sh:xx
14+ CallMain_func() ../scriptlib/bashlib.sh:xx
15+ Main_func() ./T_Err_Sub.sh:xx
16+ T_CheckPipeStatusSub_func() ./T_Err_Sub.sh:xx
17+<ERROR/>
--- /dev/null
+++ b/english/test_patch/ans/T_DoneInErrMode_ans.txt
@@ -0,0 +1,14 @@
1+
2+((( T_DoneInErrModeSub_func )))
3+0
4+after done_func
5+<ERROR/>
6+Exit Status = 1
7+-------------------------------------------------------------------------------
8+(Hint for developer) If you want to step runnning, call "debugger" at starting point. Cut ` ` from call and get echo return, then show callstack inside.
9+Call tree:
10+(global) ./T_Err_Sub.sh:xx
11+ CallMain_func() ../scriptlib/bashlib.sh:xx
12+ Main_func() ./T_Err_Sub.sh:xx
13+ T_DoneInErrModeSub_func() ./T_Err_Sub.sh:xx
14+<ERROR/>
--- /dev/null
+++ b/english/test_patch/ans/T_ErrorInErrMode_ans.txt
@@ -0,0 +1,20 @@
1+
2+((( T_ErrorInErrModeSub_func )))
3+<ERROR msg="Another error is raised in error handling mode"/>
4+<ERROR msg="2nd" attr="1"/>
5+Call tree:
6+(global) ./T_Err_Sub.sh:xx
7+ CallMain_func() ../scriptlib/bashlib.sh:xx
8+ Main_func() ./T_Err_Sub.sh:xx
9+ T_ErrorInErrModeSub_func() ./T_Err_Sub.sh:xx
10+ T_ErrorInErrModeSubSub_func() ./T_Err_Sub.sh:xx
11+<ERROR msg="1st"/>
12+Exit Status = 1
13+-------------------------------------------------------------------------------
14+(Hint for developer) If you want to step runnning, call "debugger" at starting point. Cut ` ` from call and get echo return, then show callstack inside.
15+Call tree:
16+(global) ./T_Err_Sub.sh:xx
17+ CallMain_func() ../scriptlib/bashlib.sh:xx
18+ Main_func() ./T_Err_Sub.sh:xx
19+ T_ErrorInErrModeSub_func() ./T_Err_Sub.sh:xx
20+<ERROR msg="1st"/>
--- /dev/null
+++ b/english/test_patch/ans/T_NotTryLoop_ans.txt
@@ -0,0 +1,12 @@
1+
2+((( T_NotTryLoopSub_func )))
3+<ERROR msg="B"/>
4+Exit Status = 1
5+-------------------------------------------------------------------------------
6+(Hint for developer) If you want to step runnning, call "debugger" at starting point. Cut ` ` from call and get echo return, then show callstack inside.
7+Call tree:
8+(global) ./T_Err_Sub.sh:xx
9+ CallMain_func() ../scriptlib/bashlib.sh:xx
10+ Main_func() ./T_Err_Sub.sh:xx
11+ T_NotTryLoopSub_func() ./T_Err_Sub.sh:xx
12+<ERROR msg="B"/>
--- /dev/null
+++ b/english/test_patch/ans/T_TryLv0_ans.txt
@@ -0,0 +1,14 @@
1+
2+((( T_TryLv0Sub_func )))
3+Try_Raise_func (in)
4+<ERROR msg="in Try_Raise_func"/>
5+Exit Status = 1
6+-------------------------------------------------------------------------------
7+(Hint for developer) If you want to step runnning, call "debugger" at starting point. Cut ` ` from call and get echo return, then show callstack inside.
8+Call tree:
9+(global) ./T_Err_Sub.sh:xx
10+ CallMain_func() ../scriptlib/bashlib.sh:xx
11+ Main_func() ./T_Err_Sub.sh:xx
12+ T_TryLv0Sub_func() ./T_Err_Sub.sh:xx
13+ Try_Raise_func() ./T_Err_Sub.sh:xx
14+<ERROR msg="in Try_Raise_func"/>
--- /dev/null
+++ b/english/test_patch/ans/T_TryLv1Clear_ans.txt
@@ -0,0 +1,5 @@
1+
2+((( T_TryLv1ClearSub_func )))
3+Try_Raise_func (in)
4+exit status = 1
5+after try block
--- /dev/null
+++ b/english/test_patch/ans/T_TryLv1Proc1_ans.txt
@@ -0,0 +1,28 @@
1+
2+((( T_TryLv1Proc1Sub_func )))
3+Try_Raise2_func (in)
4+exit status = 2
5+after try lv2 block
6+<ERROR/>
7+Exit Status = 2
8+-------------------------------------------------------------------------------
9+(Hint for developer) If you want to step runnning, call "debugger" at starting point. Cut ` ` from call and get echo return, then show callstack inside.
10+Call tree:
11+(global) ./T_Err_Sub.sh:xx
12+ CallMain_func() ../scriptlib/bashlib.sh:xx
13+ Main_func() ./T_Err_Sub.sh:xx
14+ T_TryLv1Proc1SubSub_func() ./T_Err_Sub.sh:xx
15+ Try_Raise2_func() ./T_Err_Sub.sh:xx
16+<ERROR/>
17+exit status = 2
18+after try lv1 block
19+<ERROR/>
20+Exit Status = 2
21+-------------------------------------------------------------------------------
22+(Hint for developer) If you want to step runnning, call "debugger" at starting point. Cut ` ` from call and get echo return, then show callstack inside.
23+Call tree:
24+(global) ./T_Err_Sub.sh:xx
25+ CallMain_func() ../scriptlib/bashlib.sh:xx
26+ Main_func() ./T_Err_Sub.sh:xx
27+ T_TryLv1Proc1Sub_func() ./T_Err_Sub.sh:xx
28+<ERROR/>
--- /dev/null
+++ b/english/test_patch/ans/T_TryLv1_ans.txt
@@ -0,0 +1,16 @@
1+
2+((( T_TryLv1Sub_func )))
3+Try_Raise_func (in)
4+exit status = 1
5+after try block
6+<ERROR msg="in Try_Raise_func"/>
7+Exit Status = 1
8+-------------------------------------------------------------------------------
9+(Hint for developer) If you want to step runnning, call "debugger" at starting point. Cut ` ` from call and get echo return, then show callstack inside.
10+Call tree:
11+(global) ./T_Err_Sub.sh:xx
12+ CallMain_func() ../scriptlib/bashlib.sh:xx
13+ Main_func() ./T_Err_Sub.sh:xx
14+ T_TryLv1Sub_func() ./T_Err_Sub.sh:xx
15+ Try_Raise_func() ./T_Err_Sub.sh:xx
16+<ERROR msg="in Try_Raise_func"/>
--- /dev/null
+++ b/english/test_patch/ans/T_TryLv2Change_ans.txt
@@ -0,0 +1,17 @@
1+
2+((( T_TryLv2ChangeSub_func )))
3+exit status = 1
4+after try lv2 block
5+exit status = 1
6+after try lv1 block
7+<ERROR msg="Overwritten Message"/>
8+Exit Status = 1
9+-------------------------------------------------------------------------------
10+(Hint for developer) If you want to step runnning, call "debugger" at starting point. Cut ` ` from call and get echo return, then show callstack inside.
11+Call tree:
12+(global) ./T_Err_Sub.sh:xx
13+ CallMain_func() ../scriptlib/bashlib.sh:xx
14+ Main_func() ./T_Err_Sub.sh:xx
15+ T_TryLv2ChangeSub_func() ./T_Err_Sub.sh:xx
16+ T_TryLv2ChangeSubSub_func() ./T_Err_Sub.sh:xx
17+<ERROR msg="Overwritten Message"/>
--- /dev/null
+++ b/english/test_patch/ans/T_TryLv2_ans.txt
@@ -0,0 +1,19 @@
1+
2+((( T_TryLv2Sub_func )))
3+Try_Raise2_func (in)
4+exit status = 2
5+after try lv2 block
6+exit status = 2
7+after try lv1 block
8+<ERROR/>
9+Exit Status = 2
10+-------------------------------------------------------------------------------
11+(Hint for developer) If you want to step runnning, call "debugger" at starting point. Cut ` ` from call and get echo return, then show callstack inside.
12+Call tree:
13+(global) ./T_Err_Sub.sh:xx
14+ CallMain_func() ../scriptlib/bashlib.sh:xx
15+ Main_func() ./T_Err_Sub.sh:xx
16+ T_TryLv2Sub_func() ./T_Err_Sub.sh:xx
17+ T_TryLv2SubSub_func() ./T_Err_Sub.sh:xx
18+ Try_Raise2_func() ./T_Err_Sub.sh:xx
19+<ERROR/>
--- /dev/null
+++ b/english/test_patch/ans/T_WS_ans.txt
@@ -0,0 +1,9 @@
1+
2+((( T_WSSub_func )))
3+Dump "$var" == 'AB DE'
4+00000000 41 42 20 20 44 45 |AB DE|
5+00000006
6+Dump "$var2" == 'AB CD
7+E'
8+00000000 41 42 09 43 44 0a 45 |AB.CD.E|
9+00000007
--- a/menu
+++ b/menu
@@ -33,7 +33,7 @@ function Main_func()
3333 "Test" "Test_sth_func" \
3434
3535 SetAttr_as_AssociativeArrayName_func $obj MenuCaption \
36- "1" "ヘルプを開く (HTML5+SVG 対応ブラウザで見えます) [Help]" \
36+ "1" "ヘルプを開く (HTML5+SVG 対応ブラウザ Chrome, Safari で見えます) [Help]" \
3737 "2" "ファイルを検索する [SearchFile]" \
3838 "3" "新規作成する - bashlib が使えるシェル・スクリプト・ファイル [NewSh]" \
3939 "4" "新規作成する - ショートハンド・プロンプトのメニュー [NewMenu]" \
@@ -272,10 +272,10 @@ function chmod_x_sth_func()
272272 #//*********************************************************************
273273 function Test_sth_func()
274274 {
275- if [ ! -e "test" ];then
276- if [ -e "../test/Test.sh" ];then
277- cp -rap "../test" "."
278- fi
275+ if [ -e "test_patch" ];then
276+ cp -Rap "../test" "."
277+ cp -Rap test_patch/* "test"
278+ rm -r "test_patch"
279279 fi
280280
281281 test/Test.sh
--- a/sample/samples.trans
+++ b/sample/samples.trans
@@ -1,6 +1,7 @@
11 <?xml version="1.0" encoding="UTF-8"?>
22 <Translate>
33 <File charset="utf-8">../menu</File>
4+<File charset="utf-8">../test/Test.sh</File>
45 <File charset="utf-8">Menu.sh</File>
56 <File charset="utf-8">OptionCall.sh</File>
67 <File charset="utf-8">Sample.sh</File>
@@ -23,8 +24,9 @@
2324
2425 <!-- ../menu -->
2526
26-<T><JP>ヘルプを開く (HTML5+SVG 対応ブラウザで見えます) </JP>
27- <EN>Open help (for HTML5+SVG browser)</EN></T>
27+<T><JP>ヘルプを開く (HTML5+SVG 対応ブラウザ Chrome, Safari で見えます)</JP>
28+ <EN>Open Japanese help (for HTML5+SVG browser, Chrome, Safari)</EN></T>
29+<T><JP>document/bashlib.html</JP><EN>../document/bashlib.html</EN></T>
2830 <T><JP>ファイルを検索する</JP><EN>Search file</EN></T>
2931 <T><JP>新規作成する - bashlib が使えるシェル・スクリプト・ファイル</JP>
3032 <EN>New - Shell script file for bashlib</EN></T>
@@ -48,7 +50,7 @@
4850 <T><JP>$parent_path/scriptlib フォルダーを作成しました。</JP>
4951 <EN>Created $parent_path/scriptlib folder.</EN></T>
5052 <T><JP>シェルから、『./$name』と入力すると起動できます。</JP>
51- <EN>You can start by input \"./name\" in shell</EN></T>
53+ <EN>You can start by input \"./$name\" in shell</EN></T>
5254 <T><JP>圧縮ファイルのパス</JP><EN>compressed file path</EN></T>
5355 <T><JP>ファイル名を一覧する</JP><EN>List up file names</EN></T>
5456 <T><JP>解凍先フォルダーのパス</JP><EN>Extracted folder path</EN></T>
@@ -61,6 +63,13 @@
6163 <EN>Test of error message</EN></T>
6264
6365
66+<!-- ../test/Test.sh -->
67+<T><JP>テスト済みバージョン:</JP><EN>Tested version : </EN></T>
68+<T><JP>このマシンのバージョン:</JP><EN>This machine's version : </EN></T>
69+<T><JP> echo "手動テスト(T_*_Manullay.sh) は別途行ってください。"</JP><EN></EN></T>
70+<T><JP> echo "bashlib へのシンボリック・リンクの中でもテストしてください。"</JP><EN></EN></T>
71+
72+
6473 <!-- Menu.sh -->
6574 <T><JP>何か文字を入力してください</JP><EN>Type any characters</EN></T>
6675 <T><JP>入力した内容は、『$g_Ret』です。</JP><EN>Input characters are \"$g_Ret\".</EN></T>
--- a/scriptlib/bashlib.trans
+++ b/scriptlib/bashlib.trans
@@ -3,6 +3,17 @@
33 <File charset="utf-8">bashlib.sh</File>
44 <File charset="utf-8">bashlib_inc.sh</File>
55 <File charset="utf-8">bashlib3.sh</File>
6+<File charset="utf-8">../test/ans/T_CheckMaxArgCount_ans.txt</File>
7+<File charset="utf-8">../test/ans/T_CheckPipeStatus_ans.txt</File>
8+<File charset="utf-8">../test/ans/T_DoneInErrMode_ans.txt</File>
9+<File charset="utf-8">../test/ans/T_ErrorInErrMode_ans.txt</File>
10+<File charset="utf-8">../test/ans/T_NotTryLoop_ans.txt</File>
11+<File charset="utf-8">../test/ans/T_TryLv0_ans.txt</File>
12+<File charset="utf-8">../test/ans/T_TryLv1_ans.txt</File>
13+<File charset="utf-8">../test/ans/T_TryLv1Clear_ans.txt</File>
14+<File charset="utf-8">../test/ans/T_TryLv1Proc1_ans.txt</File>
15+<File charset="utf-8">../test/ans/T_TryLv2_ans.txt</File>
16+<File charset="utf-8">../test/ans/T_TryLv2Change_ans.txt</File>
617
718 <T><JP>続行するには Enter キーを押してください . . .</JP><EN>Press Enter key to continue ...</EN></T>
819
@@ -37,6 +48,9 @@
3748 <EN>Parameters length is short. specified=${#Arguments[@]}, requested</EN></T>
3849 <T><JP>パラメーターが多すぎます。 指定=${#Arguments[@]}, 要求</JP>
3950 <EN>Parameters length is long. specified=${#Arguments[@]}, requested</EN></T>
51+<T><JP>パラメーターが多すぎます。 指定=2, 要求=1</JP>
52+ <EN>Parameters length is long. specified=2, requested=1</EN></T>
53+
4054
4155 <T><JP>すでにファイルが存在しています。</JP><EN>Already file exists.</EN></T>
4256 <T><JP>すでにフォルダーが存在しています。</JP><EN>Already folder exists.</EN></T>
@@ -76,6 +90,9 @@
7690 <EN>(Hint for developer) If you want to step runnning, call \"debugger\" at starting point.</EN></T>
7791 <T><JP>下記コールツリーの最も下の関数が、\` \` を使って echo 出力を取得しているときは、取得しないようにすると、更にコール先の関数が表示されます。</JP>
7892 <EN>Cut \` \` from call and get echo return, then show callstack inside.</EN></T>
93+<T><JP>(開発者向けヒント)ステップ実行したいときは、開始するところから "debugger" 関数を呼び出してください。 下記コールツリーの最も下の関数が、` ` を使って echo 出力を取得しているときは、取得しないようにすると、更にコール先の関数が表示されます。</JP>
94+ <EN>(Hint for developer) If you want to step runnning, call "debugger" at starting point. Cut ` ` from call and get echo return, then show callstack inside.</EN></T>
95+
7996 <T><JP>エラー処理中に別のエラーが発生しました。</JP>
8097 <EN>Another error is raised in error handling mode</EN></T>
8198 <T><JP>コールツリー:</JP><EN>Call tree:</EN></T>
--- a/test/T_Err.sh
+++ b/test/T_Err.sh
@@ -255,7 +255,10 @@ function T_TryEnd2NoParam_func()
255255 T_TryEnd2NoParamSub_func
256256 TryEnd1_func; done ;TryEnd2_func $?
257257 StringClass.indexOf_method "$g_Err_Desc" "パラメーターの数"
258- if [ "$g_Ret" == "-1" ]; then Error_func ;fi
258+ if [ "$g_Ret" == "-1" ]; then
259+ StringClass.indexOf_method "$g_Err_Desc" "parameters length"
260+ if [ "$g_Ret" == "-1" ]; then Error_func ;fi
261+ fi
259262 if [ "$g_ExitStatus" == "0" ]; then Error_func "Error exptected" ;fi
260263 echo "${g_Err_Desc}${LF}This error is OK"; ErrClass.clear_method
261264 }
@@ -281,7 +284,10 @@ function T_DoneNoParam_func()
281284 T_DoneNoParamSub_func
282285 TryEnd1_func; done ;TryEnd2_func $?
283286 StringClass.indexOf_method "$g_Err_Desc" "パラメーターの数"
284- if [ "$g_Ret" == "-1" ]; then Error_func ;fi
287+ if [ "$g_Ret" == "-1" ]; then
288+ StringClass.indexOf_method "$g_Err_Desc" "parameters length"
289+ if [ "$g_Ret" == "-1" ]; then Error_func ;fi
290+ fi
285291 if [ "$g_ExitStatus" == "0" ]; then Error_func "Error exptected" ;fi
286292 echo "${g_Err_Desc}${LF}This error is OK"; ErrClass.clear_method
287293 }
@@ -340,7 +346,7 @@ function RunAndLogCheck_func()
340346 ./T_Err_Sub.sh --$SubProcessFuncName 2>&1 | tee out.txt
341347 TryEnd1_func; done ;TryEnd2_func $?
342348 if [ "$g_ExitStatus" != "0" ];then echo "This error is OK" ;fi
343- sed -i.bak -e "s/:[0-9]*$/:xx/" \
349+ sed -i.bak -e "s/:[0-9][0-9]*$/:xx/" \
344350 -e "s/line [0-9]*: NotDefined/line xx: NotDefined/" \
345351 -e "s/行 [0-9]*: NotDefined/line xx: NotDefined/" \
346352 out.txt ; rm out.txt.bak
--- a/test/T_Str.sh
+++ b/test/T_Str.sh
@@ -1155,7 +1155,10 @@ function T_local_func()
11551155 echo "$g_Err_Desc"
11561156 if [ "$g_ExitStatus" == "0" ]; then Error_func "Error exptected" ;fi
11571157 StringClass.indexOf_method "$g_Err_Desc" "出力引数"
1158- Assert_func $g_Ret -gt 0
1158+ if [ "$g_Ret" == "-1" ];then
1159+ StringClass.indexOf_method "$g_Err_Desc" "Output argument"
1160+ if [ "$g_Ret" == "-1" ];then Error_func ;fi
1161+ fi
11591162 ErrClass.clear_method
11601163 echo "This error is OK"
11611164
@@ -1174,7 +1177,10 @@ function T_local_func()
11741177 echo "$g_Err_Desc"
11751178 if [ "$g_ExitStatus" == "0" ]; then Error_func "Error exptected" ;fi
11761179 StringClass.indexOf_method "$g_Err_Desc" "出力引数"
1177- Assert_func $g_Ret -gt 0
1180+ if [ "$g_Ret" == "-1" ];then
1181+ StringClass.indexOf_method "$g_Err_Desc" "Output argument"
1182+ if [ "$g_Ret" == "-1" ];then Error_func ;fi
1183+ fi
11781184 ErrClass.clear_method
11791185 echo "This error is OK"
11801186 }
--- a/test/Test.sh
+++ b/test/Test.sh
@@ -5,9 +5,9 @@
55
66 function Main_func()
77 {
8- echo "テスト済み: GNU bash 4.1.5, 3.2.48"
9- echo ""
10- /bin/bash --version
8+ echo "テスト済みバージョン: GNU bash 4.1.5, 3.2.48"
9+ echo "このマシンのバージョン:"
10+ /bin/bash --version | head -n 1
1111 Pause_func --time_out=10
1212 ./T_Menu.sh
1313 ./T_File.sh
Show on old repository browser