| 43 | !Win32OperatingSystemTest methodsFor:'file templates'! |
| 44 | |
| 45 | unicodeRegistryExample |
| 46 | |
| 47 | ^ 'Windows Registry Editor Version 5.00 |
| 48 | |
| 49 | [HKEY_CURRENT_USER\Software\SmalltalkX-tests] |
| 50 | "emptyToTest"="" |
| 51 | "testEmptyMultiSZ"=hex(7):00,00 |
| 52 | "bledesu"="''Testing Unicode chars Šž Ä ã«ãããã''). " |
| 53 | "ããã "="Testus gradus" |
| 54 | " Šž Ä ã«. "="Testing Unicode chars Šž Ä ã«ãããã" |
| 55 | "zero"=hex: |
| 56 | "non-zero"=hex:11,10 |
| 57 | "ã "=hex:10 |
| 58 | "dword_value"=dword:000023af |
| 59 | "11"="A number name" |
| 60 | "ã"=dword:234234af |
| 61 | "qwordvalue"=hex(b):ad,61,28,a3,95,0e,74,79 |
| 62 | "qword_max"=hex(b):ff,ff,ff,ff,ff,ff,ff,ff |
| 63 | "ãã"=hex(b):ef,ad,00,00,00,00,00,00 |
| 64 | "Font_Leelawadee UI Bold"=hex(7):53,00,45,00,47,00,4f,00,45,00,55,00,49,00,42,\ |
| 65 | 00,2e,00,54,00,54,00,46,00,2c,00,53,00,65,00,67,00,6f,00,65,00,20,00,55,00,\ |
| 66 | 49,00,20,00,42,00,6f,00,6c,00,64,00,2c,00,31,00,31,00,30,00,2c,00,38,00,32,\ |
| 67 | 00,00,00,53,00,45,00,47,00,4f,00,45,00,55,00,49,00,42,00,2e,00,54,00,54,00,\ |
| 68 | 46,00,2c,00,53,00,65,00,67,00,6f,00,65,00,20,00,55,00,49,00,20,00,42,00,6f,\ |
| 69 | 00,6c,00,64,00,00,00,4d,00,45,00,49,00,52,00,59,00,4f,00,42,00,2e,00,54,00,\ |
| 70 | 54,00,43,00,2c,00,4d,00,65,00,69,00,72,00,79,00,6f,00,20,00,55,00,49,00,20,\ |
| 71 | 00,42,00,6f,00,6c,00,64,00,2c,00,31,00,32,00,30,00,2c,00,39,00,36,00,00,00,\ |
| 72 | 4d,00,45,00,49,00,52,00,59,00,4f,00,42,00,2e,00,54,00,54,00,43,00,2c,00,4d,\ |
| 73 | 00,65,00,69,00,72,00,79,00,6f,00,20,00,55,00,49,00,20,00,42,00,6f,00,6c,00,\ |
| 74 | 64,00,00,00,4d,00,53,00,4a,00,48,00,42,00,44,00,2e,00,54,00,54,00,43,00,2c,\ |
| 75 | 00,4d,00,69,00,63,00,72,00,6f,00,73,00,6f,00,66,00,74,00,20,00,4a,00,68,00,\ |
| 76 | 65,00,6e,00,67,00,48,00,65,00,69,00,20,00,55,00,49,00,20,00,42,00,6f,00,6c,\ |
| 77 | 00,64,00,2c,00,31,00,32,00,30,00,2c,00,39,00,36,00,00,00,4d,00,53,00,4a,00,\ |
| 78 | 48,00,42,00,44,00,2e,00,54,00,54,00,43,00,2c,00,4d,00,69,00,63,00,72,00,6f,\ |
| 79 | 00,73,00,6f,00,66,00,74,00,20,00,4a,00,68,00,65,00,6e,00,67,00,48,00,65,00,\ |
| 80 | 69,00,20,00,55,00,49,00,20,00,42,00,6f,00,6c,00,64,00,00,00,4d,00,53,00,59,\ |
| 81 | 00,48,00,42,00,44,00,2e,00,54,00,54,00,43,00,2c,00,4d,00,69,00,63,00,72,00,\ |
| 82 | 6f,00,73,00,6f,00,66,00,74,00,20,00,59,00,61,00,48,00,65,00,69,00,20,00,55,\ |
| 83 | 00,49,00,20,00,42,00,6f,00,6c,00,64,00,2c,00,31,00,32,00,38,00,2c,00,39,00,\ |
| 84 | 36,00,00,00,4d,00,53,00,59,00,48,00,42,00,44,00,2e,00,54,00,54,00,43,00,2c,\ |
| 85 | 00,4d,00,69,00,63,00,72,00,6f,00,73,00,6f,00,66,00,74,00,20,00,59,00,61,00,\ |
| 86 | 48,00,65,00,69,00,20,00,55,00,49,00,20,00,42,00,6f,00,6c,00,64,00,00,00,4d,\ |
| 87 | 00,41,00,4c,00,47,00,55,00,4e,00,42,00,44,00,2e,00,54,00,54,00,46,00,2c,00,\ |
| 88 | 4d,00,61,00,6c,00,67,00,75,00,6e,00,20,00,47,00,6f,00,74,00,68,00,69,00,63,\ |
| 89 | 00,20,00,42,00,6f,00,6c,00,64,00,2c,00,31,00,31,00,38,00,2c,00,39,00,36,00,\ |
| 90 | 00,00,4d,00,41,00,4c,00,47,00,55,00,4e,00,42,00,44,00,2e,00,54,00,54,00,46,\ |
| 91 | 00,2c,00,4d,00,61,00,6c,00,67,00,75,00,6e,00,20,00,47,00,6f,00,74,00,68,00,\ |
| 92 | 69,00,63,00,20,00,42,00,6f,00,6c,00,64,00,00,00,59,00,55,00,47,00,4f,00,54,\ |
| 93 | 00,48,00,42,00,2e,00,54,00,54,00,43,00,2c,00,59,00,75,00,20,00,47,00,6f,00,\ |
| 94 | 74,00,68,00,69,00,63,00,20,00,55,00,49,00,20,00,42,00,6f,00,6c,00,64,00,2c,\ |
| 95 | 00,31,00,32,00,38,00,2c,00,39,00,36,00,00,00,59,00,55,00,47,00,4f,00,54,00,\ |
| 96 | 48,00,42,00,2e,00,54,00,54,00,43,00,2c,00,59,00,75,00,20,00,47,00,6f,00,74,\ |
| 97 | 00,68,00,69,00,63,00,20,00,55,00,49,00,20,00,42,00,6f,00,6c,00,64,00,00,00,\ |
| 98 | 53,00,45,00,47,00,55,00,49,00,53,00,59,00,4d,00,2e,00,54,00,54,00,46,00,2c,\ |
| 99 | 00,53,00,65,00,67,00,6f,00,65,00,20,00,55,00,49,00,20,00,53,00,79,00,6d,00,\ |
| 100 | 62,00,6f,00,6c,00,00,00,00,00 |
| 101 | "Šž Ä ã«ããã"=hex(7):27,00,54,00,65,00,73,00,74,00,69,00,6e,00,67,00,20,00,55,\ |
| 102 | 00,6e,00,69,00,63,00,6f,00,64,00,65,00,20,00,63,00,68,00,61,00,72,00,73,00,\ |
| 103 | 20,00,59,01,20,00,7e,01,20,00,0d,01,20,00,eb,30,59,30,57,30,4b,30,4d,30,27,\ |
| 104 | 00,29,00,00,00,53,00,45,00,47,00,4f,00,45,00,55,00,49,00,42,00,2e,00,54,00,\ |
| 105 | 54,00,46,00,2c,00,53,00,65,00,67,00,6f,00,65,00,20,00,55,00,49,00,20,00,42,\ |
| 106 | 00,6f,00,6c,00,64,00,2c,00,31,00,31,00,30,00,2c,00,38,00,32,00,00,00,53,00,\ |
| 107 | 45,00,47,00,4f,00,45,00,55,00,49,00,42,00,2e,00,54,00,54,00,46,00,2c,00,53,\ |
| 108 | 00,65,00,67,00,6f,00,65,00,20,00,55,00,49,00,20,00,42,00,6f,00,6c,00,64,00,\ |
| 109 | 00,00,4d,00,45,00,49,00,52,00,59,00,4f,00,42,00,2e,00,54,00,54,00,43,00,2c,\ |
| 110 | 00,4d,00,65,00,69,00,72,00,79,00,6f,00,20,00,55,00,49,00,20,00,42,00,6f,00,\ |
| 111 | 6c,00,64,00,2c,00,31,00,32,00,30,00,2c,00,39,00,36,00,00,00,4d,00,45,00,49,\ |
| 112 | 00,52,00,59,00,4f,00,42,00,2e,00,54,00,54,00,43,00,2c,00,4d,00,65,00,69,00,\ |
| 113 | 72,00,79,00,6f,00,20,00,55,00,49,00,20,00,42,00,6f,00,6c,00,64,00,00,00,4d,\ |
| 114 | 00,53,00,4a,00,48,00,42,00,44,00,2e,00,54,00,54,00,43,00,2c,00,4d,00,69,00,\ |
| 115 | 63,00,72,00,6f,00,73,00,6f,00,66,00,74,00,20,00,4a,00,68,00,65,00,6e,00,67,\ |
| 116 | 00,48,00,65,00,69,00,20,00,55,00,49,00,20,00,42,00,6f,00,6c,00,64,00,2c,00,\ |
| 117 | 31,00,32,00,30,00,2c,00,39,00,36,00,00,00,4d,00,53,00,4a,00,48,00,42,00,44,\ |
| 118 | 00,2e,00,54,00,54,00,43,00,2c,00,4d,00,69,00,63,00,72,00,6f,00,73,00,6f,00,\ |
| 119 | 66,00,74,00,20,00,4a,00,68,00,65,00,6e,00,67,00,48,00,65,00,69,00,20,00,55,\ |
| 120 | 00,49,00,20,00,42,00,6f,00,6c,00,64,00,00,00,4d,00,53,00,59,00,48,00,42,00,\ |
| 121 | 44,00,2e,00,54,00,54,00,43,00,2c,00,4d,00,69,00,63,00,72,00,6f,00,73,00,6f,\ |
| 122 | 00,66,00,74,00,20,00,59,00,61,00,48,00,65,00,69,00,20,00,55,00,49,00,20,00,\ |
| 123 | 42,00,6f,00,6c,00,64,00,2c,00,31,00,32,00,38,00,2c,00,39,00,36,00,00,00,4d,\ |
| 124 | 00,53,00,59,00,48,00,42,00,44,00,2e,00,54,00,54,00,43,00,2c,00,4d,00,69,00,\ |
| 125 | 63,00,72,00,6f,00,73,00,6f,00,66,00,74,00,20,00,59,00,61,00,48,00,65,00,69,\ |
| 126 | 00,20,00,55,00,49,00,20,00,42,00,6f,00,6c,00,64,00,00,00,4d,00,41,00,4c,00,\ |
| 127 | 47,00,55,00,4e,00,42,00,44,00,2e,00,54,00,54,00,46,00,2c,00,4d,00,61,00,6c,\ |
| 128 | 00,67,00,75,00,6e,00,20,00,47,00,6f,00,74,00,68,00,69,00,63,00,20,00,42,00,\ |
| 129 | 6f,00,6c,00,64,00,2c,00,31,00,31,00,38,00,2c,00,39,00,36,00,00,00,4d,00,41,\ |
| 130 | 00,4c,00,47,00,55,00,4e,00,42,00,44,00,2e,00,54,00,54,00,46,00,2c,00,4d,00,\ |
| 131 | 61,00,6c,00,67,00,75,00,6e,00,20,00,47,00,6f,00,74,00,68,00,69,00,63,00,20,\ |
| 132 | 00,42,00,6f,00,6c,00,64,00,00,00,59,00,55,00,47,00,4f,00,54,00,48,00,42,00,\ |
| 133 | 2e,00,54,00,54,00,43,00,2c,00,59,00,75,00,20,00,47,00,6f,00,74,00,68,00,69,\ |
| 134 | 00,63,00,20,00,55,00,49,00,20,00,42,00,6f,00,6c,00,64,00,2c,00,31,00,32,00,\ |
| 135 | 38,00,2c,00,39,00,36,00,00,00,59,00,55,00,47,00,4f,00,54,00,48,00,42,00,2e,\ |
| 136 | 00,54,00,54,00,43,00,2c,00,59,00,75,00,20,00,47,00,6f,00,74,00,68,00,69,00,\ |
| 137 | 63,00,20,00,55,00,49,00,20,00,42,00,6f,00,6c,00,64,00,00,00,53,00,45,00,47,\ |
| 138 | 00,55,00,49,00,53,00,59,00,4d,00,2e,00,54,00,54,00,46,00,2c,00,53,00,65,00,\ |
| 139 | 67,00,6f,00,65,00,20,00,55,00,49,00,20,00,53,00,79,00,6d,00,62,00,6f,00,6c,\ |
| 140 | 00,00,00,00,00 |
| 141 | "Ugh"=hex(2):27,00,54,00,65,00,73,00,74,00,69,00,6e,00,67,00,20,00,55,00,6e,00,\ |
| 142 | 69,00,63,00,6f,00,64,00,65,00,20,00,63,00,68,00,61,00,72,00,73,00,20,00,59,\ |
| 143 | 01,20,00,7e,01,20,00,0d,01,20,00,eb,30,59,30,57,30,4b,30,4d,30,27,00,29,00,\ |
| 144 | 2e,00,20,00,20,00,20,00,20,00,20,00,20,00,20,00,20,00,20,00,20,00,00,00 |
| 145 | " Ä ã«ããã"=hex(2):27,00,54,00,65,00,73,00,74,00,69,00,6e,00,67,00,20,00,55,00,\ |
| 146 | 6e,00,69,00,63,00,6f,00,64,00,65,00,20,00,63,00,68,00,61,00,72,00,73,00,20,\ |
| 147 | 00,59,01,20,00,7e,01,20,00,0d,01,20,00,eb,30,59,30,57,30,4b,30,4d,30,27,00,\ |
| 148 | 29,00,2e,00,20,00,20,00,20,00,20,00,20,00,20,00,20,00,20,00,20,00,20,00,00,\ |
| 149 | 00 |
| 150 | |
| 151 | [HKEY_CURRENT_USER\Software\SmalltalkX-tests\ ã«ããã] |
| 152 | "bledesu"="''Testing Unicode chars Šž Ä ã«ãããã''). " |
| 153 | "ããã "="Testus gradus" |
| 154 | " Šž Ä ã«. "="Testing Unicode chars Šž Ä ã«ãããã" |
| 155 | "zero"=hex: |
| 156 | "non-zero"=hex:11,10 |
| 157 | "ã "=hex:10 |
| 158 | "dword_value"=dword:000023af |
| 159 | "ã"=dword:234234af |
| 160 | "qwordvalue"=hex(b):ad,61,28,a3,95,0e,74,79 |
| 161 | "qword_max"=hex(b):ff,ff,ff,ff,ff,ff,ff,ff |
| 162 | "ãã"=hex(b):ef,ad,00,00,00,00,00,00 |
| 163 | "Font_Leelawadee UI Bold"=hex(7):53,00,45,00,47,00,4f,00,45,00,55,00,49,00,42,\ |
| 164 | 00,2e,00,54,00,54,00,46,00,2c,00,53,00,65,00,67,00,6f,00,65,00,20,00,55,00,\ |
| 165 | 49,00,20,00,42,00,6f,00,6c,00,64,00,2c,00,31,00,31,00,30,00,2c,00,38,00,32,\ |
| 166 | 00,00,00,53,00,45,00,47,00,4f,00,45,00,55,00,49,00,42,00,2e,00,54,00,54,00,\ |
| 167 | 46,00,2c,00,53,00,65,00,67,00,6f,00,65,00,20,00,55,00,49,00,20,00,42,00,6f,\ |
| 168 | 00,6c,00,64,00,00,00,4d,00,45,00,49,00,52,00,59,00,4f,00,42,00,2e,00,54,00,\ |
| 169 | 54,00,43,00,2c,00,4d,00,65,00,69,00,72,00,79,00,6f,00,20,00,55,00,49,00,20,\ |
| 170 | 00,42,00,6f,00,6c,00,64,00,2c,00,31,00,32,00,30,00,2c,00,39,00,36,00,00,00,\ |
| 171 | 4d,00,45,00,49,00,52,00,59,00,4f,00,42,00,2e,00,54,00,54,00,43,00,2c,00,4d,\ |
| 172 | 00,65,00,69,00,72,00,79,00,6f,00,20,00,55,00,49,00,20,00,42,00,6f,00,6c,00,\ |
| 173 | 64,00,00,00,4d,00,53,00,4a,00,48,00,42,00,44,00,2e,00,54,00,54,00,43,00,2c,\ |
| 174 | 00,4d,00,69,00,63,00,72,00,6f,00,73,00,6f,00,66,00,74,00,20,00,4a,00,68,00,\ |
| 175 | 65,00,6e,00,67,00,48,00,65,00,69,00,20,00,55,00,49,00,20,00,42,00,6f,00,6c,\ |
| 176 | 00,64,00,2c,00,31,00,32,00,30,00,2c,00,39,00,36,00,00,00,4d,00,53,00,4a,00,\ |
| 177 | 48,00,42,00,44,00,2e,00,54,00,54,00,43,00,2c,00,4d,00,69,00,63,00,72,00,6f,\ |
| 178 | 00,73,00,6f,00,66,00,74,00,20,00,4a,00,68,00,65,00,6e,00,67,00,48,00,65,00,\ |
| 179 | 69,00,20,00,55,00,49,00,20,00,42,00,6f,00,6c,00,64,00,00,00,4d,00,53,00,59,\ |
| 180 | 00,48,00,42,00,44,00,2e,00,54,00,54,00,43,00,2c,00,4d,00,69,00,63,00,72,00,\ |
| 181 | 6f,00,73,00,6f,00,66,00,74,00,20,00,59,00,61,00,48,00,65,00,69,00,20,00,55,\ |
| 182 | 00,49,00,20,00,42,00,6f,00,6c,00,64,00,2c,00,31,00,32,00,38,00,2c,00,39,00,\ |
| 183 | 36,00,00,00,4d,00,53,00,59,00,48,00,42,00,44,00,2e,00,54,00,54,00,43,00,2c,\ |
| 184 | 00,4d,00,69,00,63,00,72,00,6f,00,73,00,6f,00,66,00,74,00,20,00,59,00,61,00,\ |
| 185 | 48,00,65,00,69,00,20,00,55,00,49,00,20,00,42,00,6f,00,6c,00,64,00,00,00,4d,\ |
| 186 | 00,41,00,4c,00,47,00,55,00,4e,00,42,00,44,00,2e,00,54,00,54,00,46,00,2c,00,\ |
| 187 | 4d,00,61,00,6c,00,67,00,75,00,6e,00,20,00,47,00,6f,00,74,00,68,00,69,00,63,\ |
| 188 | 00,20,00,42,00,6f,00,6c,00,64,00,2c,00,31,00,31,00,38,00,2c,00,39,00,36,00,\ |
| 189 | 00,00,4d,00,41,00,4c,00,47,00,55,00,4e,00,42,00,44,00,2e,00,54,00,54,00,46,\ |
| 190 | 00,2c,00,4d,00,61,00,6c,00,67,00,75,00,6e,00,20,00,47,00,6f,00,74,00,68,00,\ |
| 191 | 69,00,63,00,20,00,42,00,6f,00,6c,00,64,00,00,00,59,00,55,00,47,00,4f,00,54,\ |
| 192 | 00,48,00,42,00,2e,00,54,00,54,00,43,00,2c,00,59,00,75,00,20,00,47,00,6f,00,\ |
| 193 | 74,00,68,00,69,00,63,00,20,00,55,00,49,00,20,00,42,00,6f,00,6c,00,64,00,2c,\ |
| 194 | 00,31,00,32,00,38,00,2c,00,39,00,36,00,00,00,59,00,55,00,47,00,4f,00,54,00,\ |
| 195 | 48,00,42,00,2e,00,54,00,54,00,43,00,2c,00,59,00,75,00,20,00,47,00,6f,00,74,\ |
| 196 | 00,68,00,69,00,63,00,20,00,55,00,49,00,20,00,42,00,6f,00,6c,00,64,00,00,00,\ |
| 197 | 53,00,45,00,47,00,55,00,49,00,53,00,59,00,4d,00,2e,00,54,00,54,00,46,00,2c,\ |
| 198 | 00,53,00,65,00,67,00,6f,00,65,00,20,00,55,00,49,00,20,00,53,00,79,00,6d,00,\ |
| 199 | 62,00,6f,00,6c,00,00,00,00,00 |
| 200 | "Šž Ä ã«ããã"=hex(7):27,00,54,00,65,00,73,00,74,00,69,00,6e,00,67,00,20,00,55,\ |
| 201 | 00,6e,00,69,00,63,00,6f,00,64,00,65,00,20,00,63,00,68,00,61,00,72,00,73,00,\ |
| 202 | 20,00,59,01,20,00,7e,01,20,00,0d,01,20,00,eb,30,59,30,57,30,4b,30,4d,30,27,\ |
| 203 | 00,29,00,00,00,53,00,45,00,47,00,4f,00,45,00,55,00,49,00,42,00,2e,00,54,00,\ |
| 204 | 54,00,46,00,2c,00,53,00,65,00,67,00,6f,00,65,00,20,00,55,00,49,00,20,00,42,\ |
| 205 | 00,6f,00,6c,00,64,00,2c,00,31,00,31,00,30,00,2c,00,38,00,32,00,00,00,53,00,\ |
| 206 | 45,00,47,00,4f,00,45,00,55,00,49,00,42,00,2e,00,54,00,54,00,46,00,2c,00,53,\ |
| 207 | 00,65,00,67,00,6f,00,65,00,20,00,55,00,49,00,20,00,42,00,6f,00,6c,00,64,00,\ |
| 208 | 00,00,4d,00,45,00,49,00,52,00,59,00,4f,00,42,00,2e,00,54,00,54,00,43,00,2c,\ |
| 209 | 00,4d,00,65,00,69,00,72,00,79,00,6f,00,20,00,55,00,49,00,20,00,42,00,6f,00,\ |
| 210 | 6c,00,64,00,2c,00,31,00,32,00,30,00,2c,00,39,00,36,00,00,00,4d,00,45,00,49,\ |
| 211 | 00,52,00,59,00,4f,00,42,00,2e,00,54,00,54,00,43,00,2c,00,4d,00,65,00,69,00,\ |
| 212 | 72,00,79,00,6f,00,20,00,55,00,49,00,20,00,42,00,6f,00,6c,00,64,00,00,00,4d,\ |
| 213 | 00,53,00,4a,00,48,00,42,00,44,00,2e,00,54,00,54,00,43,00,2c,00,4d,00,69,00,\ |
| 214 | 63,00,72,00,6f,00,73,00,6f,00,66,00,74,00,20,00,4a,00,68,00,65,00,6e,00,67,\ |
| 215 | 00,48,00,65,00,69,00,20,00,55,00,49,00,20,00,42,00,6f,00,6c,00,64,00,2c,00,\ |
| 216 | 31,00,32,00,30,00,2c,00,39,00,36,00,00,00,4d,00,53,00,4a,00,48,00,42,00,44,\ |
| 217 | 00,2e,00,54,00,54,00,43,00,2c,00,4d,00,69,00,63,00,72,00,6f,00,73,00,6f,00,\ |
| 218 | 66,00,74,00,20,00,4a,00,68,00,65,00,6e,00,67,00,48,00,65,00,69,00,20,00,55,\ |
| 219 | 00,49,00,20,00,42,00,6f,00,6c,00,64,00,00,00,4d,00,53,00,59,00,48,00,42,00,\ |
| 220 | 44,00,2e,00,54,00,54,00,43,00,2c,00,4d,00,69,00,63,00,72,00,6f,00,73,00,6f,\ |
| 221 | 00,66,00,74,00,20,00,59,00,61,00,48,00,65,00,69,00,20,00,55,00,49,00,20,00,\ |
| 222 | 42,00,6f,00,6c,00,64,00,2c,00,31,00,32,00,38,00,2c,00,39,00,36,00,00,00,4d,\ |
| 223 | 00,53,00,59,00,48,00,42,00,44,00,2e,00,54,00,54,00,43,00,2c,00,4d,00,69,00,\ |
| 224 | 63,00,72,00,6f,00,73,00,6f,00,66,00,74,00,20,00,59,00,61,00,48,00,65,00,69,\ |
| 225 | 00,20,00,55,00,49,00,20,00,42,00,6f,00,6c,00,64,00,00,00,4d,00,41,00,4c,00,\ |
| 226 | 47,00,55,00,4e,00,42,00,44,00,2e,00,54,00,54,00,46,00,2c,00,4d,00,61,00,6c,\ |
| 227 | 00,67,00,75,00,6e,00,20,00,47,00,6f,00,74,00,68,00,69,00,63,00,20,00,42,00,\ |
| 228 | 6f,00,6c,00,64,00,2c,00,31,00,31,00,38,00,2c,00,39,00,36,00,00,00,4d,00,41,\ |
| 229 | 00,4c,00,47,00,55,00,4e,00,42,00,44,00,2e,00,54,00,54,00,46,00,2c,00,4d,00,\ |
| 230 | 61,00,6c,00,67,00,75,00,6e,00,20,00,47,00,6f,00,74,00,68,00,69,00,63,00,20,\ |
| 231 | 00,42,00,6f,00,6c,00,64,00,00,00,59,00,55,00,47,00,4f,00,54,00,48,00,42,00,\ |
| 232 | 2e,00,54,00,54,00,43,00,2c,00,59,00,75,00,20,00,47,00,6f,00,74,00,68,00,69,\ |
| 233 | 00,63,00,20,00,55,00,49,00,20,00,42,00,6f,00,6c,00,64,00,2c,00,31,00,32,00,\ |
| 234 | 38,00,2c,00,39,00,36,00,00,00,59,00,55,00,47,00,4f,00,54,00,48,00,42,00,2e,\ |
| 235 | 00,54,00,54,00,43,00,2c,00,59,00,75,00,20,00,47,00,6f,00,74,00,68,00,69,00,\ |
| 236 | 63,00,20,00,55,00,49,00,20,00,42,00,6f,00,6c,00,64,00,00,00,53,00,45,00,47,\ |
| 237 | 00,55,00,49,00,53,00,59,00,4d,00,2e,00,54,00,54,00,46,00,2c,00,53,00,65,00,\ |
| 238 | 67,00,6f,00,65,00,20,00,55,00,49,00,20,00,53,00,79,00,6d,00,62,00,6f,00,6c,\ |
| 239 | 00,00,00,00,00 |
| 240 | "Ugh"=hex(2):27,00,54,00,65,00,73,00,74,00,69,00,6e,00,67,00,20,00,55,00,6e,00,\ |
| 241 | 69,00,63,00,6f,00,64,00,65,00,20,00,63,00,68,00,61,00,72,00,73,00,20,00,59,\ |
| 242 | 01,20,00,7e,01,20,00,0d,01,20,00,eb,30,59,30,57,30,4b,30,4d,30,27,00,29,00,\ |
| 243 | 2e,00,20,00,20,00,20,00,20,00,20,00,20,00,20,00,20,00,20,00,20,00,00,00 |
| 244 | " Ä ã«ããã"=hex(2):27,00,54,00,65,00,73,00,74,00,69,00,6e,00,67,00,20,00,55,00,\ |
| 245 | 6e,00,69,00,63,00,6f,00,64,00,65,00,20,00,63,00,68,00,61,00,72,00,73,00,20,\ |
| 246 | 00,59,01,20,00,7e,01,20,00,0d,01,20,00,eb,30,59,30,57,30,4b,30,4d,30,27,00,\ |
| 247 | 29,00,2e,00,20,00,20,00,20,00,20,00,20,00,20,00,20,00,20,00,20,00,20,00,00,\ |
| 248 | 00 |
| 249 | |
| 250 | [HKEY_CURRENT_USER\Software\SmalltalkX-tests\ ã«ããã\256_chars_max_long|arsdfasdfjljljasdf;jl;jljsfasdfasdfljaslkdfjkasdfljalsd;jfa;lsdjflkasjdflkajsdflkjasdflkjsadlfjasldfjlsadjflksdjflksadjflkajsdflkjasdlfjalskdjflkasdjflkasdfkj;sdaf;kljkkjkklkjjjjkas|1asdfjsldfjlasdlfjlasdjfljasdlfjalsdjflajdfsdsasdfa|end] |
| 251 | "testing"=" ã«ããã" |
| 252 | "ã"=dword:00000002 |
| 253 | "256_chars_max_long|arsdfasdfjljljasdf;jl;jljsfasdfasdfljaslkdfjkasdfljalsd;jfa;lsdjflkasjdflkajsdflkjasdflkjsadlfjasldfjlsadjflksdjflksadjflkajsdflkjasdlfjalskdjflkasdjflkasdfkj;sdaf;kljkkjkklkjjjjkas|1asdfjsldfjlasdlfjlasdjfljasdlfjalsdjflajdfsdsasdfa|end"="Longer_than_256_chars_max_long|arsdfasdfjljljasdf;jl;jljsfasdfasdfljaslkdfjkasdfljalsd;jfa;lsdjflkasjdflkajsdflkjasdflkjsadlfjasldfjlsadjflksdjflksadjflkajsdflkjasdlfjalskdjflkasdjflkasdfkj;sdaf;kljkkjkklkjjjjkas|1asdfjsldfjlasdlfjlasdjfljasdlfjalsdjflajdfsdsasdfa|endsdfsdfasdfasdfasdfjlkasdjflkasjdflkjasdlfjaslkdfjlkasdjflkasdflksadlkjsadlfalsdfůlasdjflkasdjflkasjdflkůjasdflůkjasdlůfjalsůkdjflůksd" |
| 254 | |
| 255 | [HKEY_CURRENT_USER\Software\SmalltalkX-tests\ ã«ããã\256_chars_max_long|arsdfasdfjljljasdf;jl;jljsfasdfasdfljaslkdfjkasdfljalsd;jfa;lsdjflkasjdflkajsdflkjasdflkjsadlfjasldfjlsadjflksdjflksadjflkajsdflkjasdlfjalskdjflkasdjflkasdfkj;sdaf;kljkkjkklkjjjjkas|1asdfjsldfjlasdlfjlasdjfljasdlfjalsdjflajdfsdsasdfa|end\256_chars_max_long|arsdfasdfjljljasdf;jl;jljsfasdfasdfljaslkdfjkasdfljalsd;jfa;lsdjflkasjdflkajsdflkjasdflkjsadlfjasldfjlsadjflksdjflksadjflkajsdflkjasdlfjalskdjflkasdjflkasdfkj;sdaf;kljkkjkklkjjjjkas|1asdfjsldfjlasdlfjlasdjfljasdlfjalsdjflajdfsdsasdfa|end] |
| 256 | |
| 257 | [HKEY_CURRENT_USER\Software\SmalltalkX-tests\ ã«ããã\256_chars_max_long|arsdfasdfjljljasdf;jl;jljsfasdfasdfljaslkdfjkasdfljalsd;jfa;lsdjflkasjdflkajsdflkjasdflkjsadlfjasldfjlsadjflksdjflksadjflkajsdflkjasdlfjalskdjflkasdjflkasdfkj;sdaf;kljkkjkklkjjjjkas|1asdfjsldfjlasdlfjlasdjfljasdlfjalsdjflajdfsdsasdfa|end\256_chars_max_long|arsdfasdfjljljasdf;jl;jljsfasdfasdfljaslkdfjkasdfljalsd;jfa;lsdjflkasjdflkajsdflkjasdflkjsadlfjasldfjlsadjflksdjflksadjflkajsdflkjasdlfjalskdjflkasdjflkasdfkj;sdaf;kljkkjkklkjjjjkas|1asdfjsldfjlasdlfjlasdjfljasdlfjalsdjflajdfsdsasdfa|end\unreachable] |
| 258 | |
| 259 | [HKEY_CURRENT_USER\Software\SmalltalkX-tests\ ã«ããã\256_chars_max_long|arsdfasdfjljljasdf;jl;jljsfasdfasdfljaslkdfjkasdfljalsd;jfa;lsdjflkasjdflkajsdflkjasdflkjsadlfjasldfjlsadjflksdjflksadjflkajsdflkjasdlfjalskdjflkasdjflkasdfkj;sdaf;kljkkjkklkjjjjkas|1asdfjsldfjlasdlfjlasdjfljasdlfjalsdjflajdfsdsasdfa|end\reachable] |
| 260 | ' |
| 261 | |
| 262 | "Created: / 16-11-2018 / 11:24:57 / svestkap" |
| 263 | "Modified: / 05-12-2018 / 11:33:32 / svestkap" |
| 264 | ! ! |
| 265 | |
| 401 | !Win32OperatingSystemTest methodsFor:'tests-unicodeRead'! |
| 402 | |
| 403 | testReadSubKeyAtIndex |
| 404 | "Reading subKeys at certain index |
| 405 | WARNING: subKeyAtIndex: is zero based!!!!!!" |
| 406 | |
| 407 | | readData testingRegistryPath | |
| 408 | |
| 409 | readData := Unicode16String new. |
| 410 | testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath. |
| 411 | |
| 412 | readData := testingRegistryPath subKeyAtIndex: 0. |
| 413 | |
| 414 | self assert: readData notEmptyOrNil. |
| 415 | self assert: (readData path copyAfterLast: $\) = ' ã«ããã' |
| 416 | |
| 417 | " |
| 418 | self run:#testReadSubKeyAtIndex |
| 419 | self new testReadSubKeyAtIndex |
| 420 | " |
| 421 | |
| 422 | "Created: / 05-12-2018 / 12:39:45 / svestkap" |
| 423 | ! |
| 424 | |
| 425 | testReadSubKeyAtIndex_01 |
| 426 | "Reading subKeys at certain index |
| 427 | WARNING: subKeyAtIndex: is zero based!!!!!!" |
| 428 | |
| 429 | | readData testingRegistryPath | |
| 430 | |
| 431 | readData := Unicode16String new. |
| 432 | testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath. |
| 433 | |
| 434 | readData := testingRegistryPath subKeyAtIndex: 0. |
| 435 | |
| 436 | self assert: readData notEmptyOrNil. |
| 437 | self assert: (readData path copyAfterLast: $\) = ' ã«ããã' |
| 438 | |
| 439 | " |
| 440 | self run:#testReadSubKeyAtIndex_01 |
| 441 | self new testReadSubKeyAtIndex_01 |
| 442 | " |
| 443 | |
| 444 | "Created: / 21-11-2018 / 10:34:01 / svestkap" |
| 445 | ! |
| 446 | |
| 447 | testReadSubKeyAtIndex_MaxPath |
| 448 | "reading subKeyAtIndex with max Path |
| 449 | Note: This test acually breaks the limit that Microsoft specified in MSDN - registry key name should be maximum 255 characters including absolute path |
| 450 | MSDN link: https://docs.microsoft.com/en-us/windows/desktop/sysinfo/registry-element-size-limits" |
| 451 | |
| 452 | | readData testingRegistryPath | |
| 453 | |
| 454 | "/readData := Unicode16String new. |
| 455 | testingRegistryPath := Win32OperatingSystem registryEntry key: |
| 456 | (registryPath,'\', ' ã«ããã\256_chars_max_long|arsdfasdfjljljasdf;jl;jljsfasdfasdfljaslkdfjkasdfljalsd;jfa;lsdjflkasjdflkajsdflkjasdflkjsadlfjasldfjlsadjflksdjflksadjflkajsdflkjasdlfjalskdjflkasdjflkasdfkj;sdaf;kljkkjkklkjjjjkas|1asdfjsldfjlasdlfjlasdjfljasdlfjalsdjflajdfsdsasdfa|end'). |
| 457 | |
| 458 | readData := testingRegistryPath subKeyAtIndex: 0. |
| 459 | |
| 460 | self assert: readData path notEmptyOrNil. |
| 461 | self assert:(readData path endsWith: '|end'). |
| 462 | |
| 463 | "/ this is maximum path size which can be reached if the SubKey is reached via index |
| 464 | self assert: readData path size = 563. "/ there is one backslash (for path) more compared to testReadSubKeyNamesAndClassesAtIndex_MaxPath_01 |
| 465 | |
| 466 | " |
| 467 | self run:#testReadSubKeyAtIndex_MaxPath |
| 468 | self new testReadSubKeyAtIndex_MaxPath |
| 469 | " |
| 470 | |
| 471 | "Created: / 05-12-2018 / 12:39:54 / svestkap" |
| 472 | ! |
| 473 | |
| 474 | testReadSubKeyAtIndex_MaxPath_01 |
| 475 | "reading subKeyAtIndex with max Path |
| 476 | Note: This test acually breaks the limit that Microsoft specified in MSDN - registry key name should be maximum 255 characters including absolute path |
| 477 | MSDN link: https://docs.microsoft.com/en-us/windows/desktop/sysinfo/registry-element-size-limits" |
| 478 | |
| 479 | | readData testingRegistryPath | |
| 480 | |
| 481 | "/readData := Unicode16String new. |
| 482 | testingRegistryPath := Win32OperatingSystem registryEntry key: |
| 483 | (registryPath,'\', ' ã«ããã\256_chars_max_long|arsdfasdfjljljasdf;jl;jljsfasdfasdfljaslkdfjkasdfljalsd;jfa;lsdjflkasjdflkajsdflkjasdflkjsadlfjasldfjlsadjflksdjflksadjflkajsdflkjasdlfjalskdjflkasdjflkasdfkj;sdaf;kljkkjkklkjjjjkas|1asdfjsldfjlasdlfjlasdjfljasdlfjalsdjflajdfsdsasdfa|end'). |
| 484 | |
| 485 | readData := testingRegistryPath subKeyAtIndex: 0. |
| 486 | |
| 487 | self assert: readData path notEmptyOrNil. |
| 488 | self assert:(readData path endsWith: '|end'). |
| 489 | |
| 490 | "/ this is maximum path size which can be reached if the SubKey is reached via index |
| 491 | self assert: readData path size = 563. "/ there is one backslash (for path) more compared to testReadSubKeyNamesAndClassesAtIndex_MaxPath_01 |
| 492 | |
| 493 | " |
| 494 | self run:#testReadSubKeyAtIndex_MaxPath_01 |
| 495 | self new testReadSubKeyAtIndex_MaxPath_01 |
| 496 | " |
| 497 | |
| 498 | "Created: / 22-11-2018 / 11:29:25 / svestkap" |
| 499 | ! |
| 500 | |
| 501 | testReadSubKeyNamesAndClassesAtIndex_MaxPath |
| 502 | "reading SubKeyNamesAndClasses with max Path |
| 503 | Note: This test acually breaks the limit that Microsoft specified in MSDN - registry key name should be maximum 255 characters including absolute path |
| 504 | MSDN link: https://docs.microsoft.com/en-us/windows/desktop/sysinfo/registry-element-size-limits" |
| 505 | |
| 506 | | readData testingRegistryPath | |
| 507 | |
| 508 | readData := Unicode16String new. |
| 509 | testingRegistryPath := Win32OperatingSystem registryEntry key: |
| 510 | (registryPath,'\', ' ã«ããã\256_chars_max_long|arsdfasdfjljljasdf;jl;jljsfasdfasdfljaslkdfjkasdfljalsd;jfa;lsdjflkasjdflkajsdflkjasdflkjsadlfjasldfjlsadjflksdjflksadjflkajsdflkjasdlfjalskdjflkasdjflkasdfkj;sdaf;kljkkjkklkjjjjkas|1asdfjsldfjlasdlfjlasdjfljasdlfjalsdjflajdfsdsasdfa|end'). |
| 511 | |
| 512 | readData := testingRegistryPath subKeyNameAndClassAtIndex: 0. |
| 513 | |
| 514 | self assert: readData notEmptyOrNil. |
| 515 | self assert:(readData first endsWith: '|end'). |
| 516 | self assert: readData first = '256_chars_max_long|arsdfasdfjljljasdf;jl;jljsfasdfasdfljaslkdfjkasdfljalsd;jfa;lsdjflkasjdflkajsdflkjasdflkjsadlfjasldfjlsadjflksdjflksadjflkajsdflkjasdlfjalskdjflkasdjflkasdfkj;sdaf;kljkkjkklkjjjjkas|1asdfjsldfjlasdlfjlasdjfljasdlfjalsdjflajdfsdsasdfa|end'. |
| 517 | |
| 518 | "/ this is maximum path size which can be reached if the SubKey is reached via index |
| 519 | self assert: (testingRegistryPath path size + readData first size) = 562. |
| 520 | |
| 521 | " |
| 522 | self run:#testReadSubKeyNamesAndClassesAtIndex_MaxPath |
| 523 | self new testReadSubKeyNamesAndClassesAtIndex_MaxPath |
| 524 | " |
| 525 | |
| 526 | "Created: / 05-12-2018 / 12:40:08 / svestkap" |
| 527 | ! |
| 528 | |
| 529 | testReadSubKeyNamesAndClassesAtIndex_MaxPath_01 |
| 530 | "reading SubKeyNamesAndClasses with max Path |
| 531 | Note: This test acually breaks the limit that Microsoft specified in MSDN - registry key name should be maximum 255 characters including absolute path |
| 532 | MSDN link: https://docs.microsoft.com/en-us/windows/desktop/sysinfo/registry-element-size-limits" |
| 533 | |
| 534 | | readData testingRegistryPath | |
| 535 | |
| 536 | readData := Unicode16String new. |
| 537 | testingRegistryPath := Win32OperatingSystem registryEntry key: |
| 538 | (registryPath,'\', ' ã«ããã\256_chars_max_long|arsdfasdfjljljasdf;jl;jljsfasdfasdfljaslkdfjkasdfljalsd;jfa;lsdjflkasjdflkajsdflkjasdflkjsadlfjasldfjlsadjflksdjflksadjflkajsdflkjasdlfjalskdjflkasdjflkasdfkj;sdaf;kljkkjkklkjjjjkas|1asdfjsldfjlasdlfjlasdjfljasdlfjalsdjflajdfsdsasdfa|end'). |
| 539 | |
| 540 | readData := testingRegistryPath subKeyNameAndClassAtIndex: 0. |
| 541 | |
| 542 | self assert: readData notEmptyOrNil. |
| 543 | self assert:(readData first endsWith: '|end'). |
| 544 | self assert: readData first = '256_chars_max_long|arsdfasdfjljljasdf;jl;jljsfasdfasdfljaslkdfjkasdfljalsd;jfa;lsdjflkasjdflkajsdflkjasdflkjsadlfjasldfjlsadjflksdjflksadjflkajsdflkjasdlfjalskdjflkasdjflkasdfkj;sdaf;kljkkjkklkjjjjkas|1asdfjsldfjlasdlfjlasdjfljasdlfjalsdjflajdfsdsasdfa|end'. |
| 545 | |
| 546 | "/ this is maximum path size which can be reached if the SubKey is reached via index |
| 547 | self assert: (testingRegistryPath path size + readData first size) = 562. |
| 548 | |
| 549 | " |
| 550 | self run:#testReadSubKeyNamesAndClassesAtIndex_MaxPath_01 |
| 551 | self new testReadSubKeyNamesAndClassesAtIndex_MaxPath_01 |
| 552 | " |
| 553 | |
| 554 | "Created: / 22-11-2018 / 11:28:20 / svestkap" |
| 555 | ! |
| 556 | |
| 557 | testReadTooLongPath |
| 558 | "Trying to read too long path - if you try to read such a long path it just returns nil" |
| 559 | |
| 560 | | testingRegistryPath | |
| 561 | |
| 562 | testingRegistryPath := Win32OperatingSystem registryEntry key: |
| 563 | (registryPath,'\', ' ã«ããã\256_chars_max_long|arsdfasdfjljljasdf;jl;jljsfasdfasdfljaslkdfjkasdfljalsd;jfa;lsdjflkasjdflkajsdflkjasdflkjsadlfjasldfjlsadjflksdjflksadjflkajsdflkjasdlfjalskdjflkasdjflkasdfkj;sdaf;kljkkjkklkjjjjkas|1asdfjsldfjlasdlfjlasdjfljasdlfjalsdjflajdfsdsasdfa |
| 564 | |end','\','256_chars_max_long|arsdfasdfjljljasdf;jl;jljsfasdfasdfljaslkdfjkasdfljalsd;jfa;lsdjflkasjdflkajsdflkjasdflkjsadlfjasldfjlsadjflksdjflksadjflkajsdflkjasdlfjalskdjflkasdjflkasdfkj;sdaf;kljkkjkklkjjjjkas|1asdfjsldfjlasdlfjlasdjfljasdlfjalsdjflajdfsdsasdfa|end'). |
| 565 | |
| 566 | self assert: testingRegistryPath isNil |
| 567 | |
| 568 | " |
| 569 | self run:#testReadTooLongPath |
| 570 | self new testReadTooLongPath |
| 571 | " |
| 572 | |
| 573 | "Created: / 22-11-2018 / 11:19:51 / svestkap" |
| 574 | "Modified (format): / 05-12-2018 / 12:38:58 / svestkap" |
| 575 | ! |
| 576 | |
| 577 | testReadValueNameAtIndex |
| 578 | "Reading values (#valueNameAtIndex:) at certain index |
| 579 | WARNING: #valueNameAtIndex: is zero based!!!!!! |
| 580 | Note: This test acually breaks the limit that Microsoft specified in MSDN - registry key name should be maximum 255 characters including absolute path |
| 581 | MSDN link: https://docs.microsoft.com/en-us/windows/desktop/sysinfo/registry-element-size-limits" |
| 582 | |
| 583 | | readData testingRegistryPath | |
| 584 | |
| 585 | readData := Unicode16String new. |
| 586 | testingRegistryPath := Win32OperatingSystem registryEntry key: (registryPath,'\', ' ã«ããã'). |
| 587 | |
| 588 | readData := testingRegistryPath valueNameAtIndex: 1. |
| 589 | |
| 590 | self assert: readData notEmptyOrNil. |
| 591 | self assert: readData = 'ããã ' |
| 592 | |
| 593 | " |
| 594 | self run:#testReadValueNameAtIndex |
| 595 | self new testReadValueNameAtIndex |
| 596 | " |
| 597 | |
| 598 | "Created: / 05-12-2018 / 12:40:21 / svestkap" |
| 599 | ! |
| 600 | |
| 601 | testReadValueNameAtIndex_01 |
| 602 | "Reading values (#valueNameAtIndex:) at certain index |
| 603 | WARNING: #valueNameAtIndex: is zero based!!!!!! |
| 604 | Note: This test acually breaks the limit that Microsoft specified in MSDN - registry key name should be maximum 255 characters including absolute path |
| 605 | MSDN link: https://docs.microsoft.com/en-us/windows/desktop/sysinfo/registry-element-size-limits" |
| 606 | |
| 607 | | readData testingRegistryPath | |
| 608 | |
| 609 | readData := Unicode16String new. |
| 610 | testingRegistryPath := Win32OperatingSystem registryEntry key: (registryPath,'\', ' ã«ããã'). |
| 611 | |
| 612 | readData := testingRegistryPath valueNameAtIndex: 1. |
| 613 | |
| 614 | self assert: readData notEmptyOrNil. |
| 615 | self assert: readData = 'ããã ' |
| 616 | |
| 617 | " |
| 618 | self run:#testReadValueNameAtIndex_01 |
| 619 | self new testReadValueNameAtIndex_01 |
| 620 | " |
| 621 | |
| 622 | "Created: / 22-11-2018 / 13:11:42 / svestkap" |
| 623 | ! |
| 624 | |
| 625 | testReadValueNamed_REG_BINARY_01 |
| 626 | "Testing if REG_BINARY values are read correctly via valueNamed:" |
| 627 | |
| 628 | | readData testingRegistryPath | |
| 629 | |
| 630 | testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath. |
| 631 | |
| 632 | readData := testingRegistryPath valueNamed: 'zero'. |
| 633 | |
| 634 | self assert: readData = ByteArray new. |
| 635 | |
| 636 | " |
| 637 | self run:#testReadValueNamed_REG_BINARY_01 |
| 638 | self new testReadValueNamed_REG_BINARY_01 |
| 639 | " |
| 640 | |
| 641 | "Created: / 16-11-2018 / 12:37:50 / svestkap" |
| 642 | ! |
| 643 | |
| 644 | testReadValueNamed_REG_BINARY_02 |
| 645 | "Testing if REG_BINARY values are read correctly via valueNamed:" |
| 646 | |
| 647 | | testingRegistryPath readData readDataHex | |
| 648 | |
| 649 | testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath. |
| 650 | |
| 651 | readData := testingRegistryPath valueNamed: 'non-zero'. |
| 652 | readDataHex := readData hexPrintStringWithSeparator: $|. |
| 653 | |
| 654 | self assert: readData = #[17 16]. "/ ByteArray |
| 655 | self assert: readDataHex = '11|10' "/ hex |
| 656 | |
| 657 | " |
| 658 | self run:#testReadValueNamed_REG_BINARY_02 |
| 659 | self new testReadValueNamed_REG_BINARY_02 |
| 660 | " |
| 661 | |
| 662 | "Created: / 16-11-2018 / 12:39:33 / svestkap" |
| 663 | ! |
| 664 | |
| 665 | testReadValueNamed_REG_DWORD_01 |
| 666 | "Testing if REG_DWORD values are read correctly via valueNamed:" |
| 667 | |
| 668 | | readData testingRegistryPath | |
| 669 | |
| 670 | readData := Unicode16String new. |
| 671 | testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath. |
| 672 | |
| 673 | readData := testingRegistryPath valueNamed: 'dword_value'. |
| 674 | |
| 675 | self assert: readData = 9135. |
| 676 | |
| 677 | " |
| 678 | self run:#testReadValueNamed_REG_DWORD_01 |
| 679 | self new testReadValueNamed_REG_DWORD_01 |
| 680 | " |
| 681 | |
| 682 | "Created: / 16-11-2018 / 12:24:26 / svestkap" |
| 683 | ! |
| 684 | |
| 685 | testReadValueNamed_REG_DWORD_02 |
| 686 | "Testing if REG_DWORD values are read correctly via valueNamed:" |
| 687 | |
| 688 | | readData testingRegistryPath | |
| 689 | |
| 690 | readData := Unicode16String new. |
| 691 | testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath. |
| 692 | |
| 693 | readData := testingRegistryPath valueNamed: 'ã'. |
| 694 | |
| 695 | self assert: readData = 591541423. |
| 696 | |
| 697 | " |
| 698 | self run:#testReadValueNamed_REG_DWORD_02 |
| 699 | self new testReadValueNamed_REG_DWORD_02 |
| 700 | " |
| 701 | |
| 702 | "Created: / 16-11-2018 / 12:24:43 / svestkap" |
| 703 | ! |
| 704 | |
| 705 | testReadValueNamed_REG_EXPAND_SZ_01 |
| 706 | "Testing if REG_EXPAND_SZ values are read correctly via valueNamed:" |
| 707 | |
| 708 | | readData testingRegistryPath | |
| 709 | |
| 710 | readData := Unicode16String new. |
| 711 | testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath. |
| 712 | |
| 713 | readData := testingRegistryPath valueNamed: ' Ä ã«ããã'. |
| 714 | |
| 715 | self assert: readData = '''Testing Unicode chars Šž Ä ã«ãããã''). '. |
| 716 | |
| 717 | " |
| 718 | self run:#testReadValueNamed_REG_EXPAND_SZ_01 |
| 719 | self new testReadValueNamed_REG_EXPAND_SZ_01 |
| 720 | " |
| 721 | |
| 722 | "Created: / 16-11-2018 / 12:27:58 / svestkap" |
| 723 | ! |
| 724 | |
| 725 | testReadValueNamed_REG_EXPAND_SZ_02 |
| 726 | "Testing if REG_EXPAND_SZ values are read correctly via valueNamed:" |
| 727 | |
| 728 | | readData testingRegistryPath | |
| 729 | |
| 730 | readData := Unicode16String new. |
| 731 | testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath. |
| 732 | |
| 733 | readData := testingRegistryPath valueNamed: 'Ugh'. |
| 734 | |
| 735 | self assert: readData = '''Testing Unicode chars Šž Ä ã«ãããã''). '. |
| 736 | |
| 737 | " |
| 738 | self run:#testReadValueNamed_REG_EXPAND_SZ_02 |
| 739 | self new testReadValueNamed_REG_EXPAND_SZ_02 |
| 740 | " |
| 741 | |
| 742 | "Created: / 16-11-2018 / 12:29:52 / svestkap" |
| 743 | ! |
| 744 | |
| 745 | testReadValueNamed_REG_MULTI_SZ_01 |
| 746 | "Testing if REG_MULTI_SZ values are read correctly via valueNamed:" |
| 747 | |
| 748 | | readData testingRegistryPath | |
| 749 | |
| 750 | testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath. |
| 751 | |
| 752 | readData := testingRegistryPath valueNamed: 'Font_Leelawadee UI Bold'. |
| 753 | |
| 754 | self assert: readData = #('SEGOEUIB.TTF,Segoe UI Bold,110,82' 'SEGOEUIB.TTF,Segoe UI Bold' 'MEIRYOB.TTC,Meiryo UI Bold,120,96' |
| 755 | 'MEIRYOB.TTC,Meiryo UI Bold' 'MSJHBD.TTC,Microsoft JhengHei UI Bold,120,96' 'MSJHBD.TTC,Microsoft JhengHei UI Bold' |
| 756 | 'MSYHBD.TTC,Microsoft YaHei UI Bold,128,96' 'MSYHBD.TTC,Microsoft YaHei UI Bold' 'MALGUNBD.TTF,Malgun Gothic Bold,118,96' |
| 757 | 'MALGUNBD.TTF,Malgun Gothic Bold' 'YUGOTHB.TTC,Yu Gothic UI Bold,128,96' 'YUGOTHB.TTC,Yu Gothic UI Bold' 'SEGUISYM.TTF,Segoe UI Symbol') |
| 758 | |
| 759 | " |
| 760 | self run:#testReadValueNamed_REG_MULTI_SZ_01 |
| 761 | self new testReadValueNamed_REG_MULTI_SZ_01 |
| 762 | " |
| 763 | |
| 764 | "Created: / 16-11-2018 / 12:30:24 / svestkap" |
| 765 | ! |
| 766 | |
| 767 | testReadValueNamed_REG_MULTI_SZ_02 |
| 768 | "Testing if REG_MULTI_SZ values are read correctly via valueNamed:" |
| 769 | |
| 770 | | readData testingRegistryPath | |
| 771 | |
| 772 | testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath. |
| 773 | |
| 774 | readData := testingRegistryPath valueNamed: 'Šž Ä ã«ããã'. |
| 775 | |
| 776 | self assert: readData = #('''Testing Unicode chars Šž Ä ã«ãããã'')' |
| 777 | 'SEGOEUIB.TTF,Segoe UI Bold,110,82' 'SEGOEUIB.TTF,Segoe UI Bold' 'MEIRYOB.TTC,Meiryo UI Bold,120,96' |
| 778 | 'MEIRYOB.TTC,Meiryo UI Bold' 'MSJHBD.TTC,Microsoft JhengHei UI Bold,120,96' 'MSJHBD.TTC,Microsoft JhengHei UI Bold' |
| 779 | 'MSYHBD.TTC,Microsoft YaHei UI Bold,128,96' 'MSYHBD.TTC,Microsoft YaHei UI Bold' 'MALGUNBD.TTF,Malgun Gothic Bold,118,96' |
| 780 | 'MALGUNBD.TTF,Malgun Gothic Bold' 'YUGOTHB.TTC,Yu Gothic UI Bold,128,96' 'YUGOTHB.TTC,Yu Gothic UI Bold' 'SEGUISYM.TTF,Segoe UI Symbol') |
| 781 | |
| 782 | " |
| 783 | self run:#testReadValueNamed_REG_MULTI_SZ_02 |
| 784 | self new testReadValueNamed_REG_MULTI_SZ_02 |
| 785 | " |
| 786 | |
| 787 | "Created: / 16-11-2018 / 12:35:57 / svestkap" |
| 788 | ! |
| 789 | |
| 790 | testReadValueNamed_REG_MULTI_SZ_03 |
| 791 | "Testing if empty REG_MULTI_SZ value is read correctly via valueNamed:" |
| 792 | |
| 793 | | readData testingRegistryPath | |
| 794 | |
| 795 | testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath. |
| 796 | |
| 797 | readData := testingRegistryPath valueNamed: 'testEmptyMultiSZ'. |
| 798 | |
| 799 | self assert: readData isEmpty |
| 800 | |
| 801 | " |
| 802 | self run:#testReadValueNamed_REG_MULTI_SZ_03 |
| 803 | self new testReadValueNamed_REG_MULTI_SZ_03 |
| 804 | " |
| 805 | |
| 806 | "Created: / 03-12-2018 / 10:59:48 / svestkap" |
| 807 | ! |
| 808 | |
| 809 | testReadValueNamed_REG_QWORD_01 |
| 810 | "Testing if REG_QWORD values are read correctly via valueNamed: |
| 811 | The read value is a QWORD maximum value" |
| 812 | |
| 813 | | readData testingRegistryPath | |
| 814 | |
| 815 | readData := Unicode16String new. |
| 816 | testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath. |
| 817 | |
| 818 | readData := testingRegistryPath valueNamed: 'qword_max'. |
| 819 | |
| 820 | self assert: readData = 18446744073709551615. |
| 821 | |
| 822 | " |
| 823 | self run:#testReadValueNamed_REG_QWORD_01 |
| 824 | self new testReadValueNamed_REG_QWORD_01 |
| 825 | " |
| 826 | |
| 827 | "Created: / 16-11-2018 / 12:25:47 / svestkap" |
| 828 | "Modified (comment): / 05-12-2018 / 12:38:09 / svestkap" |
| 829 | ! |
| 830 | |
| 831 | testReadValueNamed_REG_QWORD_02 |
| 832 | "Testing if REG_QWORD values are read correctly via valueNamed:" |
| 833 | |
| 834 | | readData testingRegistryPath | |
| 835 | |
| 836 | readData := Unicode16String new. |
| 837 | testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath. |
| 838 | |
| 839 | readData := testingRegistryPath valueNamed: 'qwordvalue'. |
| 840 | |
| 841 | self assert: readData = 8751636011737964973. |
| 842 | |
| 843 | " |
| 844 | self run:#testReadValueNamed_REG_QWORD_02 |
| 845 | self new testReadValueNamed_REG_QWORD_02 |
| 846 | " |
| 847 | |
| 848 | "Created: / 16-11-2018 / 12:26:23 / svestkap" |
| 849 | ! |
| 850 | |
| 851 | testReadValueNamed_REG_QWORD_03 |
| 852 | "Testing if REG_QWORD values are read correctly via valueNamed:" |
| 853 | |
| 854 | | readData testingRegistryPath | |
| 855 | |
| 856 | readData := Unicode16String new. |
| 857 | testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath. |
| 858 | |
| 859 | readData := testingRegistryPath valueNamed: 'ãã'. |
| 860 | |
| 861 | self assert: readData asSmallInteger = 44527. |
| 862 | |
| 863 | " |
| 864 | self run:#testReadValueNamed_REG_QWORD_03 |
| 865 | self new testReadValueNamed_REG_QWORD_03 |
| 866 | " |
| 867 | |
| 868 | "Created: / 16-11-2018 / 12:27:17 / svestkap" |
| 869 | "Modified: / 20-11-2018 / 12:25:05 / svestkap" |
| 870 | ! |
| 871 | |
| 872 | testReadValueNamed_REG_SZ_01 |
| 873 | "Testing if REG_SZ values are read correctly via valueNamed:" |
| 874 | |
| 875 | | readData testingRegistryPath | |
| 876 | |
| 877 | readData := Unicode16String new. |
| 878 | testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath. |
| 879 | |
| 880 | readData := testingRegistryPath valueNamed: 'bledesu'. |
| 881 | |
| 882 | self assert: readData = '''Testing Unicode chars Šž Ä ã«ãããã''). '. |
| 883 | |
| 884 | " |
| 885 | self run:#testReadValueNamed_REG_SZ_01 |
| 886 | self new testReadValueNamed_REG_SZ_01 |
| 887 | " |
| 888 | |
| 889 | "Created: / 16-11-2018 / 12:14:59 / svestkap" |
| 890 | ! |
| 891 | |
| 892 | testReadValueNamed_REG_SZ_02 |
| 893 | "Testing if REG_SZ values are read correctly via valueNamed:" |
| 894 | |
| 895 | | readData testingRegistryPath | |
| 896 | |
| 897 | readData := Unicode16String new. |
| 898 | testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath. |
| 899 | |
| 900 | readData := testingRegistryPath valueNamed: ' Šž Ä ã«. '. |
| 901 | |
| 902 | self assert: readData = 'Testing Unicode chars Šž Ä ã«ãããã'. |
| 903 | |
| 904 | " |
| 905 | self run:#testReadValueNamed_REG_SZ_02 |
| 906 | self new testReadValueNamed_REG_SZ_02 |
| 907 | " |
| 908 | |
| 909 | "Created: / 16-11-2018 / 12:15:17 / svestkap" |
| 910 | ! |
| 911 | |
| 912 | testReadValueNamed_REG_SZ_03 |
| 913 | "Testing if REG_SZ values are read correctly via valueNamed:" |
| 914 | |
| 915 | | readData testingRegistryPath | |
| 916 | |
| 917 | readData := Unicode16String new. |
| 918 | testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath. |
| 919 | |
| 920 | readData := testingRegistryPath valueNamed: 'ããã '. |
| 921 | |
| 922 | self assert: readData = 'Testus gradus'. |
| 923 | |
| 924 | " |
| 925 | self run:#testReadValueNamed_REG_SZ_03 |
| 926 | self new testReadValueNamed_REG_SZ_03 |
| 927 | " |
| 928 | |
| 929 | "Created: / 16-11-2018 / 12:21:59 / svestkap" |
| 930 | ! |
| 931 | |
| 932 | testReadValueNamed_REG_SZ_04 |
| 933 | "Testing if empty REG_SZ value is read correctly via valueNamed:" |
| 934 | |
| 935 | | readData testingRegistryPath | |
| 936 | |
| 937 | readData := Unicode16String new. |
| 938 | testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath. |
| 939 | |
| 940 | readData := testingRegistryPath valueNamed: 'emptyToTest'. |
| 941 | |
| 942 | self assert: readData isEmpty. |
| 943 | |
| 944 | " |
| 945 | self run:#testReadValueNamed_REG_SZ_04 |
| 946 | self new testReadValueNamed_REG_SZ_04 |
| 947 | " |
| 948 | |
| 949 | "Created: / 03-12-2018 / 10:56:11 / svestkap" |
| 950 | ! |
| 951 | |
| 952 | testReadValueNamed_nonStringValue |
| 953 | "Testing reading non-string value from Registry via valueNamed |
| 954 | User should see a warning message in Transcript" |
| 955 | |
| 956 | | readData testingRegistryPath | |
| 957 | |
| 958 | readData := Unicode16String new. |
| 959 | testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath. |
| 960 | |
| 961 | readData := testingRegistryPath valueNamed: 11. |
| 962 | |
| 963 | self assert: readData isNil. |
| 964 | |
| 965 | " |
| 966 | self run:#testReadValueNamed_nonStringValue |
| 967 | self new testReadValueNamed_nonStringValue |
| 968 | " |
| 969 | |
| 970 | "Created: / 05-12-2018 / 12:40:31 / svestkap" |
| 971 | ! |
| 972 | |
| 973 | testReadValueNamed_nonStringValue_01 |
| 974 | "Testing reading non-string value from Registry via valueNamed |
| 975 | User should see a warning message in Transcript" |
| 976 | |
| 977 | | readData testingRegistryPath | |
| 978 | |
| 979 | readData := Unicode16String new. |
| 980 | testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath. |
| 981 | |
| 982 | readData := testingRegistryPath valueNamed: 11. |
| 983 | |
| 984 | self assert: readData isNil. |
| 985 | |
| 986 | " |
| 987 | self run:#testReadValueNamed_nonStringValue_01 |
| 988 | self new testReadValueNamed_nonStringValue_01 |
| 989 | " |
| 990 | |
| 991 | "Created: / 05-12-2018 / 12:37:13 / svestkap" |
| 992 | ! ! |
| 993 | |
| 994 | !Win32OperatingSystemTest methodsFor:'tests-unicodeReadEnumeration'! |
| 995 | |
| 996 | testReadAllSubKeysDo_MaxPath |
| 997 | "reading via allSubKeysDo (using subKeyAtIndex:) with max Path |
| 998 | The path is suppassing the Microsoft limit - for more information see testReadSubKeyAtIndex_MaxPath_01" |
| 999 | |
| 1000 | | readData testingRegistryPath | |
| 1001 | |
| 1002 | readData := OrderedCollection new. |
| 1003 | testingRegistryPath := Win32OperatingSystem registryEntry key: |
| 1004 | (registryPath,'\', ' ã«ããã\256_chars_max_long|arsdfasdfjljljasdf;jl;jljsfasdfasdfljaslkdfjkasdfljalsd;jfa;lsdjflkasjdflkajsdflkjasdflkjsadlfjasldfjlsadjflksdjflksadjflkajsdflkjasdlfjalskdjflkasdjflkasdfkj;sdaf;kljkkjkklkjjjjkas|1asdfjsldfjlasdlfjlasdjfljasdlfjalsdjflajdfsdsasdfa|end'). |
| 1005 | |
| 1006 | testingRegistryPath allSubKeysDo: [ :subEntry | |
| 1007 | readData add: subEntry |
| 1008 | ]. |
| 1009 | |
| 1010 | self assert: readData notEmptyOrNil. |
| 1011 | self assert: readData size = 3. |
| 1012 | "/ this is normally unreachable subKey (subkey actually called 'unreachable') |
| 1013 | self assert: (readData at: 2) path size = 575. |
| 1014 | |
| 1015 | readData := readData copy collect: [ :subEntry | subEntry path copyAfterLast: $\ ]. |
| 1016 | |
| 1017 | self assert: readData size = 3. |
| 1018 | self assert: (readData first endsWith: '|end'). |
| 1019 | self assert: readData second = 'unreachable'. |
| 1020 | self assert: readData third = 'reachable' |
| 1021 | |
| 1022 | " |
| 1023 | self run:#testReadAllSubKeysDo_MaxPath |
| 1024 | self new testReadAllSubKeysDo_MaxPath |
| 1025 | " |
| 1026 | |
| 1027 | "Created: / 05-12-2018 / 12:40:53 / svestkap" |
| 1028 | ! |
| 1029 | |
| 1030 | testReadAllSubKeysDo_MaxPath_01 |
| 1031 | "reading via allSubKeysDo (using subKeyAtIndex:) with max Path |
| 1032 | The path is suppassing the Microsoft limit - for more information see testReadSubKeyAtIndex_MaxPath_01" |
| 1033 | |
| 1034 | | readData testingRegistryPath | |
| 1035 | |
| 1036 | readData := OrderedCollection new. |
| 1037 | testingRegistryPath := Win32OperatingSystem registryEntry key: |
| 1038 | (registryPath,'\', ' ã«ããã\256_chars_max_long|arsdfasdfjljljasdf;jl;jljsfasdfasdfljaslkdfjkasdfljalsd;jfa;lsdjflkasjdflkajsdflkjasdflkjsadlfjasldfjlsadjflksdjflksadjflkajsdflkjasdlfjalskdjflkasdjflkasdfkj;sdaf;kljkkjkklkjjjjkas|1asdfjsldfjlasdlfjlasdjfljasdlfjalsdjflajdfsdsasdfa|end'). |
| 1039 | |
| 1040 | testingRegistryPath allSubKeysDo: [ :subEntry | |
| 1041 | readData add: subEntry |
| 1042 | ]. |
| 1043 | |
| 1044 | self assert: readData notEmptyOrNil. |
| 1045 | self assert: readData size = 3. |
| 1046 | "/ this is normally unreachable subKey (subkey actually called 'unreachable') |
| 1047 | self assert: (readData at: 2) path size = 575. |
| 1048 | |
| 1049 | readData := readData copy collect: [ :subEntry | subEntry path copyAfterLast: $\ ]. |
| 1050 | |
| 1051 | self assert: readData size = 3. |
| 1052 | self assert: (readData first endsWith: '|end'). |
| 1053 | self assert: readData second = 'unreachable'. |
| 1054 | self assert: readData third = 'reachable' |
| 1055 | |
| 1056 | " |
| 1057 | self run:#testReadAllSubKeysDo_MaxPath_01 |
| 1058 | self new testReadAllSubKeysDo_MaxPath_01 |
| 1059 | " |
| 1060 | |
| 1061 | "Created: / 22-11-2018 / 12:12:01 / svestkap" |
| 1062 | ! |
| 1063 | |
| 1064 | testReadRemoteKeyOnHost |
| 1065 | "Reading remote registry via remoteKeyOnHost: |
| 1066 | Note: a key must be a predefined key for more see: |
| 1067 | https://docs.microsoft.com/en-us/windows/desktop/SysInfo/predefined-keys" |
| 1068 | |
| 1069 | | testingRegistryPath remoteRegistry readData | |
| 1070 | |
| 1071 | "/ HKEY_CURRENT_USER is one of the predefined keys |
| 1072 | testingRegistryPath := Win32OperatingSystem registryEntry key: 'HKEY_CURRENT_USER'. |
| 1073 | "/ testing done on localhost |
| 1074 | remoteRegistry := testingRegistryPath remoteKeyOnHost: 'localhost'. |
| 1075 | readData := remoteRegistry subKeys. |
| 1076 | |
| 1077 | readData := readData copy collect: [ :subEntry | (subEntry path copyAfterLast: $\) asLowercase ]. |
| 1078 | |
| 1079 | self assert: readData notEmptyOrNil. |
| 1080 | self assert: (readData includes: 'software'). |
| 1081 | |
| 1082 | " |
| 1083 | self run:#testReadRemoteKeyOnHost |
| 1084 | self new testReadRemoteKeyOnHost |
| 1085 | " |
| 1086 | |
| 1087 | "Created: / 05-12-2018 / 12:41:06 / svestkap" |
| 1088 | ! |
| 1089 | |
| 1090 | testReadRemoteKeyOnHost_01 |
| 1091 | "Reading remote registry via remoteKeyOnHost: |
| 1092 | Note: a key must be a predefined key for more see: |
| 1093 | https://docs.microsoft.com/en-us/windows/desktop/SysInfo/predefined-keys" |
| 1094 | |
| 1095 | | testingRegistryPath remoteRegistry readData | |
| 1096 | |
| 1097 | "/ HKEY_CURRENT_USER is one of the predefined keys |
| 1098 | testingRegistryPath := Win32OperatingSystem registryEntry key: 'HKEY_CURRENT_USER'. |
| 1099 | "/ testing done on localhost |
| 1100 | remoteRegistry := testingRegistryPath remoteKeyOnHost: 'localhost'. |
| 1101 | readData := remoteRegistry subKeys. |
| 1102 | |
| 1103 | readData := readData copy collect: [ :subEntry | (subEntry path copyAfterLast: $\) asLowercase ]. |
| 1104 | |
| 1105 | self assert: readData notEmptyOrNil. |
| 1106 | self assert: (readData includes: 'software'). |
| 1107 | |
| 1108 | " |
| 1109 | self run:#testReadRemoteKeyOnHost_01 |
| 1110 | self new testReadRemoteKeyOnHost_01 |
| 1111 | " |
| 1112 | |
| 1113 | "Created: / 23-11-2018 / 10:08:02 / svestkap" |
| 1114 | ! |
| 1115 | |
| 1116 | testReadSubKeyNamesAndClassesDo_MaxPath |
| 1117 | "reading SubKeyNamesAndClasses with max Path |
| 1118 | The path is suppassing the Microsoft limit - for more information see testReadSubKeyNamesAndClassesAtIndex_MaxPath_01" |
| 1119 | |
| 1120 | | readData testingRegistryPath | |
| 1121 | |
| 1122 | readData := OrderedDictionary new. |
| 1123 | testingRegistryPath := Win32OperatingSystem registryEntry key: |
| 1124 | (registryPath,'\', ' ã«ããã\256_chars_max_long|arsdfasdfjljljasdf;jl;jljsfasdfasdfljaslkdfjkasdfljalsd;jfa;lsdjflkasjdflkajsdflkjasdflkjsadlfjasldfjlsadjflksdjflksadjflkajsdflkjasdlfjalskdjflkasdjflkasdfkj;sdaf;kljkkjkklkjjjjkas|1asdfjsldfjlasdlfjlasdjfljasdlfjalsdjflajdfsdsasdfa|end'). |
| 1125 | |
| 1126 | testingRegistryPath subKeyNamesAndClassesDo: [ :name :className | |
| 1127 | readData at: name put: className. |
| 1128 | ]. |
| 1129 | |
| 1130 | self assert: readData notEmptyOrNil. |
| 1131 | self assert: readData size = 2. |
| 1132 | self assert: (readData at: 'reachable') isEmpty. "/ the class is empty |
| 1133 | |
| 1134 | " |
| 1135 | self run:#testReadSubKeyNamesAndClassesDo_MaxPath |
| 1136 | self new testReadSubKeyNamesAndClassesDo_MaxPath |
| 1137 | " |
| 1138 | |
| 1139 | "Created: / 05-12-2018 / 12:41:31 / svestkap" |
| 1140 | ! |
| 1141 | |
| 1142 | testReadSubKeyNamesAndClassesDo_MaxPath_01 |
| 1143 | "reading SubKeyNamesAndClasses with max Path |
| 1144 | The path is suppassing the Microsoft limit - for more information see testReadSubKeyNamesAndClassesAtIndex_MaxPath_01" |
| 1145 | |
| 1146 | | readData testingRegistryPath | |
| 1147 | |
| 1148 | readData := OrderedDictionary new. |
| 1149 | testingRegistryPath := Win32OperatingSystem registryEntry key: |
| 1150 | (registryPath,'\', ' ã«ããã\256_chars_max_long|arsdfasdfjljljasdf;jl;jljsfasdfasdfljaslkdfjkasdfljalsd;jfa;lsdjflkasjdflkajsdflkjasdflkjsadlfjasldfjlsadjflksdjflksadjflkajsdflkjasdlfjalskdjflkasdjflkasdfkj;sdaf;kljkkjkklkjjjjkas|1asdfjsldfjlasdlfjlasdjfljasdlfjalsdjflajdfsdsasdfa|end'). |
| 1151 | |
| 1152 | testingRegistryPath subKeyNamesAndClassesDo: [ :name :className | |
| 1153 | readData at: name put: className. |
| 1154 | ]. |
| 1155 | |
| 1156 | self assert: readData notEmptyOrNil. |
| 1157 | self assert: readData size = 2. |
| 1158 | self assert: (readData at: 'reachable') isEmpty. "/ the class is empty |
| 1159 | |
| 1160 | " |
| 1161 | self run:#testReadSubKeyNamesAndClassesDo_MaxPath_01 |
| 1162 | self new testReadSubKeyNamesAndClassesDo_MaxPath_01 |
| 1163 | " |
| 1164 | |
| 1165 | "Created: / 22-11-2018 / 11:28:37 / svestkap" |
| 1166 | ! |
| 1167 | |
| 1168 | testReadSubKeysDo_MaxPath |
| 1169 | "reading via subKeysDo (using subKeyAtIndex:) with max Path |
| 1170 | The path is suppassing the Microsoft limit - for more information see testReadSubKeyAtIndex_MaxPath_01" |
| 1171 | |
| 1172 | | readData testingRegistryPath | |
| 1173 | |
| 1174 | readData := OrderedCollection new. |
| 1175 | testingRegistryPath := Win32OperatingSystem registryEntry key: |
| 1176 | (registryPath,'\', ' ã«ããã\256_chars_max_long|arsdfasdfjljljasdf;jl;jljsfasdfasdfljaslkdfjkasdfljalsd;jfa;lsdjflkasjdflkajsdflkjasdflkjsadlfjasldfjlsadjflksdjflksadjflkajsdflkjasdlfjalskdjflkasdjflkasdfkj;sdaf;kljkkjkklkjjjjkas|1asdfjsldfjlasdlfjlasdjfljasdlfjalsdjflajdfsdsasdfa|end'). |
| 1177 | |
| 1178 | testingRegistryPath subKeysDo: [ :subEntry | |
| 1179 | readData add: subEntry |
| 1180 | ]. |
| 1181 | |
| 1182 | self assert: readData notEmptyOrNil. |
| 1183 | self assert: readData size = 2. |
| 1184 | self assert: (readData first) path size = 563. |
| 1185 | |
| 1186 | readData := readData copy collect: [ :subEntry | subEntry path copyAfterLast: $\ ]. |
| 1187 | |
| 1188 | self assert: readData size = 2. |
| 1189 | self assert: (readData first endsWith: '|end'). |
| 1190 | self assert: readData second = 'reachable'. |
| 1191 | |
| 1192 | " |
| 1193 | self run:#testReadSubKeysDo_MaxPath |
| 1194 | self new testReadSubKeysDo_MaxPath |
| 1195 | " |
| 1196 | |
| 1197 | "Created: / 05-12-2018 / 12:41:49 / svestkap" |
| 1198 | ! |
| 1199 | |
| 1200 | testReadSubKeysDo_MaxPath_01 |
| 1201 | "reading via subKeysDo (using subKeyAtIndex:) with max Path |
| 1202 | The path is suppassing the Microsoft limit - for more information see testReadSubKeyAtIndex_MaxPath_01" |
| 1203 | |
| 1204 | | readData testingRegistryPath | |
| 1205 | |
| 1206 | readData := OrderedCollection new. |
| 1207 | testingRegistryPath := Win32OperatingSystem registryEntry key: |
| 1208 | (registryPath,'\', ' ã«ããã\256_chars_max_long|arsdfasdfjljljasdf;jl;jljsfasdfasdfljaslkdfjkasdfljalsd;jfa;lsdjflkasjdflkajsdflkjasdflkjsadlfjasldfjlsadjflksdjflksadjflkajsdflkjasdlfjalskdjflkasdjflkasdfkj;sdaf;kljkkjkklkjjjjkas|1asdfjsldfjlasdlfjlasdjfljasdlfjalsdjflajdfsdsasdfa|end'). |
| 1209 | |
| 1210 | testingRegistryPath subKeysDo: [ :subEntry | |
| 1211 | readData add: subEntry |
| 1212 | ]. |
| 1213 | |
| 1214 | self assert: readData notEmptyOrNil. |
| 1215 | self assert: readData size = 2. |
| 1216 | self assert: (readData first) path size = 563. |
| 1217 | |
| 1218 | readData := readData copy collect: [ :subEntry | subEntry path copyAfterLast: $\ ]. |
| 1219 | |
| 1220 | self assert: readData size = 2. |
| 1221 | self assert: (readData first endsWith: '|end'). |
| 1222 | self assert: readData second = 'reachable'. |
| 1223 | |
| 1224 | " |
| 1225 | self run:#testReadSubKeysDo_MaxPath_01 |
| 1226 | self new testReadSubKeysDo_MaxPath_01 |
| 1227 | " |
| 1228 | |
| 1229 | "Created: / 22-11-2018 / 12:11:57 / svestkap" |
| 1230 | ! |
| 1231 | |
| 1232 | testReadSubKeys_MaxPath |
| 1233 | "reading via subKeys (using subKeyAtIndex:) with max Path |
| 1234 | The path is suppassing the Microsoft limit - for more information see testReadSubKeyAtIndex_MaxPath_01" |
| 1235 | |
| 1236 | | readData testingRegistryPath | |
| 1237 | |
| 1238 | testingRegistryPath := Win32OperatingSystem registryEntry key: |
| 1239 | (registryPath,'\', ' ã«ããã\256_chars_max_long|arsdfasdfjljljasdf;jl;jljsfasdfasdfljaslkdfjkasdfljalsd;jfa;lsdjflkasjdflkajsdflkjasdflkjsadlfjasldfjlsadjflksdjflksadjflkajsdflkjasdlfjalskdjflkasdjflkasdfkj;sdaf;kljkkjkklkjjjjkas|1asdfjsldfjlasdlfjlasdjfljasdlfjalsdjflajdfsdsasdfa|end'). |
| 1240 | |
| 1241 | readData := testingRegistryPath subKeys. |
| 1242 | |
| 1243 | self assert: readData notEmptyOrNil. |
| 1244 | self assert: readData size = 2. |
| 1245 | self assert: (readData first) path size = 563. |
| 1246 | |
| 1247 | readData := readData copy collect: [ :subEntry | subEntry path copyAfterLast: $\ ]. |
| 1248 | |
| 1249 | self assert: readData size = 2. |
| 1250 | self assert: (readData first endsWith: '|end'). |
| 1251 | self assert: readData second = 'reachable'. |
| 1252 | |
| 1253 | " |
| 1254 | self run:#testReadSubKeys_MaxPath |
| 1255 | self new testReadSubKeys_MaxPath |
| 1256 | " |
| 1257 | |
| 1258 | "Created: / 05-12-2018 / 12:41:59 / svestkap" |
| 1259 | ! |
| 1260 | |
| 1261 | testReadSubKeys_MaxPath_01 |
| 1262 | "reading via subKeys (using subKeyAtIndex:) with max Path |
| 1263 | The path is suppassing the Microsoft limit - for more information see testReadSubKeyAtIndex_MaxPath_01" |
| 1264 | |
| 1265 | | readData testingRegistryPath | |
| 1266 | |
| 1267 | testingRegistryPath := Win32OperatingSystem registryEntry key: |
| 1268 | (registryPath,'\', ' ã«ããã\256_chars_max_long|arsdfasdfjljljasdf;jl;jljsfasdfasdfljaslkdfjkasdfljalsd;jfa;lsdjflkasjdflkajsdflkjasdflkjsadlfjasldfjlsadjflksdjflksadjflkajsdflkjasdlfjalskdjflkasdjflkasdfkj;sdaf;kljkkjkklkjjjjkas|1asdfjsldfjlasdlfjlasdjfljasdlfjalsdjflajdfsdsasdfa|end'). |
| 1269 | |
| 1270 | readData := testingRegistryPath subKeys. |
| 1271 | |
| 1272 | self assert: readData notEmptyOrNil. |
| 1273 | self assert: readData size = 2. |
| 1274 | self assert: (readData first) path size = 563. |
| 1275 | |
| 1276 | readData := readData copy collect: [ :subEntry | subEntry path copyAfterLast: $\ ]. |
| 1277 | |
| 1278 | self assert: readData size = 2. |
| 1279 | self assert: (readData first endsWith: '|end'). |
| 1280 | self assert: readData second = 'reachable'. |
| 1281 | |
| 1282 | " |
| 1283 | self run:#testReadSubKeysDo_MaxPath_01 |
| 1284 | self new testReadSubKeysDo_MaxPath_01 |
| 1285 | " |
| 1286 | |
| 1287 | "Created: / 22-11-2018 / 14:32:44 / svestkap" |
| 1288 | ! |
| 1289 | |
| 1290 | testReadValueNamesAndValuesDo_MaxPath |
| 1291 | "reading via #valueNamesAndValuesDo: (using #valueNameAtIndex:) with max Path |
| 1292 | The path is suppassing the Microsoft limit - for more information see testReadValueNameAtIndex_01" |
| 1293 | |
| 1294 | | readData testingRegistryPath | |
| 1295 | |
| 1296 | readData := OrderedDictionary new. |
| 1297 | testingRegistryPath := Win32OperatingSystem registryEntry key: |
| 1298 | (registryPath,'\', ' ã«ããã\256_chars_max_long|arsdfasdfjljljasdf;jl;jljsfasdfasdfljaslkdfjkasdfljalsd;jfa;lsdjflkasjdflkajsdflkjasdflkjsadlfjasldfjlsadjflksdjflksadjflkajsdflkjasdlfjalskdjflkasdjflkasdfkj;sdaf;kljkkjkklkjjjjkas|1asdfjsldfjlasdlfjlasdjfljasdlfjalsdjflajdfsdsasdfa|end'). |
| 1299 | |
| 1300 | testingRegistryPath valueNamesAndValuesDo: [ :name :value | |
| 1301 | readData at: name put: value |
| 1302 | ]. |
| 1303 | |
| 1304 | self assert: readData notEmptyOrNil. |
| 1305 | self assert: readData size = 3. |
| 1306 | self assert: readData first = ('testing'->' ã«ããã'). |
| 1307 | self assert: (readData at: 'ã')= 2. |
| 1308 | self assert: readData second = 2. |
| 1309 | self assert: (readData at: '256_chars_max_long|arsdfasdfjljljasdf;jl;jljsfasdfasdfljaslkdfjkasdfljalsd;jfa;lsdjflkasjdflkajsdflkjasdflkjsadlfjasldfjlsadjflksdjflksadjflkajsdflkjasdlfjalskdjflkasdjflkasdfkj;sdaf;kljkkjkklkjjjjkas|1asdfjsldfjlasdlfjlasdjfljasdlfjalsdjflajdfsdsasdfa|end') |
| 1310 | = 'Longer_than_256_chars_max_long|arsdfasdfjljljasdf;jl;jljsfasdfasdfljaslkdfjkasdfljalsd;jfa;lsdjflkasjdflkajsdflkjasdflkjsadlfjasldfjlsadjflksdjflksadjflkajsdflkjasdlfjalskdjflkasdjflkasdfkj;sdaf;kljkkjkklkjjjjkas|1asdfjsldfjlasdlfjlasdjfljasdlfjalsdjflajdfsdsasdfa|endsdfsdfasdfasdfasdfjlkasdjflkasjdflkjasdlfjaslkdfjlkasdjflkasdflksadlkjsadlfalsdfůlasdjflkasdjflkasjdflkůjasdflůkjasdlůfjalsůkdjflůksd'. |
| 1311 | self assert: readData third = 'Longer_than_256_chars_max_long|arsdfasdfjljljasdf;jl;jljsfasdfasdfljaslkdfjkasdfljalsd;jfa;lsdjflkasjdflkajsdflkjasdflkjsadlfjasldfjlsadjflksdjflksadjflkajsdflkjasdlfjalskdjflkasdjflkasdfkj;sdaf;kljkkjkklkjjjjkas|1asdfjsldfjlasdlfjlasdjfljasdlfjalsdjflajdfsdsasdfa|endsdfsdfasdfasdfasdfjlkasdjflkasjdflkjasdlfjaslkdfjlkasdjflkasdflksadlkjsadlfalsdfůlasdjflkasdjflkasjdflkůjasdflůkjasdlůfjalsůkdjflůksd'. |
| 1312 | |
| 1313 | " |
| 1314 | self run:#testReadValueNamesAndValuesDo_MaxPath |
| 1315 | self new testReadValueNamesAndValuesDo_MaxPath |
| 1316 | " |
| 1317 | |
| 1318 | "Created: / 05-12-2018 / 12:43:05 / svestkap" |
| 1319 | ! |
| 1320 | |
| 1321 | testReadValueNamesAndValuesDo_REG_SZ_01 |
| 1322 | "Testing if REG_SZ values are read correctly via valueNamesAndValuesDo:" |
| 1323 | |
| 1324 | | readData testingRegistryPath | |
| 1325 | |
| 1326 | readData := OrderedDictionary new. |
| 1327 | testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath. |
| 1328 | |
| 1329 | testingRegistryPath valueNamesAndValuesDo: [ :name :data | |
| 1330 | readData at: name put: data |
| 1331 | ]. |
| 1332 | |
| 1333 | self assert: (readData at: 'bledesu') = '''Testing Unicode chars Šž Ä ã«ãããã''). '. |
| 1334 | |
| 1335 | " |
| 1336 | self run:#testReadValueNamesAndValuesDo_REG_SZ_01 |
| 1337 | self new testReadValueNamesAndValuesDo_REG_SZ_01 |
| 1338 | " |
| 1339 | |
| 1340 | "Created: / 16-11-2018 / 12:15:52 / svestkap" |
| 1341 | ! |
| 1342 | |
| 1343 | testReadValueNamesAndValuesDo_REG_SZ_02 |
| 1344 | "Testing if REG_SZ values are read correctly via valueNamesAndValuesDo:" |
| 1345 | |
| 1346 | | readData testingRegistryPath | |
| 1347 | |
| 1348 | readData := OrderedDictionary new. |
| 1349 | testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath. |
| 1350 | |
| 1351 | testingRegistryPath valueNamesAndValuesDo: [ :name :data | |
| 1352 | readData at: name put: data |
| 1353 | ]. |
| 1354 | |
| 1355 | self assert: (readData at: ' Šž Ä ã«. ') = 'Testing Unicode chars Šž Ä ã«ãããã'. |
| 1356 | |
| 1357 | " |
| 1358 | self run:#testReadValueNamesAndValuesDo_REG_SZ_02 |
| 1359 | self new testReadValueNamesAndValuesDo_REG_SZ_02 |
| 1360 | " |
| 1361 | |
| 1362 | "Created: / 05-12-2018 / 12:43:35 / svestkap" |
| 1363 | ! |
| 1364 | |
| 1365 | testReadValueNamesDo_MaxPath |
| 1366 | "reading via #valueNamesDo: (using #valueNameAtIndex:) with max Path |
| 1367 | The path is suppassing the Microsoft limit - for more information see testReadValueNameAtIndex_01" |
| 1368 | |
| 1369 | | readData readDataValue testingRegistryPath | |
| 1370 | |
| 1371 | readData := OrderedCollection new. |
| 1372 | testingRegistryPath := Win32OperatingSystem registryEntry key: |
| 1373 | (registryPath,'\', ' ã«ããã\256_chars_max_long|arsdfasdfjljljasdf;jl;jljsfasdfasdfljaslkdfjkasdfljalsd;jfa;lsdjflkasjdflkajsdflkjasdflkjsadlfjasldfjlsadjflksdjflksadjflkajsdflkjasdlfjalskdjflkasdjflkasdfkj;sdaf;kljkkjkklkjjjjkas|1asdfjsldfjlasdlfjlasdjfljasdlfjalsdjflajdfsdsasdfa|end'). |
| 1374 | |
| 1375 | testingRegistryPath valueNamesDo: [ :subEntry | |
| 1376 | readData add: subEntry |
| 1377 | ]. |
| 1378 | |
| 1379 | self assert: readData notEmptyOrNil. |
| 1380 | self assert: readData size = 3. |
| 1381 | self assert: readData first = 'testing'. |
| 1382 | self assert: readData second = 'ã'. |
| 1383 | self assert: readData third = '256_chars_max_long|arsdfasdfjljljasdf;jl;jljsfasdfasdfljaslkdfjkasdfljalsd;jfa;lsdjflkasjdflkajsdflkjasdflkjsadlfjasldfjlsadjflksdjflksadjflkajsdflkjasdlfjalskdjflkasdjflkasdfkj;sdaf;kljkkjkklkjjjjkas|1asdfjsldfjlasdlfjlasdjfljasdlfjalsdjflajdfsdsasdfa|end'. |
| 1384 | |
| 1385 | readDataValue := testingRegistryPath valueNamed: readData third. |
| 1386 | |
| 1387 | "/ MSDN limits: Value name 16,383 characters (@Windows 2000: 260 ANSI characters or 16,383 Unicode characters) |
| 1388 | "/ the following tests 401 characters |
| 1389 | self assert: readDataValue = 'Longer_than_256_chars_max_long|arsdfasdfjljljasdf;jl;jljsfasdfasdfljaslkdfjkasdfljalsd;jfa;lsdjflkasjdflkajsdflkjasdflkjsadlfjasldfjlsadjflksdjflksadjflkajsdflkjasdlfjalskdjflkasdjflkasdfkj;sdaf;kljkkjkklkjjjjkas|1asdfjsldfjlasdlfjlasdjfljasdlfjalsdjflajdfsdsasdfa|endsdfsdfasdfasdfasdfjlkasdjflkasjdflkjasdlfjaslkdfjlkasdjflkasdflksadlkjsadlfalsdfůlasdjflkasdjflkasjdflkůjasdflůkjasdlůfjalsůkdjflůksd'. |
| 1390 | " |
| 1391 | self run:#testReadValueNamesDo_MaxPath |
| 1392 | self new testReadValueNamesDo_MaxPath |
| 1393 | " |
| 1394 | |
| 1395 | "Created: / 05-12-2018 / 12:43:49 / svestkap" |
| 1396 | ! |
| 1397 | |
| 1398 | testReadValueNames_MaxPath |
| 1399 | "reading via #valueNames (using #valueNameAtIndex:) with max Path |
| 1400 | The path is suppassing the Microsoft limit - for more information see testReadValueNameAtIndex_01" |
| 1401 | |
| 1402 | | readData testingRegistryPath | |
| 1403 | |
| 1404 | testingRegistryPath := Win32OperatingSystem registryEntry key: |
| 1405 | (registryPath,'\', ' ã«ããã\256_chars_max_long|arsdfasdfjljljasdf;jl;jljsfasdfasdfljaslkdfjkasdfljalsd;jfa;lsdjflkasjdflkajsdflkjasdflkjsadlfjasldfjlsadjflksdjflksadjflkajsdflkjasdlfjalskdjflkasdjflkasdfkj;sdaf;kljkkjkklkjjjjkas|1asdfjsldfjlasdlfjlasdjfljasdlfjalsdjflajdfsdsasdfa|end'). |
| 1406 | |
| 1407 | readData := testingRegistryPath valueNames. |
| 1408 | |
| 1409 | self assert: readData isArray. |
| 1410 | self assert: readData notEmptyOrNil. |
| 1411 | self assert: readData size = 3. |
| 1412 | self assert: readData first = 'testing'. |
| 1413 | self assert: readData second = 'ã'. |
| 1414 | self assert: readData third = '256_chars_max_long|arsdfasdfjljljasdf;jl;jljsfasdfasdfljaslkdfjkasdfljalsd;jfa;lsdjflkasjdflkajsdflkjasdflkjsadlfjasldfjlsadjflksdjflksadjflkajsdflkjasdlfjalskdjflkasdjflkasdfkj;sdaf;kljkkjkklkjjjjkas|1asdfjsldfjlasdlfjlasdjfljasdlfjalsdjflajdfsdsasdfa|end'. |
| 1415 | |
| 1416 | " |
| 1417 | self run:#testReadValueNames_MaxPath |
| 1418 | self new testReadValueNames_MaxPath |
| 1419 | " |
| 1420 | |
| 1421 | "Created: / 05-12-2018 / 12:44:16 / svestkap" |
| 1422 | ! |
| 1423 | |
| 1424 | testReadvalueNamesAndValuesDo_MaxPath_01 |
| 1425 | "reading via #valueNamesAndValuesDo: (using #valueNameAtIndex:) with max Path |
| 1426 | The path is suppassing the Microsoft limit - for more information see testReadValueNameAtIndex_01" |
| 1427 | |
| 1428 | | readData testingRegistryPath | |
| 1429 | |
| 1430 | readData := OrderedDictionary new. |
| 1431 | testingRegistryPath := Win32OperatingSystem registryEntry key: |
| 1432 | (registryPath,'\', ' ã«ããã\256_chars_max_long|arsdfasdfjljljasdf;jl;jljsfasdfasdfljaslkdfjkasdfljalsd;jfa;lsdjflkasjdflkajsdflkjasdflkjsadlfjasldfjlsadjflksdjflksadjflkajsdflkjasdlfjalskdjflkasdjflkasdfkj;sdaf;kljkkjkklkjjjjkas|1asdfjsldfjlasdlfjlasdjfljasdlfjalsdjflajdfsdsasdfa|end'). |
| 1433 | |
| 1434 | testingRegistryPath valueNamesAndValuesDo: [ :name :value | |
| 1435 | readData at: name put: value |
| 1436 | ]. |
| 1437 | |
| 1438 | self assert: readData notEmptyOrNil. |
| 1439 | self assert: readData size = 3. |
| 1440 | self assert: readData first = ('testing'->' ã«ããã'). |
| 1441 | self assert: (readData at: 'ã')= 2. |
| 1442 | self assert: readData second = 2. |
| 1443 | self assert: (readData at: '256_chars_max_long|arsdfasdfjljljasdf;jl;jljsfasdfasdfljaslkdfjkasdfljalsd;jfa;lsdjflkasjdflkajsdflkjasdflkjsadlfjasldfjlsadjflksdjflksadjflkajsdflkjasdlfjalskdjflkasdjflkasdfkj;sdaf;kljkkjkklkjjjjkas|1asdfjsldfjlasdlfjlasdjfljasdlfjalsdjflajdfsdsasdfa|end') |
| 1444 | = 'Longer_than_256_chars_max_long|arsdfasdfjljljasdf;jl;jljsfasdfasdfljaslkdfjkasdfljalsd;jfa;lsdjflkasjdflkajsdflkjasdflkjsadlfjasldfjlsadjflksdjflksadjflkajsdflkjasdlfjalskdjflkasdjflkasdfkj;sdaf;kljkkjkklkjjjjkas|1asdfjsldfjlasdlfjlasdjfljasdlfjalsdjflajdfsdsasdfa|endsdfsdfasdfasdfasdfjlkasdjflkasjdflkjasdlfjaslkdfjlkasdjflkasdflksadlkjsadlfalsdfůlasdjflkasdjflkasjdflkůjasdflůkjasdlůfjalsůkdjflůksd'. |
| 1445 | self assert: readData third = 'Longer_than_256_chars_max_long|arsdfasdfjljljasdf;jl;jljsfasdfasdfljaslkdfjkasdfljalsd;jfa;lsdjflkasjdflkajsdflkjasdflkjsadlfjasldfjlsadjflksdjflksadjflkajsdflkjasdlfjalskdjflkasdjflkasdfkj;sdaf;kljkkjkklkjjjjkas|1asdfjsldfjlasdlfjlasdjfljasdlfjalsdjflajdfsdsasdfa|endsdfsdfasdfasdfasdfjlkasdjflkasjdflkjasdlfjaslkdfjlkasdjflkasdflksadlkjsadlfalsdfůlasdjflkasdjflkasjdflkůjasdflůkjasdlůfjalsůkdjflůksd'. |
| 1446 | |
| 1447 | " |
| 1448 | self run:#testReadvalueNamesAndValuesDo_MaxPath_01 |
| 1449 | self new testReadvalueNamesAndValuesDo_MaxPath_01 |
| 1450 | " |
| 1451 | |
| 1452 | "Created: / 22-11-2018 / 14:10:34 / svestkap" |
| 1453 | ! |
| 1454 | |
| 1455 | testReadvalueNamesAndValuesDo_REG_SZ_02 |
| 1456 | "Testing if REG_SZ values are read correctly via valueNamesAndValuesDo:" |
| 1457 | |
| 1458 | | readData testingRegistryPath | |
| 1459 | |
| 1460 | readData := OrderedDictionary new. |
| 1461 | testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath. |
| 1462 | |
| 1463 | testingRegistryPath valueNamesAndValuesDo: [ :name :data | |
| 1464 | readData at: name put: data |
| 1465 | ]. |
| 1466 | |
| 1467 | self assert: (readData at: ' Šž Ä ã«. ') = 'Testing Unicode chars Šž Ä ã«ãããã'. |
| 1468 | |
| 1469 | " |
| 1470 | self run:#testReadvalueNamesAndValuesDo_REG_SZ_02 |
| 1471 | self new testReadvalueNamesAndValuesDo_REG_SZ_02 |
| 1472 | " |
| 1473 | |
| 1474 | "Created: / 16-11-2018 / 12:16:16 / svestkap" |
| 1475 | ! |
| 1476 | |
| 1477 | testReadvalueNamesDo_MaxPath_01 |
| 1478 | "reading via #valueNamesDo: (using #valueNameAtIndex:) with max Path |
| 1479 | The path is suppassing the Microsoft limit - for more information see testReadValueNameAtIndex_01" |
| 1480 | |
| 1481 | | readData readDataValue testingRegistryPath | |
| 1482 | |
| 1483 | readData := OrderedCollection new. |
| 1484 | testingRegistryPath := Win32OperatingSystem registryEntry key: |
| 1485 | (registryPath,'\', ' ã«ããã\256_chars_max_long|arsdfasdfjljljasdf;jl;jljsfasdfasdfljaslkdfjkasdfljalsd;jfa;lsdjflkasjdflkajsdflkjasdflkjsadlfjasldfjlsadjflksdjflksadjflkajsdflkjasdlfjalskdjflkasdjflkasdfkj;sdaf;kljkkjkklkjjjjkas|1asdfjsldfjlasdlfjlasdjfljasdlfjalsdjflajdfsdsasdfa|end'). |
| 1486 | |
| 1487 | testingRegistryPath valueNamesDo: [ :subEntry | |
| 1488 | readData add: subEntry |
| 1489 | ]. |
| 1490 | |
| 1491 | self assert: readData notEmptyOrNil. |
| 1492 | self assert: readData size = 3. |
| 1493 | self assert: readData first = 'testing'. |
| 1494 | self assert: readData second = 'ã'. |
| 1495 | self assert: readData third = '256_chars_max_long|arsdfasdfjljljasdf;jl;jljsfasdfasdfljaslkdfjkasdfljalsd;jfa;lsdjflkasjdflkajsdflkjasdflkjsadlfjasldfjlsadjflksdjflksadjflkajsdflkjasdlfjalskdjflkasdjflkasdfkj;sdaf;kljkkjkklkjjjjkas|1asdfjsldfjlasdlfjlasdjfljasdlfjalsdjflajdfsdsasdfa|end'. |
| 1496 | |
| 1497 | readDataValue := testingRegistryPath valueNamed: readData third. |
| 1498 | |
| 1499 | "/ MSDN limits: Value name 16,383 characters (@Windows 2000: 260 ANSI characters or 16,383 Unicode characters) |
| 1500 | "/ the following tests 401 characters |
| 1501 | self assert: readDataValue = 'Longer_than_256_chars_max_long|arsdfasdfjljljasdf;jl;jljsfasdfasdfljaslkdfjkasdfljalsd;jfa;lsdjflkasjdflkajsdflkjasdflkjsadlfjasldfjlsadjflksdjflksadjflkajsdflkjasdlfjalskdjflkasdjflkasdfkj;sdaf;kljkkjkklkjjjjkas|1asdfjsldfjlasdlfjlasdjfljasdlfjalsdjflajdfsdsasdfa|endsdfsdfasdfasdfasdfjlkasdjflkasjdflkjasdlfjaslkdfjlkasdjflkasdflksadlkjsadlfalsdfůlasdjflkasdjflkasjdflkůjasdflůkjasdlůfjalsůkdjflůksd'. |
| 1502 | " |
| 1503 | self run:#testReadvalueNamesDo_MaxPath_01 |
| 1504 | self new testReadvalueNamesDo_MaxPath_01 |
| 1505 | " |
| 1506 | |
| 1507 | "Created: / 22-11-2018 / 13:17:42 / svestkap" |
| 1508 | ! |
| 1509 | |
| 1510 | testReadvalueNames_MaxPath_01 |
| 1511 | "reading via #valueNames (using #valueNameAtIndex:) with max Path |
| 1512 | The path is suppassing the Microsoft limit - for more information see testReadValueNameAtIndex_01" |
| 1513 | |
| 1514 | | readData testingRegistryPath | |
| 1515 | |
| 1516 | testingRegistryPath := Win32OperatingSystem registryEntry key: |
| 1517 | (registryPath,'\', ' ã«ããã\256_chars_max_long|arsdfasdfjljljasdf;jl;jljsfasdfasdfljaslkdfjkasdfljalsd;jfa;lsdjflkasjdflkajsdflkjasdflkjsadlfjasldfjlsadjflksdjflksadjflkajsdflkjasdlfjalskdjflkasdjflkasdfkj;sdaf;kljkkjkklkjjjjkas|1asdfjsldfjlasdlfjlasdjfljasdlfjalsdjflajdfsdsasdfa|end'). |
| 1518 | |
| 1519 | readData := testingRegistryPath valueNames. |
| 1520 | |
| 1521 | self assert: readData isArray. |
| 1522 | self assert: readData notEmptyOrNil. |
| 1523 | self assert: readData size = 3. |
| 1524 | self assert: readData first = 'testing'. |
| 1525 | self assert: readData second = 'ã'. |
| 1526 | self assert: readData third = '256_chars_max_long|arsdfasdfjljljasdf;jl;jljsfasdfasdfljaslkdfjkasdfljalsd;jfa;lsdjflkasjdflkajsdflkjasdflkjsadlfjasldfjlsadjflksdjflksadjflkajsdflkjasdlfjalskdjflkasdjflkasdfkj;sdaf;kljkkjkklkjjjjkas|1asdfjsldfjlasdlfjlasdjfljasdlfjalsdjflajdfsdsasdfa|end'. |
| 1527 | |
| 1528 | " |
| 1529 | self run:#testReadvalueNames_MaxPath_01 |
| 1530 | self new testReadvalueNames_MaxPath_01 |
| 1531 | " |
| 1532 | |
| 1533 | "Created: / 22-11-2018 / 14:29:07 / svestkap" |
| 1534 | ! ! |
| 1535 | |