1 'encoding UTF-8 Do not remove or change this line!
2 '**************************************************************************
3 '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 '* Copyright 2008 by Sun Microsystems, Inc.
7 '* OpenOffice.org - a multi-platform office productivity suite
9 '* $RCSfile: hhConversion3.inc,v $
13 '* last change: $Author: vg $ $Date: 2008-08-18 12:30:14 $
15 '* This file is part of OpenOffice.org.
17 '* OpenOffice.org is free software: you can redistribute it and/or modify
18 '* it under the terms of the GNU Lesser General Public License version 3
19 '* only, as published by the Free Software Foundation.
21 '* OpenOffice.org is distributed in the hope that it will be useful,
22 '* but WITHOUT ANY WARRANTY; without even the implied warranty of
23 '* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 '* GNU Lesser General Public License version 3 for more details
25 '* (a copy is included in the LICENSE file that accompanied this code).
27 '* You should have received a copy of the GNU Lesser General Public License
28 '* version 3 along with OpenOffice.org. If not, see
29 '* <http://www.openoffice.org/license.html>
30 '* for a copy of the LGPLv3 License.
32 '/************************************************************************
34 '* owner : helge.delfs@sun.com
36 '* short description : Test of Hangul/Hanja Conversion - 3
38 '************************************************************************
40 ' #1 tHHOptions_1 'User defined dictionaries
41 ' #1 tHHOptions_2 'Options - New 1
42 ' #1 tHHOptions_3 'Options - New 2
43 ' #1 tHHOptions_4 'Options - New 3
44 ' #1 tHHOptions_5 'Options - Edit (Book)
45 ' #1 tHHOptions_6 'Options - Edit (Original) -1
46 ' #1 tHHOptions_7 'Options - Edit (Original) -2
47 ' #1 tHHOptions_8 'Options - Edit (Original) -3
48 ' #1 tHHOptions_9 'Options - Edit (Original) -4
49 ' #1 tHHOptions_10 'Options - Edit (Original) -5
50 ' #1 tHHOptions_11 'Options - Edit (Original) -6
51 ' #1 tHHOptions_12 'Options - Edit (Original) -7
53 '\***********************************************************************
57 Dim sTestFile as String
59 sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\hangulhanjaonversion\hangul.sxw")
61 printlog "- User defined dictionaries"
62 '/// <b> User defined dictionaries </b>
66 '/// Open a test file , which includes some
67 '/// + Korean chacters and chinese character
68 Call hFileOpen(sTestFile)
69 Call wTypeKeys "<MOD1 Home>"
71 '/// Tools / HangulHanjaConversion , Press Options button ,
72 '/// + there should be no entries in User defined dictionaries
73 ToolsLanguageHangulHanjaConversion
74 Kontext "HangulHanjaConversion"
77 Kontext "HangulHanjaOptions"
78 if UserDefineDictionary.GetItemCount <> 0 then
79 Warnlog "With a standard installation the will be no entry here !"
81 HangulHanjaOptions.Cancel
83 Kontext "HangulHanjaConversion"
84 HangulHanjaConversion.Close
90 '-----------------------------------------------------------------
94 Dim sTestFile as String
95 Dim sDictionaryName1 as String
96 Dim sDictionaryName2 as String
98 sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\hangulhanjaonversion\hangul.sxw")
99 sDictionaryName1 = "myDictionary1"
100 sDictionaryName2 = "myDictionary2"
102 printlog "- Options - New -1"
103 '/// <b> Options - New (more than 2 dictionaries) </b>
107 '/// Open a test file , which includes some
108 '/// + Korean chacters and chinese character
109 Call hFileOpen(sTestFile)
110 Call wTypeKeys "<MOD1 Home>"
112 '/// Tools / HangulHanjaConversion , Press Options button ,
113 '/// + then press new button , enter 1 new dictionar name ,
114 '/// + close the new dictionary dialog , and add another new
115 '/// + dictionary name
116 ToolsLanguageHangulHanjaConversion
117 Kontext "HangulHanjaConversion"
120 Kontext "HangulHanjaOptions"
122 Kontext "HangulHanjaNewDictionary"
123 if NOT HangulHanjaNewDictionary.Exists then
124 Warnlog "The window isn't up!"
125 Kontext "HangulHanjaOptions"
128 DictionaryName.SetText sDictionaryName1
129 HangulHanjaNewDictionary.OK
131 Kontext "HangulHanjaOptions"
133 Kontext "HangulHanjaNewDictionary"
134 DictionaryName.SetText sDictionaryName2
135 HangulHanjaNewDictionary.OK
137 '/// Test if the new dictionaries' name exist and are checked
138 Kontext "HangulHanjaOptions"
139 UserDefineDictionary.typekeys "<Home>"
140 if UserDefineDictionary.GetSelText <> sDictionaryName1 then
141 Warnlog "The dictionary1 name should be " & sDictionaryName & " but get " & UserDefineDictionary.GetSelText
143 if UserDefineDictionary.IsChecked <> TRUE then
144 Warnlog "The dictionary1 entry should be checked!"
147 UserDefineDictionary.typekeys "<Down>"
148 if UserDefineDictionary.GetSelText <> sDictionaryName2 then
149 Warnlog "The dictionary2 name should be " & sDictionaryName2 & " but get " & UserDefineDictionary.GetSelText
151 if UserDefineDictionary.IsChecked <> TRUE then
152 Warnlog "The dictionary2 entry should be checked!"
155 'remove the dictionary you just insert .
156 UserDefineDictionary.typekeys "<Home>"
157 DeleteDictionary.Click
159 DeleteDictionary.Click
162 HangulHanjaOptions.Cancel
164 Kontext "HangulHanjaConversion"
165 HangulHanjaConversion.Close
171 '-----------------------------------------------------------------
173 testcase tHHOptions_3
175 Dim sTestFile as String
176 Dim sDictionaryName as String
178 sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\hangulhanjaonversion\hangul.sxw")
179 sDictionaryName = "myDictionary"
181 printlog "- Options - New -2"
182 '/// <b> Options - New (duplicate dictionaries) </b>
186 '/// Open a test file , which includes some
187 '/// + Korean chacters and chinese characters
188 Call hFileOpen(sTestFile)
189 Call wTypeKeys "<MOD1 Home>"
191 '/// Tools / HangulHanjaConversion , Press Options button ,
192 '/// + then press new button , enter 1 new dictionary name ,
193 '/// + close the new dictionary dialog , and add this dictionary again
194 '/// + there should be a error message dialog pop up
195 ToolsLanguageHangulHanjaConversion
196 Kontext "HangulHanjaConversion"
199 Kontext "HangulHanjaOptions"
201 Kontext "HangulHanjaNewDictionary"
202 DictionaryName.SetText sDictionaryName
203 HangulHanjaNewDictionary.OK
205 Kontext "HangulHanjaOptions"
207 Kontext "HangulHanjaNewDictionary"
208 DictionaryName.SetText sDictionaryName
209 HangulHanjaNewDictionary.OK
211 if Active.Exists then
212 if Active.GetRT = 304 then
216 QAErrorLog "#i39920# The warning message box doesn't pup up ! "
218 Kontext "HangulHanjaOptions"
219 'remove the dictionary you just insert .
220 UserDefineDictionary.typekeys "<Home>"
221 DeleteDictionary.Click
223 HangulHanjaOptions.Cancel
225 Kontext "HangulHanjaConversion"
226 HangulHanjaConversion.Close
232 '-----------------------------------------------------------------
234 testcase tHHOptions_4
236 Dim sTestFile as String
237 Dim sDictionaryName as String
239 sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\hangulhanjaonversion\hangul.sxw")
240 sDictionaryName = "myDictionary"
242 printlog "- Options - New -3"
243 '/// <b> Options - New (checkbox) </b>
247 '/// Open a test file , which includes some
248 '/// + Korean chacters and chinese character
249 Call hFileOpen(sTestFile)
250 Call wTypeKeys "<MOD1 Home>"
252 '/// Tools / HangulHanjaConversion , Press Options button ,
253 '/// + then press new button , enter 1 new dictionar name ,
254 '/// + close the new dictionary dialog
255 ToolsLanguageHangulHanjaConversion
256 Kontext "HangulHanjaConversion"
259 Kontext "HangulHanjaOptions"
261 Kontext "HangulHanjaNewDictionary"
262 DictionaryName.SetText sDictionaryName
263 HangulHanjaNewDictionary.OK
265 Kontext "HangulHanjaOptions"
267 '/// Uncheck the new dictionary and close the dialog
268 Kontext "HangulHanjaOptions"
269 UserDefineDictionary.typekeys "<Home>"
270 UserDefineDictionary.UnCheck
271 HangulHanjaOptions.OK
273 '/// Press options button , check if the dictionary isn't checked
274 Kontext "HangulHanjaConversion"
276 Kontext "HangulHanjaOptions"
277 if UserDefineDictionary.IsChecked = TRUE then
278 Warnlog "The dictionary entry should NOT be checked!"
281 'remove the dictionary you just insert .
282 DeleteDictionary.Click
285 HangulHanjaOptions.Cancel
287 Kontext "HangulHanjaConversion"
288 HangulHanjaConversion.Close
294 '-----------------------------------------------------------------
296 testcase tHHOptions_5
298 Dim sTestFile as String
299 Dim sDictionaryName1 as String
300 Dim sDictionaryName2 as String
302 sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\hangulhanjaonversion\hangul.sxw")
303 sDictionaryName1 = "nDictionary1"
304 sDictionaryName2 = "mDictionary2"
306 printlog "- Options - Edit (Book)"
307 '/// <b> Options - Edit </b>
311 '/// Open a test file , which includes some
312 '/// + Korean chacters and chinese character
313 Call hFileOpen(sTestFile)
314 Call wTypeKeys "<MOD1 Home>"
316 '/// Tools / HangulHanjaConversion , Press Options button ,
317 '/// + then press new button , insert 2 new dictionaries
318 ToolsLanguageHangulHanjaConversion
319 Kontext "HangulHanjaConversion"
322 Kontext "HangulHanjaOptions"
324 Kontext "HangulHanjaNewDictionary"
325 DictionaryName.SetText sDictionaryName1
326 HangulHanjaNewDictionary.OK
328 Kontext "HangulHanjaOptions"
330 Kontext "HangulHanjaNewDictionary"
331 DictionaryName.SetText sDictionaryName2
332 HangulHanjaNewDictionary.OK
334 '/// Press Edit button
335 Kontext "HangulHanjaOptions"
337 Kontext "HangulHanjaEditDictionary"
338 if Book.GetItemText(1) <> sDictionaryName1 then
339 Warnlog "The dictionary name should be " & sDictionaryName1 & " but get " & Book.GetItemText(1)
341 if Book.GetItemText(2) <> sDictionaryName2 then
342 Warnlog "The dictionary name should be " & sDictionaryName2 & " but get " & Book.GetItemText(2)
344 HangulHanjaEditDictionary.Close
346 Kontext "HangulHanjaOptions"
347 'remove the dictionary you just insert .
348 DeleteDictionary.Click
350 DeleteDictionary.Click
352 HangulHanjaOptions.Cancel
354 Kontext "HangulHanjaConversion"
355 HangulHanjaConversion.Close
361 '-----------------------------------------------------------------
363 testcase tHHOptions_6
365 Dim sTestFile as String
366 Dim sDictionaryName as String
367 Dim sHangul1 , sHanja1a , sHanja1b as String
368 Dim sHangul2 , sHanja2a , sHanja2b as String
370 sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\hangulhanjaonversion\hangul.sxw")
371 sDictionaryName = "myDictionary"
372 sHangul1 = "에" : sHanja1a = "里" : sHanja1b = "梨"
373 sHangul2 = "를" : sHanja2a = "力" : sHanja2b = "求"
375 printlog "- Options - Edit (Original) -1"
376 '/// <b> Options - Edit (Original) -2 </b>
377 '/// <b> insert 2 entries in original, </b>
378 '/// <b> check if the result is correct when inputing </b>
379 '/// <b> the hangul character in original </b>
383 '/// Open a test file , which includes some
384 '/// + Korean chacters and chinese character
385 Call hFileOpen(sTestFile)
386 Call wTypeKeys "<MOD1 Home>"
388 '/// Tools / HangulHanjaConversion , Press Options button ,
389 '/// + then press new button , insert 1 new dictionary
390 ToolsLanguageHangulHanjaConversion
391 Kontext "HangulHanjaConversion"
394 Kontext "HangulHanjaOptions"
396 Kontext "HangulHanjaNewDictionary"
397 DictionaryName.SetText sDictionaryName
398 HangulHanjaNewDictionary.OK
400 '/// Press Edit button
401 Kontext "HangulHanjaOptions"
403 Kontext "HangulHanjaEditDictionary"
404 '/// Test new button . It should NOT active when no entry in suggestion
407 Warnlog "New button should NOT be active when no entry in suggestion !"
411 '/// Input 1 Hangul character in original
412 '/// + and 2 Hanja character in suggestion , then click new
413 Original.SetText sHangul1
415 Suggestion1.SetText sHanja1a
417 Suggestion2.SetText sHanja1b
421 '/// Input another Hangul character in original
422 '/// + and 2 Hanja character in suggestion , then click new
423 Original.SetText sHangul2
425 Suggestion1.SetText sHanja2a
427 Suggestion2.SetText sHanja2b
432 '/// Input 1st Hangul character in original ,
433 '/// + check if 2 Hanja character are in suggestion
434 Original.SetText sHangul1
436 if Suggestion1.GetText <> sHanja1a then
437 Warnlog "Don't get " & sHanja1a
439 if Suggestion2.GetText <> sHanja1b then
440 Warnlog "Don't get " & sHanja1b
443 '/// Input 2nd Hangul character in original ,
444 '/// + check if 2 Hanja character are in suggestion
445 Original.SetText sHangul2
447 if Suggestion1.GetText <> sHanja2a then
448 Warnlog "Don't get " & sHanja2a
450 if Suggestion2.GetText <> sHanja2b then
451 Warnlog "Don't get " & sHanja2b
454 HangulHanjaEditDictionary.Close
456 Kontext "HangulHanjaOptions"
457 'remove the dictionary you just insert .
458 DeleteDictionary.Click
460 HangulHanjaOptions.Cancel
462 Kontext "HangulHanjaConversion"
463 HangulHanjaConversion.Close
469 '-----------------------------------------------------------------
471 testcase tHHOptions_7
473 Dim sTestFile as String
474 Dim sDictionaryName as String
475 Dim sHangul1 , sHanja1a , sHanja1b as String
476 Dim sHangul2 , sHanja2a , sHanja2b as String
478 sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\hangulhanjaonversion\hangul.sxw")
479 sDictionaryName = "myDictionary"
480 sHangul1 = "에" : sHanja1a = "里" : sHanja1b = "梨"
481 sHangul2 = "를" : sHanja2a = "力" : sHanja2b = "求"
483 printlog "- Options - Edit (Original) -2"
484 '/// <b> Options - Edit (Original) -2 </b>
485 '/// <b> insert 2 entries in original, </b>
486 '/// <b> check if the result is correct when selecting </b>
487 '/// <b> the hangul character in original </b>
491 '/// Open a test file , which includes some
492 '/// + Korean chacters and chinese character
493 Call hFileOpen(sTestFile)
494 Call wTypeKeys "<MOD1 Home>"
496 '/// Tools / HangulHanjaConversion , Press Options button ,
497 '/// + then press new button , insert 1 new dictionary
498 ToolsLanguageHangulHanjaConversion
499 Kontext "HangulHanjaConversion"
502 Kontext "HangulHanjaOptions"
504 Kontext "HangulHanjaNewDictionary"
505 DictionaryName.SetText sDictionaryName
506 HangulHanjaNewDictionary.OK
508 '/// Press Edit button
509 Kontext "HangulHanjaOptions"
511 Kontext "HangulHanjaEditDictionary"
513 '/// Input 1 Hangul character in original
514 '/// + and 2 Hanja character in suggestion , then click new
515 Original.SetText sHangul1
517 Suggestion1.SetText sHanja1a
519 Suggestion2.SetText sHanja1b
523 '/// Input another Hangul character in original
524 '/// + and 2 Hanja character in suggestion , then click new
525 Original.SetText sHangul2
527 Suggestion1.SetText sHanja2a
529 Suggestion2.SetText sHanja2b
534 if Original.GetItemCount <> 2 then
535 Warnlog "#i39936# There should be only 2 items , but get " & Original.GetItemCount
539 '/// Select 1st Hangul character in original ,
540 '/// + check if 2 Hanja character are in suggestion
541 Original.Select sHangul1
543 if Suggestion1.GetText <> sHanja1a then
544 Warnlog "Don't get " & sHanja1a
546 if Suggestion2.GetText <> sHanja1b then
547 Warnlog "Don't get " & sHanja1b
550 '/// Input 2nd Hangul character in original ,
551 '/// + check if 2 Hanja character are in suggestion
552 Original.Select sHangul2
554 if Suggestion1.GetText <> sHanja2a then
555 Warnlog "Don't get " & sHanja2a
557 if Suggestion2.GetText <> sHanja2b then
558 Warnlog "Don't get " & sHanja2b
561 HangulHanjaEditDictionary.Close
563 Kontext "HangulHanjaOptions"
564 'remove the dictionary you just insert .
565 DeleteDictionary.Click
567 HangulHanjaOptions.Cancel
569 Kontext "HangulHanjaConversion"
570 HangulHanjaConversion.Close
576 '-----------------------------------------------------------------
578 testcase tHHOptions_8
580 Dim sTestFile as String
581 Dim sDictionaryName as String
582 Dim sHangul1 , sHanja1 as String
583 Dim sHangul2 , sHanja2 as String
585 sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\hangulhanjaonversion\hangul.sxw")
586 sDictionaryName = "myDictionary"
587 sHangul1 = "에" : sHanja1 = "里"
588 sHangul2 = "를" : sHanja2 = "力"
590 printlog "- Options - Edit (Original) -3"
591 '/// <b> Options - Edit (Original)-3 </b>
592 '/// <b> Test delele in Edit custom Dictionary dialog </b>
596 '/// Open a test file , which includes some
597 '/// + Korean chacters and chinese character
598 Call hFileOpen(sTestFile)
599 Call wTypeKeys "<MOD1 Home>"
601 '/// Tools / HangulHanjaConversion , Press Options button ,
602 '/// + then press new button , insert 1 new dictionary
603 ToolsLanguageHangulHanjaConversion
604 Kontext "HangulHanjaConversion"
607 Kontext "HangulHanjaOptions"
609 Kontext "HangulHanjaNewDictionary"
610 DictionaryName.SetText sDictionaryName
611 HangulHanjaNewDictionary.OK
613 '/// Press Edit button
614 Kontext "HangulHanjaOptions"
616 Kontext "HangulHanjaEditDictionary"
618 '/// Insert 2 entries
619 Original.SetText sHangul1
621 Suggestion1.SetText sHanja1
625 Original.SetText sHangul2
627 Suggestion1.SetText sHanja2
631 '/// Select 2nd Hangul character in original
632 Original.Select sHangul2
635 '/// Press Delete button
639 '/// Check if 2nd entry is really deleted
640 if Original.GetItemCount <> 1 then
641 Warnlog "There should be only 1 item , but get " & Original.GetItemCount
644 Original.SetText sHangul1
646 if Suggestion1.GetText <> sHanja1 then
647 Warnlog "Don't get " & sHanja1
650 HangulHanjaEditDictionary.Close
652 Kontext "HangulHanjaOptions"
653 'remove the dictionary you just insert .
654 DeleteDictionary.Click
656 HangulHanjaOptions.Cancel
658 Kontext "HangulHanjaConversion"
659 HangulHanjaConversion.Close
665 '-----------------------------------------------------------------
667 testcase tHHOptions_9
669 Dim sTestFile as String
670 Dim sDictionaryName as String
671 Dim sHangul , sHanja1 , sHanja2 as String
673 sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\hangulhanjaonversion\hangul.sxw")
674 sDictionaryName = "myDictionary"
675 sHangul = "에" : sHanja1 = "里" : sHanja2 = "力"
677 printlog "- Options - Edit (Original) -4"
678 '/// <b> Options - Edit (Original)-4 </b>
679 '/// <b> Add a suggestion </b>
683 '/// Open a test file , which includes some
684 '/// + Korean chacters and chinese character
685 Call hFileOpen(sTestFile)
686 Call wTypeKeys "<MOD1 Home>"
688 '/// Tools / HangulHanjaConversion , Press Options button ,
689 '/// + then press new button , insert 1 new dictionary
690 ToolsLanguageHangulHanjaConversion
691 Kontext "HangulHanjaConversion"
694 Kontext "HangulHanjaOptions"
696 Kontext "HangulHanjaNewDictionary"
697 DictionaryName.SetText sDictionaryName
698 HangulHanjaNewDictionary.OK
700 '/// Press Edit button
701 Kontext "HangulHanjaOptions"
703 Kontext "HangulHanjaEditDictionary"
705 '/// Insert 1 original and 1 suggestion
706 Original.SetText sHangul
708 Suggestion1.SetText sHanja1
713 '/// Input 1st Hangul character in original
714 Original.SetText sHangul
717 '/// Add a new suggestion , and press NEW again
718 Suggestion2.SetText sHanja2
723 '/// Check if 2nd entry is really added
724 Original.SetText sHangul
726 if Suggestion1.GetText <> sHanja1 then
727 Warnlog "Don't get " & sHanja1
729 if Suggestion2.GetText <> sHanja2 then
730 Warnlog "Don't get " & sHanja2
733 HangulHanjaEditDictionary.Close
735 Kontext "HangulHanjaOptions"
736 'remove the dictionary you just insert .
737 DeleteDictionary.Click
739 HangulHanjaOptions.Cancel
741 Kontext "HangulHanjaConversion"
742 HangulHanjaConversion.Close
748 '-----------------------------------------------------------------
750 testcase tHHOptions_10
752 Dim sTestFile as String
753 Dim sDictionaryName as String
754 Dim sHangul , sHanja1 , sHanja2 as String
756 sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\hangulhanjaonversion\hangul.sxw")
757 sDictionaryName = "myDictionary"
758 sHangul = "에" : sHanja1 = "里" : sHanja2 = "力"
760 printlog "- Options - Edit (Original) -5"
761 '/// <b> Options - Edit (Original)-5 </b>
762 '/// <b> Delete a suggestion </b>
766 '/// Open a test file , which includes some
767 '/// + Korean chacters and chinese character
768 Call hFileOpen(sTestFile)
769 Call wTypeKeys "<MOD1 Home>"
771 '/// Tools / HangulHanjaConversion , Press Options button ,
772 '/// + then press new button , insert 1 new dictionary
773 ToolsLanguageHangulHanjaConversion
774 Kontext "HangulHanjaConversion"
777 Kontext "HangulHanjaOptions"
779 Kontext "HangulHanjaNewDictionary"
780 DictionaryName.SetText sDictionaryName
781 HangulHanjaNewDictionary.OK
783 '/// Press Edit button
784 Kontext "HangulHanjaOptions"
786 Kontext "HangulHanjaEditDictionary"
788 '/// Insert 1 original and 2 suggestions , click NEW
789 Original.SetText sHangul
791 Suggestion1.SetText sHanja1
793 Suggestion2.SetText sHanja2
798 '/// Input 1st Hangul character in original
799 Original.SetText sHangul
802 '/// Delete 2nd suggestion , and press NEW again
803 Suggestion2.SetText ""
808 '/// Check if 2nd suggestion is really deleted
809 Original.SetText sHangul
811 if Suggestion1.GetText <> sHanja1 then
812 Warnlog "Don't get " & sHanja1
814 if Suggestion2.GetText <> "" then
815 Warnlog "#i39319# Something wrong in 2nd suggestion , get " & Suggestion2.GetText
818 HangulHanjaEditDictionary.Close
820 Kontext "HangulHanjaOptions"
821 'remove the dictionary you just insert .
822 DeleteDictionary.Click
824 HangulHanjaOptions.Cancel
826 Kontext "HangulHanjaConversion"
827 HangulHanjaConversion.Close
833 '-----------------------------------------------------------------
835 testcase tHHOptions_11
837 Dim sTestFile as String
838 Dim sDictionaryName as String
839 Dim sHangul , sHanja1 , sHanja2 as String
841 sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\hangulhanjaonversion\hangul.sxw")
842 sDictionaryName = "myDictionary"
843 sHangul = "에" : sHanja1 = "里" : sHanja2 = "力"
845 printlog "- Options - Edit (Original) -6"
846 '/// <b> Options - Edit (Original)-6 </b>
847 '/// <b> Update a suggestion </b>
851 '/// Open a test file , which includes some
852 '/// + Korean chacters and chinese character
853 Call hFileOpen(sTestFile)
854 Call wTypeKeys "<MOD1 Home>"
856 '/// Tools / HangulHanjaConversion , Press Options button ,
857 '/// + then press new button , insert 1 new dictionary
858 ToolsLanguageHangulHanjaConversion
859 Kontext "HangulHanjaConversion"
862 Kontext "HangulHanjaOptions"
864 Kontext "HangulHanjaNewDictionary"
865 DictionaryName.SetText sDictionaryName
866 HangulHanjaNewDictionary.OK
868 '/// Press Edit button
869 Kontext "HangulHanjaOptions"
871 Kontext "HangulHanjaEditDictionary"
873 '/// Insert 1 original and 1 suggestion , click NEW
874 Original.SetText sHangul
876 Suggestion1.SetText sHanja1
881 '/// Input 1st Hangul character in original
882 Original.SetText sHangul
885 '/// Update 1st suggestion , and press NEW again
886 Suggestion1.SetText sHanja2
891 '/// Check if 1st suggestion is really updated
892 Original.SetText sHangul
894 if Suggestion1.GetText <> sHanja2 then
895 Warnlog "#i39319# Don't get " & sHanja2 & " but get " & Suggestion1.GetText
898 HangulHanjaEditDictionary.Close
900 Kontext "HangulHanjaOptions"
901 'remove the dictionary you just insert .
902 DeleteDictionary.Click
904 HangulHanjaOptions.Cancel
906 Kontext "HangulHanjaConversion"
907 HangulHanjaConversion.Close
913 '-----------------------------------------------------------------
915 testcase tHHOptions_12
917 Dim sTestFile as String
918 Dim sDictionaryName as String
919 Dim sHangul , sHanja as String
921 sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\hangulhanjaonversion\hangul.sxw")
922 sDictionaryName = "myDictionary"
923 sHangul = "에" : sHanja = "里力"
925 printlog "- Options - Edit (Original) -7"
926 '/// <b> Options - Edit (Original)-7 </b>
927 '/// <b> Original length isn't same as suggestion length </b>
931 '/// Open a test file , which includes some
932 '/// + Korean chacters and chinese character
933 Call hFileOpen(sTestFile)
934 Call wTypeKeys "<MOD1 Home>"
936 '/// Tools / HangulHanjaConversion , Press Options button ,
937 '/// + then press new button , insert 1 new dictionary
938 ToolsLanguageHangulHanjaConversion
939 Kontext "HangulHanjaConversion"
942 Kontext "HangulHanjaOptions"
944 Kontext "HangulHanjaNewDictionary"
945 DictionaryName.SetText sDictionaryName
946 HangulHanjaNewDictionary.OK
948 '/// Press Edit button
949 Kontext "HangulHanjaOptions"
951 Kontext "HangulHanjaEditDictionary"
953 '/// Insert 1 original and 1 suggestion which is 2
954 '/// + hanja character , click NEW
955 Original.SetText sHangul
957 Suggestion1.SetText sHanja
962 '/// Check if a warning message appears
964 if Active.Exists then
965 if Active.GetRT = 304 then
968 Warnlog "The warning message box doesn't pop up ! "
972 Kontext "HangulHanjaEditDictionary"
973 HangulHanjaEditDictionary.Close
975 Kontext "HangulHanjaOptions"
978 Kontext "HangulHanjaEditDictionary"
980 '/// Check if the suggestion is added (should NOT)
981 '/// Input 1st Hangul character in original
982 Original.SetText sHangul
985 if Suggestion1.GetText <> "" then
986 Warnlog "Should get nothing , but get " & Suggestion1.GetText
989 HangulHanjaEditDictionary.Close
991 Kontext "HangulHanjaOptions"
992 'remove the dictionary you just insert .
993 DeleteDictionary.Click
995 HangulHanjaOptions.Cancel
997 Kontext "HangulHanjaConversion"
998 HangulHanjaConversion.Close
1004 '-----------------------------------------------------------------