607a96d4 |
1 | set aTestName "caf001-E3" |
2 | puts ${aTestName} |
3 | set LabelsList { \ |
4 | { 0:11 "Tu sais je n'ai jamais t aussi hereux que ce matin-l" } \ |
5 | { 0:12 "\"Tu sais je n'ai jamais t aussi hereux que ce matin-l\"" } \ |
6 | { 0:13 "<Tu sais je n'ai jamais t aussi hereux que ce matin-l>" } \ |
7 | { 0:14 "Tu m'as dit \"J'ai rendez-vous dans un sous-sol avec des fous" } \ |
8 | { 0:15 "\"Tu m'as dit \"J'ai rendez-vous dans un sous-sol avec des fous\"" } \ |
9 | { 0:16 "Il <n'avait plus rien cr> dans ce monde triste" } \ |
10 | } |
11 | |
12 | # Add an attribute to a data framework |
13 | foreach Label $LabelsList { |
14 | Label D [lindex $Label 0] |
15 | SetName D [lindex $Label 0] [lindex $Label 1] |
16 | } |
17 | |
18 | # Close/Open the transaction |
19 | NewCommand D |
20 | |
21 | # Save the document |
22 | set aFile $WorkDirectory/${aTestName}.${FileSuffix} |
23 | |
24 | SaveToFile D $aFile |
25 | |
26 | # Restore the document |
27 | Close D |
28 | Open ${aFile} DD |
29 | |
30 | # Check the restored values |
31 | |
32 | foreach Label $LabelsList { |
33 | set IsDone [catch { set aGetAttr [GetName DD [lindex $Label 0]] } aResult] |
34 | if $IsDone { |
35 | puts "Error : Get a TDataStd_Name attribute from restored document" |
36 | } else { |
37 | if [string compare $aGetAttr [lindex $Label 1]] { |
38 | puts "Error : different strings" |
39 | } |
40 | } |
41 | } |