RegressionTests__Win32OperatingSystemTest.st
branchjv
changeset 2086 677b483367cf
parent 2085 823598772842
child 2087 43b964e25f8a
equal deleted inserted replaced
2085:823598772842 2086:677b483367cf
   360   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,\
   360   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,\
   361   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,\
   361   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,\
   362   00
   362   00
   363 [HKEY_CURRENT_USER\Software\SmalltalkX-tests\ ルすしか_testing_delete\zubr]
   363 [HKEY_CURRENT_USER\Software\SmalltalkX-tests\ ルすしか_testing_delete\zubr]
   364 
   364 
       
   365 [HKEY_CURRENT_USER\Software\SmalltalkX-tests\ ルすしか_testing_delete\reg-none]
       
   366 @=hex(0):
       
   367 
   365 [HKEY_CURRENT_USER\Software\SmalltalkX-tests\ ルすしか_testing_delete\bobr]
   368 [HKEY_CURRENT_USER\Software\SmalltalkX-tests\ ルすしか_testing_delete\bobr]
   366 
   369 
   367 [HKEY_CURRENT_USER\Software\SmalltalkX-tests\ ルすしか_testing_delete\bobr\boříččátka]
   370 [HKEY_CURRENT_USER\Software\SmalltalkX-tests\ ルすしか_testing_delete\bobr\boříččátka]
   368 '
   371 '
   369 
   372 
   370     "Created: / 16-11-2018 / 11:24:57 / svestkap"
   373     "Created: / 16-11-2018 / 11:24:57 / svestkap"
   371     "Modified: / 07-12-2018 / 10:44:44 / svestkap"
   374     "Modified: / 01-02-2019 / 13:08:58 / svestkap"
       
   375 !
       
   376 
       
   377 unicodeRegistryExample32bit
       
   378 
       
   379 ^  'Windows Registry Editor Version 5.00
       
   380 
       
   381 [HKEY_CURRENT_USER\Software\SmalltalkX-tests]
       
   382 @="しか OMG"
       
   383 "emptyToTest"=""
       
   384 "testEmptyMultiSZ"=hex(7):00,00
       
   385 "bledesu"="''Testing Unicode chars ř ž č ルすしかき'').          "
       
   386 "しかき    "="Testus gradus"
       
   387 " ř ž č ル.          "="Testing Unicode chars ř ž č ルすしかき"
       
   388 "zero"=hex:
       
   389 "non-zero"=hex:11,10
       
   390 "す    "=hex:10
       
   391 "dword_value"=dword:000023af
       
   392 "11"="A number name"
       
   393 "き"=dword:234234af
       
   394 "Font_Leelawadee UI Bold"=hex(7):53,00,45,00,47,00,4f,00,45,00,55,00,49,00,42,\
       
   395   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,\
       
   396   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,\
       
   397   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,\
       
   398   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,\
       
   399   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,\
       
   400   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,\
       
   401   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,\
       
   402   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,\
       
   403   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,\
       
   404   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,\
       
   405   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,\
       
   406   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,\
       
   407   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,\
       
   408   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,\
       
   409   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,\
       
   410   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,\
       
   411   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,\
       
   412   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,\
       
   413   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,\
       
   414   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,\
       
   415   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,\
       
   416   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,\
       
   417   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,\
       
   418   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,\
       
   419   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,\
       
   420   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,\
       
   421   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,\
       
   422   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,\
       
   423   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,\
       
   424   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,\
       
   425   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,\
       
   426   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,\
       
   427   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,\
       
   428   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,\
       
   429   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,\
       
   430   62,00,6f,00,6c,00,00,00,00,00
       
   431 "ř ž č ルすしか"=hex(7):27,00,54,00,65,00,73,00,74,00,69,00,6e,00,67,00,20,00,55,\
       
   432   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,\
       
   433   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,\
       
   434   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,\
       
   435   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,\
       
   436   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,\
       
   437   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,\
       
   438   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,\
       
   439   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,\
       
   440   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,\
       
   441   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,\
       
   442   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,\
       
   443   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,\
       
   444   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,\
       
   445   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,\
       
   446   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,\
       
   447   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,\
       
   448   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,\
       
   449   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,\
       
   450   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,\
       
   451   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,\
       
   452   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,\
       
   453   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,\
       
   454   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,\
       
   455   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,\
       
   456   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,\
       
   457   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,\
       
   458   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,\
       
   459   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,\
       
   460   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,\
       
   461   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,\
       
   462   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,\
       
   463   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,\
       
   464   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,\
       
   465   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,\
       
   466   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,\
       
   467   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,\
       
   468   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,\
       
   469   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,\
       
   470   00,00,00,00,00
       
   471 "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,\
       
   472   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,\
       
   473   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,\
       
   474   2e,00,20,00,20,00,20,00,20,00,20,00,20,00,20,00,20,00,20,00,20,00,00,00
       
   475 " č ルすしか"=hex(2):27,00,54,00,65,00,73,00,74,00,69,00,6e,00,67,00,20,00,55,00,\
       
   476   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,\
       
   477   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,\
       
   478   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,\
       
   479   00
       
   480 [HKEY_CURRENT_USER\Software\SmalltalkX-tests\ ルすしか_empty]
       
   481 
       
   482 [HKEY_CURRENT_USER\Software\SmalltalkX-tests\ ルすしか]
       
   483 "bledesu"="''Testing Unicode chars ř ž č ルすしかき'').          "
       
   484 "しかき    "="Testus gradus"
       
   485 " ř ž č ル.          "="Testing Unicode chars ř ž č ルすしかき"
       
   486 "zero"=hex:
       
   487 "non-zero"=hex:11,10
       
   488 "す    "=hex:10
       
   489 "dword_value"=dword:000023af
       
   490 "き"=dword:234234af
       
   491 "Font_Leelawadee UI Bold"=hex(7):53,00,45,00,47,00,4f,00,45,00,55,00,49,00,42,\
       
   492   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,\
       
   493   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,\
       
   494   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,\
       
   495   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,\
       
   496   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,\
       
   497   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,\
       
   498   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,\
       
   499   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,\
       
   500   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,\
       
   501   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,\
       
   502   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,\
       
   503   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,\
       
   504   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,\
       
   505   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,\
       
   506   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,\
       
   507   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,\
       
   508   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,\
       
   509   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,\
       
   510   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,\
       
   511   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,\
       
   512   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,\
       
   513   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,\
       
   514   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,\
       
   515   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,\
       
   516   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,\
       
   517   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,\
       
   518   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,\
       
   519   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,\
       
   520   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,\
       
   521   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,\
       
   522   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,\
       
   523   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,\
       
   524   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,\
       
   525   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,\
       
   526   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,\
       
   527   62,00,6f,00,6c,00,00,00,00,00
       
   528 "ř ž č ルすしか"=hex(7):27,00,54,00,65,00,73,00,74,00,69,00,6e,00,67,00,20,00,55,\
       
   529   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,\
       
   530   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,\
       
   531   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,\
       
   532   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,\
       
   533   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,\
       
   534   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,\
       
   535   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,\
       
   536   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,\
       
   537   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,\
       
   538   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,\
       
   539   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,\
       
   540   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,\
       
   541   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,\
       
   542   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,\
       
   543   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,\
       
   544   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,\
       
   545   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,\
       
   546   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,\
       
   547   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,\
       
   548   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,\
       
   549   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,\
       
   550   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,\
       
   551   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,\
       
   552   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,\
       
   553   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,\
       
   554   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,\
       
   555   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,\
       
   556   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,\
       
   557   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,\
       
   558   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,\
       
   559   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,\
       
   560   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,\
       
   561   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,\
       
   562   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,\
       
   563   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,\
       
   564   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,\
       
   565   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,\
       
   566   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,\
       
   567   00,00,00,00,00
       
   568 "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,\
       
   569   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,\
       
   570   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,\
       
   571   2e,00,20,00,20,00,20,00,20,00,20,00,20,00,20,00,20,00,20,00,20,00,00,00
       
   572 " č ルすしか"=hex(2):27,00,54,00,65,00,73,00,74,00,69,00,6e,00,67,00,20,00,55,00,\
       
   573   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,\
       
   574   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,\
       
   575   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,\
       
   576   00
       
   577 
       
   578 [HKEY_CURRENT_USER\Software\SmalltalkX-tests\ ルすしか\256_chars_max_long|arsdfasdfjljljasdf;jl;jljsfasdfasdfljaslkdfjkasdfljalsd;jfa;lsdjflkasjdflkajsdflkjasdflkjsadlfjasldfjlsadjflksdjflksadjflkajsdflkjasdlfjalskdjflkasdjflkasdfkj;sdaf;kljkkjkklkjjjjkas|1asdfjsldfjlasdlfjlasdjfljasdlfjalsdjflajdfsdsasdfa|end]
       
   579 "testing"=" ルすしか"
       
   580 "か"=dword:00000002
       
   581 "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"
       
   582 
       
   583 [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]
       
   584 
       
   585 [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]
       
   586 
       
   587 [HKEY_CURRENT_USER\Software\SmalltalkX-tests\ ルすしか\256_chars_max_long|arsdfasdfjljljasdf;jl;jljsfasdfasdfljaslkdfjkasdfljalsd;jfa;lsdjflkasjdflkajsdflkjasdflkjsadlfjasldfjlsadjflksdjflksadjflkajsdflkjasdlfjalskdjflkasdjflkasdfkj;sdaf;kljkkjkklkjjjjkas|1asdfjsldfjlasdlfjlasdjfljasdlfjalsdjflajdfsdsasdfa|end\reachable]
       
   588 
       
   589 [HKEY_CURRENT_USER\Software\SmalltalkX-tests\ ルすしか_testing_delete]
       
   590 
       
   591 [HKEY_CURRENT_USER\Software\SmalltalkX-tests\ ルすしか_testing_delete\ughu]
       
   592 "bledesu"="''Testing Unicode chars ř ž č ルすしかき'').          "
       
   593 "しかき    "="Testus gradus"
       
   594 " ř ž č ル.          "="Testing Unicode chars ř ž č ルすしかき"
       
   595 "zero"=hex:
       
   596 "non-zero"=hex:11,10
       
   597 "す    "=hex:10
       
   598 "dword_value"=dword:000023af
       
   599 "き"=dword:234234af
       
   600 "Font_Leelawadee UI Bold"=hex(7):53,00,45,00,47,00,4f,00,45,00,55,00,49,00,42,\
       
   601   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,\
       
   602   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,\
       
   603   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,\
       
   604   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,\
       
   605   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,\
       
   606   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,\
       
   607   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,\
       
   608   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,\
       
   609   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,\
       
   610   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,\
       
   611   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,\
       
   612   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,\
       
   613   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,\
       
   614   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,\
       
   615   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,\
       
   616   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,\
       
   617   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,\
       
   618   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,\
       
   619   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,\
       
   620   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,\
       
   621   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,\
       
   622   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,\
       
   623   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,\
       
   624   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,\
       
   625   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,\
       
   626   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,\
       
   627   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,\
       
   628   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,\
       
   629   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,\
       
   630   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,\
       
   631   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,\
       
   632   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,\
       
   633   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,\
       
   634   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,\
       
   635   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,\
       
   636   62,00,6f,00,6c,00,00,00,00,00
       
   637 "ř ž č ルすしか"=hex(7):27,00,54,00,65,00,73,00,74,00,69,00,6e,00,67,00,20,00,55,\
       
   638   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,\
       
   639   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,\
       
   640   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,\
       
   641   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,\
       
   642   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,\
       
   643   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,\
       
   644   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,\
       
   645   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,\
       
   646   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,\
       
   647   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,\
       
   648   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,\
       
   649   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,\
       
   650   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,\
       
   651   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,\
       
   652   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,\
       
   653   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,\
       
   654   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,\
       
   655   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,\
       
   656   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,\
       
   657   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,\
       
   658   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,\
       
   659   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,\
       
   660   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,\
       
   661   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,\
       
   662   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,\
       
   663   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,\
       
   664   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,\
       
   665   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,\
       
   666   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,\
       
   667   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,\
       
   668   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,\
       
   669   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,\
       
   670   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,\
       
   671   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,\
       
   672   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,\
       
   673   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,\
       
   674   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,\
       
   675   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,\
       
   676   00,00,00,00,00
       
   677 "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,\
       
   678   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,\
       
   679   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,\
       
   680   2e,00,20,00,20,00,20,00,20,00,20,00,20,00,20,00,20,00,20,00,20,00,00,00
       
   681 " č ルすしか"=hex(2):27,00,54,00,65,00,73,00,74,00,69,00,6e,00,67,00,20,00,55,00,\
       
   682   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,\
       
   683   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,\
       
   684   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,\
       
   685   00
       
   686 [HKEY_CURRENT_USER\Software\SmalltalkX-tests\ ルすしか_testing_delete\zubr]
       
   687 
       
   688 [HKEY_CURRENT_USER\Software\SmalltalkX-tests\ ルすしか_testing_delete\reg-none]
       
   689 @=hex(0):
       
   690 
       
   691 [HKEY_CURRENT_USER\Software\SmalltalkX-tests\ ルすしか_testing_delete\bobr]
       
   692 
       
   693 [HKEY_CURRENT_USER\Software\SmalltalkX-tests\ ルすしか_testing_delete\bobr\boříččátka]
       
   694 '
       
   695 
       
   696     "Created: / 01-02-2019 / 15:17:59 / svestkap"
   372 ! !
   697 ! !
   373 
   698 
   374 !Win32OperatingSystemTest methodsFor:'release'!
   699 !Win32OperatingSystemTest methodsFor:'release'!
   375 
   700 
   376 setUp
   701 setUp
   377     | registryToImport file |
   702     | registryToImport file |
   378 
   703 
   379     self skipIf: OperatingSystem isMSWINDOWSlike not description: 'Windows specific tests'.
   704     self skipIf: OperatingSystem isMSWINDOWSlike not description: 'Windows only tests (registry manipulation)'.
   380     super setUp.
   705     super setUp.    
   381             
   706 
   382     registryToImport := self unicodeRegistryExample.    
   707     registryToImport := (OperatingSystem getSystemInfo at: #architecture) = #x64 ifTrue: [ self unicodeRegistryExample ]
       
   708                                                                                 ifFalse: [ self unicodeRegistryExample32bit ].
   383     
   709     
   384     "/ registry path which will be used  
   710     "/ registry path which will be used  
   385     registryPath := registryToImport 
   711     registryPath := registryToImport 
   386         copyFrom: (registryToImport indexOf: $[) + 1
   712         copyFrom: (registryToImport indexOf: $[) + 1
   387         to: (registryToImport indexOf: $]) - 1.       
   713         to: (registryToImport indexOf: $]) - 1.       
   412     [   "/ adding registry entry so we can test it
   738     [   "/ adding registry entry so we can test it
   413         OperatingSystem getCommandOutputFrom: ('REG IMPORT ' , file asString)
   739         OperatingSystem getCommandOutputFrom: ('REG IMPORT ' , file asString)
   414     ] ensure: [ file remove ].
   740     ] ensure: [ file remove ].
   415 
   741 
   416     "Created: / 28-12-2016 / 22:12:14 / jv"
   742     "Created: / 28-12-2016 / 22:12:14 / jv"
   417     "Modified (format): / 16-11-2018 / 11:30:30 / svestkap"
   743     "Modified: / 01-02-2019 / 15:24:07 / svestkap"
   418 !
   744 !
   419 
   745 
   420 tearDown
   746 tearDown
   421     self skipIf: OperatingSystem isMSWINDOWSlike not description: 'Windows specific tests'.
   747     self skipIf: OperatingSystem isMSWINDOWSlike not description: 'Windows specific tests'.
   422     super tearDown.
   748     super tearDown.
   768     "
  1094     "
   769 
  1095 
   770     "Created: / 07-12-2018 / 15:51:52 / svestkap"
  1096     "Created: / 07-12-2018 / 15:51:52 / svestkap"
   771 !
  1097 !
   772 
  1098 
       
  1099 testOpenSubKeyNamed_05
       
  1100     "Testing an error is raised when number is used to access the subKey via subKeyNamed:createIfAbsent:"
       
  1101     | testingRegistryPath readSubKeys subKeysCount |
       
  1102      
       
  1103     testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
       
  1104     readSubKeys := testingRegistryPath subKeys. 
       
  1105     subKeysCount := readSubKeys size.
       
  1106     
       
  1107     self assert: subKeysCount = 3.
       
  1108     "/ trying to read already existing subKey    
       
  1109     self should: [ testingRegistryPath subKeyNamed: 11 createIfAbsent: true ] 
       
  1110          raise: Error 
       
  1111          suchThat: [ :e | e messageText = 'subKeyString is not a string!!' ]
       
  1112          
       
  1113     "
       
  1114      self run:#testOpenSubKeyNamed_05
       
  1115      self new testOpenSubKeyNamed_05
       
  1116     "
       
  1117 
       
  1118     "Created: / 01-02-2019 / 15:58:49 / svestkap"
       
  1119 !
       
  1120 
   773 testOpenSubKeyNamed_Wow64_32_01 
  1121 testOpenSubKeyNamed_Wow64_32_01 
   774     "Testing if an old subKey is opened in Wow64_32 (32bit program reading 32bit registry)"
  1122     "Testing if an old subKey is opened in Wow64_32 (32bit program reading 32bit registry)"
   775     | readData testingRegistryPath readSubKeys subKeysCount |
  1123     | readData testingRegistryPath readSubKeys subKeysCount |
   776    
  1124    
   777     self skipIf: (OperatingSystem getSystemInfo at: #architecture) ~= #x64 description: 'Test only for x64 architecture'.         
  1125     self skipIf: (OperatingSystem getSystemInfo at: #architecture) ~= #x64 description: 'Test only for x64 architecture'.         
   925 
  1273 
   926     "Created: / 07-12-2018 / 15:45:42 / svestkap"
  1274     "Created: / 07-12-2018 / 15:45:42 / svestkap"
   927 !
  1275 !
   928 
  1276 
   929 testOpenSubKeyNamed_nonExisting_01
  1277 testOpenSubKeyNamed_nonExisting_01
   930     "Trying to read non-existing subKey"
  1278     "Trying to read non-existing subKey via subKeyNamed:flags:createIfAbsent:"
   931     | readData testingRegistryPath readSubKeys subKeysCount |
  1279     | readData testingRegistryPath readSubKeys subKeysCount |
   932    
  1280    
   933     readData := Unicode16String new.    
  1281     readData := Unicode16String new.    
   934     testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
  1282     testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
   935     readSubKeys := testingRegistryPath subKeys. 
  1283     readSubKeys := testingRegistryPath subKeys. 
   936     subKeysCount := readSubKeys size.
  1284     subKeysCount := readSubKeys size.    
   937     
       
   938     self assert: subKeysCount = 3.
  1285     self assert: subKeysCount = 3.
       
  1286     
   939     "/ trying to read non-existent subKey    
  1287     "/ trying to read non-existent subKey    
   940     readData := testingRegistryPath subKeyNamed: 'bledesu ル' flags: nil createIfAbsent: false.
  1288     readData := testingRegistryPath subKeyNamed: 'bledesu ル' flags: nil createIfAbsent: false.
   941     "/ check if new path is with the subKeyNamed above
  1289     "/ check if new path is with the subKeyNamed above
   942 
       
   943     self assert: readData isNil
  1290     self assert: readData isNil
   944     
  1291     
   945     "
  1292     "
   946      self run:#testOpenSubKeyNamed_nonExisting_01
  1293      self run:#testOpenSubKeyNamed_nonExisting_01
   947      self new testOpenSubKeyNamed_nonExisting_01
  1294      self new testOpenSubKeyNamed_nonExisting_01
   948     "
  1295     "
   949 
  1296 
   950     "Created: / 07-12-2018 / 15:50:18 / svestkap"
  1297     "Created: / 07-12-2018 / 15:50:18 / svestkap"
       
  1298     "Modified (comment): / 01-02-2019 / 15:06:05 / svestkap"
   951 !
  1299 !
   952 
  1300 
   953 testOpenSubKeyNamed_nonExisting_02
  1301 testOpenSubKeyNamed_nonExisting_02
   954     "Trying to read non-existing subKey via subKeyNamed:"
  1302     "Trying to read non-existing subKey via subKeyNamed:"
   955     | readData testingRegistryPath readSubKeys subKeysCount |
  1303     | readData testingRegistryPath readSubKeys subKeysCount |
   956    
  1304    
   957     readData := Unicode16String new.    
  1305     readData := Unicode16String new.    
   958     testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
  1306     testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
   959     readSubKeys := testingRegistryPath subKeys. 
  1307     readSubKeys := testingRegistryPath subKeys. 
   960     subKeysCount := readSubKeys size.
  1308     subKeysCount := readSubKeys size.    
   961     
       
   962     self assert: subKeysCount = 3.
  1309     self assert: subKeysCount = 3.
       
  1310     
   963     "/ trying to read non-existent subKey    
  1311     "/ trying to read non-existent subKey    
   964     readData := testingRegistryPath subKeyNamed: 'bledesu ル'.
  1312     readData := testingRegistryPath subKeyNamed: 'bledesu ル'.
   965     "/ check if new path is with the subKeyNamed above
  1313     "/ check if new path is with the subKeyNamed above
   966 
       
   967     self assert: readData isNil
  1314     self assert: readData isNil
   968     
  1315     
   969     "
  1316     "
   970      self run:#testOpenSubKeyNamed_nonExisting_02
  1317      self run:#testOpenSubKeyNamed_nonExisting_02
   971      self new testOpenSubKeyNamed_nonExisting_02
  1318      self new testOpenSubKeyNamed_nonExisting_02
   972     "
  1319     "
   973 
  1320 
   974     "Created: / 07-12-2018 / 15:50:48 / svestkap"
  1321     "Created: / 07-12-2018 / 15:50:48 / svestkap"
       
  1322     "Modified (format): / 01-02-2019 / 15:05:45 / svestkap"
   975 ! !
  1323 ! !
   976 
  1324 
   977 !Win32OperatingSystemTest methodsFor:'tests-unicodeDelete'!
  1325 !Win32OperatingSystemTest methodsFor:'tests-unicodeDelete'!
   978 
  1326 
   979 testDeleteSubKeyNamed
  1327 testDeleteSubKeyNamed_01
   980     "Testing deleting of empty subKey via deleteSubKeyNamed:"
  1328     "Testing deleting of empty subKey via deleteSubKeyNamed:"  
   981     
       
   982     | returnValue testingRegistryPath |
  1329     | returnValue testingRegistryPath |
   983 
  1330 
   984     testingRegistryPath := Win32OperatingSystem registryEntry key:  registryPath.
  1331     testingRegistryPath := Win32OperatingSystem registryEntry key:  registryPath.
   985     
  1332     
   986     "/ if successfully deteted -> true 
  1333     "/ if successfully deteted -> true 
   987     returnValue := testingRegistryPath deleteSubKeyNamed: ' ルすしか_empty'.
  1334     returnValue := testingRegistryPath deleteSubKeyNamed: ' ルすしか_empty'.
   988     self assert: returnValue
  1335     self assert: returnValue
   989  
  1336  
   990     "
  1337     "
   991      self run:#testDeleteSubKeyNamed
  1338      self run:#testDeleteSubKeyNamed_01
   992      self new testDeleteSubKeyNamed
  1339      self new testDeleteSubKeyNamed_01
   993     "
  1340     "
   994 
  1341 
   995     "Created: / 07-12-2018 / 09:49:44 / svestkap"
  1342     "Created: / 30-01-2019 / 15:42:27 / svestkap"
       
  1343     "Modified (format): / 01-02-2019 / 14:59:58 / svestkap"
       
  1344 !
       
  1345 
       
  1346 testDeleteSubKeyNamed_02
       
  1347     "Testing deleting of empty subKey via deleteSubKeyNamed:"
       
  1348     | testingRegistryPath |
       
  1349 
       
  1350     testingRegistryPath := Win32OperatingSystem registryEntry key:  registryPath.
       
  1351     
       
  1352     self should: [ testingRegistryPath deleteSubKeyNamed: 11 ] 
       
  1353          raise: Error 
       
  1354          suchThat: [ :e | e messageText = 'subKeyString is not a string!!' ].            
       
  1355  
       
  1356     "
       
  1357      self run:#testDeleteSubKeyNamed_02
       
  1358      self new testDeleteSubKeyNamed_02
       
  1359     "
       
  1360 
       
  1361     "Created: / 30-01-2019 / 15:42:01 / svestkap"
       
  1362     "Modified (format): / 01-02-2019 / 15:00:13 / svestkap"
   996 !
  1363 !
   997 
  1364 
   998 testDeleteSubKeyNamed_Wow64_32
  1365 testDeleteSubKeyNamed_Wow64_32
   999     "Testing deleting of empty subKey via deleteSubKeyNamed: (only on x64 systems)
  1366     "Testing deleting of empty subKey via deleteSubKeyNamed: (only on x64 systems)
  1000     Wow subsystem enables running 32bit applications on 64bit windows"
  1367      Wow subsystem enables running 32bit applications on 64bit windows"
  1001     | returnValue testingRegistryPath |
  1368     | returnValue testingRegistryPath |
  1002     
  1369     
  1003     self skipIf: (OperatingSystem getSystemInfo at: #architecture) ~= #x64 description: 'Test only for x64 architecture'.
  1370     self skipIf: (OperatingSystem getSystemInfo at: #architecture) ~= #x64 description: 'Test only for x64 architecture'.
  1004 
  1371 
  1005     testingRegistryPath := Win32OperatingSystem registryEntry key:  registryPath.
  1372     testingRegistryPath := Win32OperatingSystem registryEntry key:  registryPath.
  1012      self run:#testDeleteSubKeyNamed_Wow64_32
  1379      self run:#testDeleteSubKeyNamed_Wow64_32
  1013      self new testDeleteSubKeyNamed_Wow64_32
  1380      self new testDeleteSubKeyNamed_Wow64_32
  1014     "
  1381     "
  1015 
  1382 
  1016     "Created: / 07-12-2018 / 14:56:39 / svestkap"
  1383     "Created: / 07-12-2018 / 14:56:39 / svestkap"
       
  1384     "Modified (comment): / 01-02-2019 / 15:00:17 / svestkap"
  1017 !
  1385 !
  1018 
  1386 
  1019 testDeleteSubKeyNamed_Wow64_64
  1387 testDeleteSubKeyNamed_Wow64_64
  1020     "Testing deleting of empty subKey via deleteSubKeyNamed: (only on x64 systems)
  1388     "Testing deleting of empty subKey via deleteSubKeyNamed: (only on x64 systems)
  1021      Wow subsystem enables running 32bit applications on 64bit windows"
  1389      Wow subsystem enables running 32bit applications on 64bit windows"
  1037     "Created: / 07-12-2018 / 14:55:03 / svestkap"
  1405     "Created: / 07-12-2018 / 14:55:03 / svestkap"
  1038 !
  1406 !
  1039 
  1407 
  1040 testDeleteValueNamed_REG_BINARY
  1408 testDeleteValueNamed_REG_BINARY
  1041     "Testing if REG_BINARY value name is correctly deleted via deleteValueNamed:"
  1409     "Testing if REG_BINARY value name is correctly deleted via deleteValueNamed:"
  1042 
       
  1043     | readData testingRegistryPath registryValueName deleteResult |
  1410     | readData testingRegistryPath registryValueName deleteResult |
  1044 
  1411 
  1045     readData := Unicode16String new.    
  1412     readData := Unicode16String new.    
  1046         testingRegistryPath := Win32OperatingSystem registryEntry key: (registryPath, '\', ' ルすしか').
  1413     testingRegistryPath := Win32OperatingSystem registryEntry key: (registryPath, '\', ' ルすしか').
  1047     registryValueName := 'non-zero'.
  1414     registryValueName := 'non-zero'.
  1048 
  1415 
  1049     readData := testingRegistryPath valueNamed: registryValueName.
  1416     readData := testingRegistryPath valueNamed: registryValueName.
  1050     self assert: readData notEmptyOrNil.
  1417     self assert: readData notEmptyOrNil.
  1051 
  1418 
  1060      self new testDeleteValueNamed_REG_BINARY
  1427      self new testDeleteValueNamed_REG_BINARY
  1061     "
  1428     "
  1062 
  1429 
  1063     "Created: / 06-12-2018 / 13:56:35 / svestkap"
  1430     "Created: / 06-12-2018 / 13:56:35 / svestkap"
  1064     "Modified: / 07-12-2018 / 09:50:41 / svestkap"
  1431     "Modified: / 07-12-2018 / 09:50:41 / svestkap"
       
  1432     "Modified (format): / 01-02-2019 / 15:00:42 / svestkap"
  1065 !
  1433 !
  1066 
  1434 
  1067 testDeleteValueNamed_REG_DWORD
  1435 testDeleteValueNamed_REG_DWORD
  1068     "Testing if REG_DWORD value name is correctly deleted via deleteValueNamed:"
  1436     "Testing if REG_DWORD value name is correctly deleted via deleteValueNamed:"
  1069     
       
  1070     | readData testingRegistryPath registryValueName deleteResult |
  1437     | readData testingRegistryPath registryValueName deleteResult |
  1071 
  1438 
  1072     readData := Unicode16String new.    
  1439     readData := Unicode16String new.    
  1073         testingRegistryPath := Win32OperatingSystem registryEntry key: (registryPath, '\', ' ルすしか').
  1440     testingRegistryPath := Win32OperatingSystem registryEntry key: (registryPath, '\', ' ルすしか').
  1074     registryValueName := 'dword_value'.
  1441     registryValueName := 'dword_value'.
  1075 
  1442 
  1076     readData := testingRegistryPath valueNamed: registryValueName.
  1443     readData := testingRegistryPath valueNamed: registryValueName.
  1077     self assert: readData notEmptyOrNil.
  1444     self assert: readData notEmptyOrNil.
  1078     
  1445     
  1087      self new testDeleteValueNamed_REG_DWORD
  1454      self new testDeleteValueNamed_REG_DWORD
  1088     "
  1455     "
  1089 
  1456 
  1090     "Created: / 06-12-2018 / 09:09:24 / svestkap"
  1457     "Created: / 06-12-2018 / 09:09:24 / svestkap"
  1091     "Modified: / 06-12-2018 / 13:59:57 / svestkap"
  1458     "Modified: / 06-12-2018 / 13:59:57 / svestkap"
       
  1459     "Modified (format): / 01-02-2019 / 15:00:56 / svestkap"
  1092 !
  1460 !
  1093 
  1461 
  1094 testDeleteValueNamed_REG_EXPAND_SZ
  1462 testDeleteValueNamed_REG_EXPAND_SZ
  1095     "Testing if REG_EXPAND_SZ value name is correctly deleted via deleteValueNamed:"
  1463     "Testing if REG_EXPAND_SZ value name is correctly deleted via deleteValueNamed:"  
  1096     
       
  1097     | readData testingRegistryPath registryValueName deleteResult |
  1464     | readData testingRegistryPath registryValueName deleteResult |
  1098 
  1465 
  1099     readData := Unicode16String new.    
  1466     readData := Unicode16String new.    
  1100         testingRegistryPath := Win32OperatingSystem registryEntry key: (registryPath, '\', ' ルすしか').
  1467     testingRegistryPath := Win32OperatingSystem registryEntry key: (registryPath, '\', ' ルすしか').
  1101     registryValueName := ' č ルすしか'.
  1468     registryValueName := ' č ルすしか'.
  1102 
  1469 
  1103     readData := testingRegistryPath valueNamed: registryValueName.
  1470     readData := testingRegistryPath valueNamed: registryValueName.
  1104     self assert: readData notEmptyOrNil.
  1471     self assert: readData notEmptyOrNil.
  1105     
  1472     
  1113      self run:#testDeleteValueNamed_REG_EXPAND_SZ
  1480      self run:#testDeleteValueNamed_REG_EXPAND_SZ
  1114      self new testDeleteValueNamed_REG_EXPAND_SZ
  1481      self new testDeleteValueNamed_REG_EXPAND_SZ
  1115     "
  1482     "
  1116 
  1483 
  1117     "Created: / 06-12-2018 / 13:54:53 / svestkap"
  1484     "Created: / 06-12-2018 / 13:54:53 / svestkap"
       
  1485     "Modified (format): / 01-02-2019 / 15:01:09 / svestkap"
  1118 !
  1486 !
  1119 
  1487 
  1120 testDeleteValueNamed_REG_QWORD
  1488 testDeleteValueNamed_REG_QWORD
  1121     "Testing if REG_QWORD value name is correctly deleted via deleteValueNamed:"
  1489     "Testing if REG_QWORD value name is correctly deleted via deleteValueNamed:"  
  1122     
       
  1123     | readData testingRegistryPath registryValueName deleteResult |
  1490     | readData testingRegistryPath registryValueName deleteResult |
  1124 
  1491     
  1125     readData := Unicode16String new.    
  1492     self skipIf: (OperatingSystem getSystemInfo at: #architecture) ~= #x64 description: 'Test only for x64 architecture'.  
  1126         testingRegistryPath := Win32OperatingSystem registryEntry key: (registryPath, '\', ' ルすしか').
  1493 
       
  1494     readData := Unicode16String new.    
       
  1495     testingRegistryPath := Win32OperatingSystem registryEntry key: (registryPath, '\', ' ルすしか').
  1127     registryValueName := 'qword_max'.
  1496     registryValueName := 'qword_max'.
  1128     
  1497     
  1129     readData := testingRegistryPath valueNamed: registryValueName.
  1498     readData := testingRegistryPath valueNamed: registryValueName.
  1130     self assert: readData notEmptyOrNil.
  1499     self assert: readData notEmptyOrNil.
  1131     
  1500     
  1139      self run:#testDeleteValueNamed_REG_QWORD
  1508      self run:#testDeleteValueNamed_REG_QWORD
  1140      self new testDeleteValueNamed_REG_QWORD
  1509      self new testDeleteValueNamed_REG_QWORD
  1141     "
  1510     "
  1142 
  1511 
  1143     "Created: / 06-12-2018 / 13:55:46 / svestkap"
  1512     "Created: / 06-12-2018 / 13:55:46 / svestkap"
  1144 !
  1513     "Modified: / 01-02-2019 / 15:23:41 / svestkap"
  1145 
  1514 !
  1146 testDeleteValueNamed_REG_SZ
  1515 
  1147     "Testing if REG_SZ value name is correctly deleted via deleteValueNamed:"
  1516 testDeleteValueNamed_REG_SZ_01
  1148     
  1517     "Testing if REG_SZ value name is correctly deleted via deleteValueNamed:"    
  1149     | readData testingRegistryPath registryValueName deleteResult |
  1518     | readData testingRegistryPath registryValueName deleteResult |
  1150 
  1519 
  1151     readData := Unicode16String new.    
  1520     readData := Unicode16String new.    
  1152     testingRegistryPath := Win32OperatingSystem registryEntry key: (registryPath, '\', ' ルすしか').
  1521     testingRegistryPath := Win32OperatingSystem registryEntry key: (registryPath, '\', ' ルすしか').
  1153     registryValueName := ' ř ž č ル.          '.
  1522     registryValueName := ' ř ž č ル.          '.
  1160     
  1529     
  1161     readData := testingRegistryPath valueNamed: registryValueName.
  1530     readData := testingRegistryPath valueNamed: registryValueName.
  1162     self assert: readData isEmptyOrNil    
  1531     self assert: readData isEmptyOrNil    
  1163 
  1532 
  1164     "
  1533     "
  1165      self run:#testDeleteValueNamed_REG_SZ
  1534      self run:#testDeleteValueNamed_REG_SZ_01
  1166      self new testDeleteValueNamed_REG_SZ
  1535      self new testDeleteValueNamed_REG_SZ_01
  1167     "
  1536     "
  1168 
  1537 
  1169     "Created: / 06-12-2018 / 13:52:51 / svestkap"
  1538     "Created: / 30-01-2019 / 15:23:27 / svestkap"
       
  1539     "Modified (format): / 01-02-2019 / 15:01:23 / svestkap"
       
  1540 !
       
  1541 
       
  1542 testDeleteValueNamed_REG_SZ_02
       
  1543     "Testing if REG_SZ value name is correctly deleted via deleteValueNamed:"    
       
  1544     | readData testingRegistryPath registryValueName |
       
  1545 
       
  1546     readData := Unicode16String new.    
       
  1547     testingRegistryPath := Win32OperatingSystem registryEntry key: (registryPath, '\', ' ルすしか').
       
  1548     registryValueName := ' ř ž č ル.          '.
       
  1549 
       
  1550     readData := testingRegistryPath valueNamed: registryValueName.
       
  1551     self assert: readData notEmptyOrNil.
       
  1552     
       
  1553     self should: [ testingRegistryPath deleteValueNamed: 88 ] 
       
  1554          raise: Error
       
  1555          suchThat: [ :e | e messageText = 'nameString is not a string!!' ]
       
  1556          
       
  1557     "
       
  1558      self run:#testDeleteValueNamed_REG_SZ_02
       
  1559      self new testDeleteValueNamed_REG_SZ_02
       
  1560     "
       
  1561 
       
  1562     "Created: / 30-01-2019 / 15:23:10 / svestkap"
       
  1563     "Modified (format): / 01-02-2019 / 15:01:30 / svestkap"
  1170 !
  1564 !
  1171 
  1565 
  1172 testDeleteValueNamed_defaultValue_01
  1566 testDeleteValueNamed_defaultValue_01
  1173     "Testing if (Default) value gets correctly deleted via deleteValueNamed:"
  1567     "Testing if (Default) value gets correctly deleted via deleteValueNamed:"    
  1174     
       
  1175     | readData registryValueName testingRegistryPath deleteResult|
  1568     | readData registryValueName testingRegistryPath deleteResult|
  1176 
  1569 
  1177     readData := Unicode16String new.    
  1570     readData := Unicode16String new.    
  1178     testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.        
  1571     testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.        
  1179     registryValueName := ''.
  1572     registryValueName := ''.
  1192      self run:#testDeleteValueNamed_defaultValue_01
  1585      self run:#testDeleteValueNamed_defaultValue_01
  1193      self new testDeleteValueNamed_defaultValue_01
  1586      self new testDeleteValueNamed_defaultValue_01
  1194     "
  1587     "
  1195 
  1588 
  1196     "Created: / 06-12-2018 / 14:04:16 / svestkap"
  1589     "Created: / 06-12-2018 / 14:04:16 / svestkap"
       
  1590     "Modified (format): / 01-02-2019 / 15:01:34 / svestkap"
  1197 !
  1591 !
  1198 
  1592 
  1199 testDeleteValueNamed_defaultValue_02
  1593 testDeleteValueNamed_defaultValue_02
  1200     "Testing if deleting (Default) empty gets false via deleteValueNamed:"
  1594     "Testing if deleting (Default) empty gets false via deleteValueNamed:"    
  1201     
       
  1202     | readData registryValueName testingRegistryPath deleteResult|
  1595     | readData registryValueName testingRegistryPath deleteResult|
  1203 
  1596 
  1204     readData := Unicode16String new.    
  1597     readData := Unicode16String new.    
  1205     testingRegistryPath := Win32OperatingSystem registryEntry key: (registryPath, '\', ' ルすしか').       
  1598     testingRegistryPath := Win32OperatingSystem registryEntry key: (registryPath, '\', ' ルすしか').       
  1206     registryValueName := ''.
  1599     registryValueName := ''.
  1215      self run:#testDeleteValueNamed_defaultValue_02
  1608      self run:#testDeleteValueNamed_defaultValue_02
  1216      self new testDeleteValueNamed_defaultValue_02
  1609      self new testDeleteValueNamed_defaultValue_02
  1217     "
  1610     "
  1218 
  1611 
  1219     "Created: / 06-12-2018 / 14:01:38 / svestkap"
  1612     "Created: / 06-12-2018 / 14:01:38 / svestkap"
  1220 !
  1613     "Modified (format): / 01-02-2019 / 15:01:39 / svestkap"
  1221 
  1614 !
  1222 testDeleteValueNamed_nonStringVAlue
  1615 
  1223     "Testing if trying to delete a non-string value results into returning false
  1616 testDeleteValueNamed_nonStringValue
  1224      and user should see in Transcript a warning message"
  1617     "Testing if trying to delete a key with non-string name raises an error"
  1225     
       
  1226     | testingRegistryPath registryValueName |
  1618     | testingRegistryPath registryValueName |
  1227 
  1619 
  1228     testingRegistryPath := Win32OperatingSystem registryEntry key: (registryPath, '\', ' ルすしか').
  1620     testingRegistryPath := Win32OperatingSystem registryEntry key: (registryPath, '\', ' ルすしか').
  1229     registryValueName := 11.
  1621     registryValueName := 11.
  1230     
  1622     
  1231     self should: [ testingRegistryPath deleteValueNamed: registryValueName ] raise: Error
  1623     self should: [ testingRegistryPath deleteValueNamed: registryValueName ] raise: Error
  1232     
  1624         suchThat: [ :e | e messageText = 'nameString is not a string!!' ]    
  1233 
  1625 
  1234     "
  1626     "
  1235      self run:#testDeleteValueNamed_nonStringVAlue
  1627      self run:#testDeleteValueNamed_nonStringValue
  1236      self new testDeleteValueNamed_nonStringVAlue
  1628      self new testDeleteValueNamed_nonStringValue
  1237     "
  1629     "
  1238 
  1630 
  1239     "Created: / 06-12-2018 / 14:10:18 / svestkap"
  1631     "Created: / 01-02-2019 / 15:02:57 / svestkap"
  1240     "Modified: / 07-12-2018 / 09:34:38 / svestkap"
       
  1241 ! !
  1632 ! !
  1242 
  1633 
  1243 !Win32OperatingSystemTest methodsFor:'tests-unicodeDeleteEnumeration'!
  1634 !Win32OperatingSystemTest methodsFor:'tests-unicodeDeleteEnumeration'!
  1244 
  1635 
  1245 testDeleteSubKeyNamed_deletingMultipleSubKeys
  1636 testDeleteSubKeyNamed_deletingMultipleSubKeys
  1246     "Testing deleting whole tree of subKeys based on subKey path size via deleteSubKeyNamed:"
  1637     "Testing deleting whole tree of subKeys based on subKey path size via deleteSubKeyNamed:"
  1247     
       
  1248     | readData returnValue testingRegistryPath |
  1638     | readData returnValue testingRegistryPath |
  1249 
  1639 
  1250     readData := OrderedDictionary new.    
  1640     readData := OrderedDictionary new.    
  1251     testingRegistryPath := Win32OperatingSystem registryEntry key:  (registryPath, '\', ' ルすしか_testing_delete').
  1641     testingRegistryPath := Win32OperatingSystem registryEntry key:  (registryPath, '\', ' ルすしか_testing_delete').
  1252 
  1642 
  1274     testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
  1664     testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
  1275     returnValue := testingRegistryPath deleteSubKeyNamed: ' ルすしか_testing_delete'.
  1665     returnValue := testingRegistryPath deleteSubKeyNamed: ' ルすしか_testing_delete'.
  1276     self assert: returnValue
  1666     self assert: returnValue
  1277  
  1667  
  1278     "
  1668     "
  1279      self run:#testDeleteSubKeyNamed
  1669      self run:#testDeleteSubKeyNamed_deletingMultipleSubKeys
  1280      self new testDeleteSubKeyNamed
  1670      self new testDeleteSubKeyNamed_deletingMultipleSubKeys
  1281     "
  1671     "
  1282 
  1672 
  1283     "Created: / 07-12-2018 / 10:54:34 / svestkap"
  1673     "Created: / 07-12-2018 / 10:54:34 / svestkap"
       
  1674     "Modified (comment): / 01-02-2019 / 14:59:37 / svestkap"
  1284 ! !
  1675 ! !
  1285 
  1676 
  1286 !Win32OperatingSystemTest methodsFor:'tests-unicodeRead'!
  1677 !Win32OperatingSystemTest methodsFor:'tests-unicodeRead'!
  1287 
  1678 
  1288 testReadSubKeyAtIndex_01
  1679 testReadSubKeyAtIndex_01
  1289     "Reading subKeys at certain index
  1680     "Reading subKeys at certain index
  1290     WARNING: subKeyAtIndex: is zero based!!!!!!"
  1681      WARNING: subKeyAtIndex: is zero based!!!!!!"
  1291 
       
  1292     | readData testingRegistryPath |
  1682     | readData testingRegistryPath |
  1293 
  1683 
  1294     readData := Unicode16String new.    
  1684     readData := Unicode16String new.    
  1295     testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
  1685     testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
  1296 
  1686 
  1303      self run:#testReadSubKeyAtIndex_01
  1693      self run:#testReadSubKeyAtIndex_01
  1304      self new testReadSubKeyAtIndex_01
  1694      self new testReadSubKeyAtIndex_01
  1305     "
  1695     "
  1306 
  1696 
  1307     "Created: / 11-12-2018 / 14:51:12 / svestkap"
  1697     "Created: / 11-12-2018 / 14:51:12 / svestkap"
       
  1698     "Modified (format): / 01-02-2019 / 13:24:43 / svestkap"
  1308 !
  1699 !
  1309 
  1700 
  1310 testReadSubKeyAtIndex_02
  1701 testReadSubKeyAtIndex_02
  1311     "Reading subKeys at certain index - reading non-existent subKey
  1702     "Reading subKeys at certain index - reading non-existent subKey
  1312     WARNING: subKeyAtIndex: is zero based!!!!!!"
  1703      WARNING: subKeyAtIndex: is zero based!!!!!!"
  1313 
       
  1314     | readData testingRegistryPath |
  1704     | readData testingRegistryPath |
  1315 
  1705 
  1316     readData := Unicode16String new.    
  1706     readData := Unicode16String new.    
  1317     testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
  1707     testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
  1318 
  1708 
  1324      self run:#testReadSubKeyAtIndex_02
  1714      self run:#testReadSubKeyAtIndex_02
  1325      self new testReadSubKeyAtIndex_02
  1715      self new testReadSubKeyAtIndex_02
  1326     "
  1716     "
  1327 
  1717 
  1328     "Created: / 11-12-2018 / 14:49:03 / svestkap"
  1718     "Created: / 11-12-2018 / 14:49:03 / svestkap"
  1329 !
  1719     "Modified (format): / 01-02-2019 / 13:24:48 / svestkap"
  1330 
  1720 !
  1331 testReadSubKeyNamesAndClassesAtIndex_01
  1721 
  1332     "reading SubKeyNamesAndClasses - reading non-existent subKey"
  1722 testReadSubKeyAtIndex_03
  1333 
  1723     "Reading subKeys via a String - should raise an error"
  1334     | readData testingRegistryPath |
  1724     | testingRegistryPath |
  1335 
  1725  
  1336     readData := Unicode16String new.    
  1726     testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
       
  1727     
       
  1728     self should: [ testingRegistryPath subKeyAtIndex: 'keyName' ] 
       
  1729          raise: Error 
       
  1730          suchThat: [ :e | e messageText = 'subKeyIndex is not an integer!!' ].               
       
  1731 
       
  1732     "
       
  1733      self run:#testReadSubKeyAtIndex_03
       
  1734      self new testReadSubKeyAtIndex_03
       
  1735     "
       
  1736 
       
  1737     "Created: / 01-02-2019 / 15:45:35 / svestkap"
       
  1738 !
       
  1739 
       
  1740 testReadSubKeyAtIndex_04
       
  1741     "Reading subKeys via a Float - should raise an error"
       
  1742     | testingRegistryPath |
       
  1743  
       
  1744     testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
       
  1745     
       
  1746     self should: [ testingRegistryPath subKeyAtIndex: 1.1 ] 
       
  1747          raise: Error 
       
  1748          suchThat: [ :e | e messageText = 'subKeyIndex is not an integer!!' ].               
       
  1749 
       
  1750     "
       
  1751      self run:#testReadSubKeyAtIndex_04
       
  1752      self new testReadSubKeyAtIndex_04
       
  1753     "
       
  1754 
       
  1755     "Created: / 01-02-2019 / 15:48:14 / svestkap"
       
  1756 !
       
  1757 
       
  1758 testReadSubKeyAtIndex_MaxPath
       
  1759     "Reading subKeyAtIndex with max Path
       
  1760      Note: This test acually breaks the limit that Microsoft specified in MSDN - registry key name should be maximum 255 characters including absolute path
       
  1761        MSDN link: https://docs.microsoft.com/en-us/windows/desktop/sysinfo/registry-element-size-limits"
       
  1762     | readData testingRegistryPath |
       
  1763 
       
  1764     "/readData := Unicode16String new.    
  1337     testingRegistryPath := Win32OperatingSystem registryEntry key: 
  1765     testingRegistryPath := Win32OperatingSystem registryEntry key: 
  1338         (registryPath,'\', ' ルすしか\256_chars_max_long|arsdfasdfjljljasdf;jl;jljsfasdfasdfljaslkdfjkasdfljalsd;jfa;lsdjflkasjdflkajsdflkjasdflkjsadlfjasldfjlsadjflksdjflksadjflkajsdflkjasdlfjalskdjflkasdjflkasdfkj;sdaf;kljkkjkklkjjjjkas|1asdfjsldfjlasdlfjlasdjfljasdlfjalsdjflajdfsdsasdfa|end').        
  1766         (registryPath,'\', ' ルすしか\256_chars_max_long|arsdfasdfjljljasdf;jl;jljsfasdfasdfljaslkdfjkasdfljalsd;jfa;lsdjflkasjdflkajsdflkjasdflkjsadlfjasldfjlsadjflksdjflksadjflkajsdflkjasdlfjalskdjflkasdjflkasdfkj;sdaf;kljkkjkklkjjjjkas|1asdfjsldfjlasdlfjlasdjfljasdlfjalsdjflajdfsdsasdfa|end').        
  1339     
  1767     
       
  1768     readData := testingRegistryPath subKeyAtIndex: 0.
       
  1769 
       
  1770     self assert: readData path notEmptyOrNil.
       
  1771     self assert:(readData path endsWith: '|end').    
       
  1772 
       
  1773     "/ this is maximum path size which can be reached if the SubKey is reached via index
       
  1774     self assert: readData path size = 563. "/ there is one backslash (for path) more compared to testReadSubKeyNamesAndClassesAtIndex_MaxPath_01
       
  1775     
       
  1776     "
       
  1777      self run:#testReadSubKeyAtIndex_MaxPath
       
  1778      self new testReadSubKeyAtIndex_MaxPath
       
  1779     "
       
  1780 
       
  1781     "Created: / 05-12-2018 / 12:39:54 / svestkap"
       
  1782     "Modified (comment): / 01-02-2019 / 15:49:05 / svestkap"
       
  1783 !
       
  1784 
       
  1785 testReadSubKeyNamesAndClassesAtIndex_01
       
  1786     "Reading SubKeyNamesAndClasses - reading non-existent subKey"
       
  1787     | readData testingRegistryPath |
       
  1788 
       
  1789     readData := Unicode16String new.    
       
  1790     testingRegistryPath := Win32OperatingSystem registryEntry key: 
       
  1791         (registryPath,'\', ' ルすしか\256_chars_max_long|arsdfasdfjljljasdf;jl;jljsfasdfasdfljaslkdfjkasdfljalsd;jfa;lsdjflkasjdflkajsdflkjasdflkjsadlfjasldfjlsadjflksdjflksadjflkajsdflkjasdlfjalskdjflkasdjflkasdfkj;sdaf;kljkkjkklkjjjjkas|1asdfjsldfjlasdlfjlasdjfljasdlfjalsdjflajdfsdsasdfa|end').        
       
  1792     
  1340     readData := testingRegistryPath subKeyNameAndClassAtIndex: 10.
  1793     readData := testingRegistryPath subKeyNameAndClassAtIndex: 10.
  1341 
  1794 
  1342     self assert: readData isNil.        
  1795     self assert: readData isNil.        
  1343     "
  1796     "
  1344      self run:#testReadSubKeyNamesAndClassesAtIndex_01
  1797      self run:#testReadSubKeyNamesAndClassesAtIndex_01
  1345      self new testReadSubKeyNamesAndClassesAtIndex_01
  1798      self new testReadSubKeyNamesAndClassesAtIndex_01
  1346     "
  1799     "
  1347 
  1800 
  1348     "Created: / 11-12-2018 / 14:49:48 / svestkap"
  1801     "Created: / 11-12-2018 / 14:49:48 / svestkap"
       
  1802     "Modified (comment): / 01-02-2019 / 15:48:57 / svestkap"
       
  1803 !
       
  1804 
       
  1805 testReadSubKeyNamesAndClassesAtIndex_02
       
  1806     "Reading SubKeyNamesAndClasses via String - should raise an error"
       
  1807     | testingRegistryPath |
       
  1808 
       
  1809     testingRegistryPath := Win32OperatingSystem registryEntry key: 
       
  1810         (registryPath,'\', ' ルすしか\256_chars_max_long|arsdfasdfjljljasdf;jl;jljsfasdfasdfljaslkdfjkasdfljalsd;jfa;lsdjflkasjdflkajsdflkjasdflkjsadlfjasldfjlsadjflksdjflksadjflkajsdflkjasdlfjalskdjflkasdjflkasdfkj;sdaf;kljkkjkklkjjjjkas|1asdfjsldfjlasdlfjlasdjfljasdlfjalsdjflajdfsdsasdfa|end').        
       
  1811 
       
  1812     self should: [ testingRegistryPath subKeyNameAndClassAtIndex: 'asString' ] 
       
  1813          raise: Error 
       
  1814          suchThat: [ :e | e messageText = 'subKeyIndex is not an integer!!' ]
       
  1815          
       
  1816     "
       
  1817      self run:#testReadSubKeyNamesAndClassesAtIndex_02
       
  1818      self new testReadSubKeyNamesAndClassesAtIndex_02
       
  1819     "
       
  1820 
       
  1821     "Created: / 01-02-2019 / 15:48:02 / svestkap"
       
  1822 !
       
  1823 
       
  1824 testReadSubKeyNamesAndClassesAtIndex_03
       
  1825     "Reading SubKeyNamesAndClasses via Float - should raise an error"
       
  1826     | testingRegistryPath |
       
  1827 
       
  1828     testingRegistryPath := Win32OperatingSystem registryEntry key: 
       
  1829         (registryPath,'\', ' ルすしか\256_chars_max_long|arsdfasdfjljljasdf;jl;jljsfasdfasdfljaslkdfjkasdfljalsd;jfa;lsdjflkasjdflkajsdflkjasdflkjsadlfjasldfjlsadjflksdjflksadjflkajsdflkjasdlfjalskdjflkasdjflkasdfkj;sdaf;kljkkjkklkjjjjkas|1asdfjsldfjlasdlfjlasdjfljasdlfjalsdjflajdfsdsasdfa|end').        
       
  1830 
       
  1831     self should: [ testingRegistryPath subKeyNameAndClassAtIndex: 1.1 ] 
       
  1832          raise: Error 
       
  1833          suchThat: [ :e | e messageText = 'subKeyIndex is not an integer!!' ]
       
  1834          
       
  1835     "
       
  1836      self run:#testReadSubKeyNamesAndClassesAtIndex_03
       
  1837      self new testReadSubKeyNamesAndClassesAtIndex_03
       
  1838     "
       
  1839 
       
  1840     "Created: / 01-02-2019 / 15:51:03 / svestkap"
       
  1841 !
       
  1842 
       
  1843 testReadSubKeyNamesAndClassesAtIndex_MaxPath
       
  1844     "Reading SubKeyNamesAndClasses with max Path
       
  1845      Note: This test acually breaks the limit that Microsoft specified in MSDN - registry key name should be maximum 255 characters including absolute path
       
  1846        MSDN link: https://docs.microsoft.com/en-us/windows/desktop/sysinfo/registry-element-size-limits"
       
  1847     | readData testingRegistryPath |
       
  1848 
       
  1849     readData := Unicode16String new.    
       
  1850     testingRegistryPath := Win32OperatingSystem registryEntry key: 
       
  1851         (registryPath,'\', ' ルすしか\256_chars_max_long|arsdfasdfjljljasdf;jl;jljsfasdfasdfljaslkdfjkasdfljalsd;jfa;lsdjflkasjdflkajsdflkjasdflkjsadlfjasldfjlsadjflksdjflksadjflkajsdflkjasdlfjalskdjflkasdjflkasdfkj;sdaf;kljkkjkklkjjjjkas|1asdfjsldfjlasdlfjlasdjfljasdlfjalsdjflajdfsdsasdfa|end').        
       
  1852     
       
  1853     readData := testingRegistryPath subKeyNameAndClassAtIndex: 0.
       
  1854 
       
  1855     self assert: readData notEmptyOrNil.
       
  1856     self assert:(readData first endsWith: '|end').
       
  1857     self assert: readData first = '256_chars_max_long|arsdfasdfjljljasdf;jl;jljsfasdfasdfljaslkdfjkasdfljalsd;jfa;lsdjflkasjdflkajsdflkjasdflkjsadlfjasldfjlsadjflksdjflksadjflkajsdflkjasdlfjalskdjflkasdjflkasdfkj;sdaf;kljkkjkklkjjjjkas|1asdfjsldfjlasdlfjlasdjfljasdlfjalsdjflajdfsdsasdfa|end'.        
       
  1858 
       
  1859     "/ this is maximum path size which can be reached if the SubKey is reached via index
       
  1860     self assert: (testingRegistryPath path size + readData first size) = 562.
       
  1861     
       
  1862     "
       
  1863      self run:#testReadSubKeyNamesAndClassesAtIndex_MaxPath
       
  1864      self new testReadSubKeyNamesAndClassesAtIndex_MaxPath
       
  1865     "
       
  1866 
       
  1867     "Created: / 05-12-2018 / 12:40:08 / svestkap"
       
  1868     "Modified (comment): / 01-02-2019 / 15:49:18 / svestkap"
       
  1869 !
       
  1870 
       
  1871 testReadTooLongPath
       
  1872     "Trying to read too long path - nil is returned"
       
  1873     | testingRegistryPath |
       
  1874     
       
  1875     testingRegistryPath := Win32OperatingSystem registryEntry key: 
       
  1876             (registryPath,'\', ' ルすしか\256_chars_max_long|arsdfasdfjljljasdf;jl;jljsfasdfasdfljaslkdfjkasdfljalsd;jfa;lsdjflkasjdflkajsdflkjasdflkjsadlfjasldfjlsadjflksdjflksadjflkajsdflkjasdlfjalskdjflkasdjflkasdfkj;sdaf;kljkkjkklkjjjjkas|1asdfjsldfjlasdlfjlasdjfljasdlfjalsdjflajdfsdsasdfa
       
  1877             |end','\','256_chars_max_long|arsdfasdfjljljasdf;jl;jljsfasdfasdfljaslkdfjkasdfljalsd;jfa;lsdjflkasjdflkajsdflkjasdflkjsadlfjasldfjlsadjflksdjflksadjflkajsdflkjasdlfjalskdjflkasdjflkasdfkj;sdaf;kljkkjkklkjjjjkas|1asdfjsldfjlasdlfjlasdjfljasdlfjalsdjflajdfsdsasdfa|end').        
       
  1878 
       
  1879     self assert: testingRegistryPath isNil            
       
  1880     
       
  1881     "
       
  1882      self run:#testReadTooLongPath
       
  1883      self new testReadTooLongPath
       
  1884     "
       
  1885 
       
  1886     "Created: / 22-11-2018 / 11:19:51 / svestkap"
       
  1887     "Modified (comment): / 01-02-2019 / 14:58:15 / svestkap"
  1349 !
  1888 !
  1350 
  1889 
  1351 testReadValueNameAtIndex_01
  1890 testReadValueNameAtIndex_01
  1352     "Reading values (#valueNameAtIndex:) at certain index
  1891     "Reading values (#valueNameAtIndex:) at certain index
  1353     WARNING: #valueNameAtIndex: is zero based!!!!!!
  1892      WARNING: #valueNameAtIndex: is zero based!!!!!!
  1354     Note: This test acually breaks the limit that Microsoft specified in MSDN - registry key name should be maximum 255 characters including absolute path
  1893      Note: This test acually breaks the limit that Microsoft specified in MSDN - registry key name should be maximum 255 characters including absolute path
  1355     MSDN link: https://docs.microsoft.com/en-us/windows/desktop/sysinfo/registry-element-size-limits" 
  1894        MSDN link: https://docs.microsoft.com/en-us/windows/desktop/sysinfo/registry-element-size-limits" 
  1356 
       
  1357     | readData testingRegistryPath |
  1895     | readData testingRegistryPath |
  1358 
  1896 
  1359     readData := Unicode16String new.    
  1897     readData := Unicode16String new.    
  1360     testingRegistryPath := Win32OperatingSystem registryEntry key: (registryPath,'\', ' ルすしか').
  1898     testingRegistryPath := Win32OperatingSystem registryEntry key: (registryPath,'\', ' ルすしか').
  1361 
  1899 
  1368      self run:#testReadValueNameAtIndex
  1906      self run:#testReadValueNameAtIndex
  1369      self new testReadValueNameAtIndex
  1907      self new testReadValueNameAtIndex
  1370     "
  1908     "
  1371 
  1909 
  1372     "Created: / 11-12-2018 / 14:54:37 / svestkap"
  1910     "Created: / 11-12-2018 / 14:54:37 / svestkap"
       
  1911     "Modified (comment): / 01-02-2019 / 14:58:25 / svestkap"
  1373 !
  1912 !
  1374 
  1913 
  1375 testReadValueNameAtIndex_02
  1914 testReadValueNameAtIndex_02
  1376     "Reading values (#valueNameAtIndex:) at certain index - non-existent value" 
  1915     "Reading values (#valueNameAtIndex:) at certain index - non-existent value" 
  1377 
       
  1378     | readData testingRegistryPath |
  1916     | readData testingRegistryPath |
  1379 
  1917 
  1380     readData := Unicode16String new.    
  1918     readData := Unicode16String new.    
  1381     testingRegistryPath := Win32OperatingSystem registryEntry key: (registryPath,'\', ' ルすしか').
  1919     testingRegistryPath := Win32OperatingSystem registryEntry key: (registryPath,'\', ' ルすしか').
  1382 
  1920 
  1388      self run:#testReadValueNameAtIndex_02
  1926      self run:#testReadValueNameAtIndex_02
  1389      self new testReadValueNameAtIndex_02
  1927      self new testReadValueNameAtIndex_02
  1390     "
  1928     "
  1391 
  1929 
  1392     "Created: / 11-12-2018 / 14:54:29 / svestkap"
  1930     "Created: / 11-12-2018 / 14:54:29 / svestkap"
       
  1931     "Modified (format): / 01-02-2019 / 13:25:19 / svestkap"
       
  1932 !
       
  1933 
       
  1934 testReadValueNameAtIndex_03    
       
  1935     "Reading values (#valueNameAtIndex:) via String - should raise an error"
       
  1936     | testingRegistryPath |
       
  1937     
       
  1938     testingRegistryPath := Win32OperatingSystem registryEntry key: (registryPath,'\', ' ルすしか').
       
  1939 
       
  1940     self should: [ testingRegistryPath valueNameAtIndex: 'stringInsteadOfIndex' ] 
       
  1941          raise: Error 
       
  1942          suchThat: [ :e | e messageText = 'valueIndex is not an integer!!' ]
       
  1943                                                                                      
       
  1944     "
       
  1945      self run:#testReadValueNameAtIndex_03
       
  1946      self new testReadValueNameAtIndex_03
       
  1947     "
       
  1948 
       
  1949     "Created: / 01-02-2019 / 15:52:27 / svestkap"
       
  1950 !
       
  1951 
       
  1952 testReadValueNameAtIndex_04    
       
  1953     "Reading values (#valueNameAtIndex:) via Float - should raise an error"
       
  1954     | testingRegistryPath |
       
  1955     
       
  1956     testingRegistryPath := Win32OperatingSystem registryEntry key: (registryPath,'\', ' ルすしか').
       
  1957 
       
  1958     self should: [ testingRegistryPath valueNameAtIndex: 1.1 ] 
       
  1959          raise: Error 
       
  1960          suchThat: [ :e | e messageText = 'valueIndex is not an integer!!' ]
       
  1961                                                                                      
       
  1962     "
       
  1963      self run:#testReadValueNameAtIndex_04
       
  1964      self new testReadValueNameAtIndex_04
       
  1965     "
       
  1966 
       
  1967     "Created: / 01-02-2019 / 15:55:03 / svestkap"
       
  1968 !
       
  1969 
       
  1970 testReadValueNamed_REG_BINARY_01
       
  1971     "Testing if REG_BINARY values are read correctly via valueNamed:"
       
  1972     | readData testingRegistryPath |
       
  1973         
       
  1974     testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
       
  1975      
       
  1976     readData := testingRegistryPath valueNamed: 'zero'.
       
  1977         
       
  1978     self assert: readData = ByteArray new.
       
  1979 
       
  1980     "
       
  1981      self run:#testReadValueNamed_REG_BINARY_01
       
  1982      self new testReadValueNamed_REG_BINARY_01
       
  1983     "
       
  1984 
       
  1985     "Created: / 16-11-2018 / 12:37:50 / svestkap"
       
  1986     "Modified (format): / 01-02-2019 / 13:28:15 / svestkap"
       
  1987 !
       
  1988 
       
  1989 testReadValueNamed_REG_BINARY_02
       
  1990     "Testing if REG_BINARY values are read correctly via valueNamed:"
       
  1991     | testingRegistryPath readData readDataHex |
       
  1992         
       
  1993     testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
       
  1994      
       
  1995     readData := testingRegistryPath valueNamed: 'non-zero'.        
       
  1996     readDataHex := readData hexPrintStringWithSeparator: $|.
       
  1997     
       
  1998     self assert: readData = #[17 16]. "/ ByteArray
       
  1999     self assert: readDataHex = '11|10' "/ hex    
       
  2000     
       
  2001     "
       
  2002      self run:#testReadValueNamed_REG_BINARY_02
       
  2003      self new testReadValueNamed_REG_BINARY_02
       
  2004     "
       
  2005 
       
  2006     "Created: / 16-11-2018 / 12:39:33 / svestkap"
       
  2007     "Modified (format): / 01-02-2019 / 13:28:21 / svestkap"
       
  2008 !
       
  2009 
       
  2010 testReadValueNamed_REG_DWORD_01
       
  2011     "Testing if REG_DWORD values are read correctly via valueNamed:"
       
  2012     | readData testingRegistryPath |
       
  2013     
       
  2014     readData := Unicode16String new.    
       
  2015     testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
       
  2016      
       
  2017     readData := testingRegistryPath valueNamed: 'dword_value'.
       
  2018         
       
  2019     self assert: readData = 9135.
       
  2020 
       
  2021     "
       
  2022      self run:#testReadValueNamed_REG_DWORD_01
       
  2023      self new testReadValueNamed_REG_DWORD_01
       
  2024     "
       
  2025 
       
  2026     "Created: / 16-11-2018 / 12:24:26 / svestkap"
       
  2027     "Modified (format): / 01-02-2019 / 13:28:26 / svestkap"
       
  2028 !
       
  2029 
       
  2030 testReadValueNamed_REG_DWORD_02
       
  2031     "Testing if REG_DWORD values are read correctly via valueNamed:"
       
  2032     | readData testingRegistryPath |
       
  2033     
       
  2034     readData := Unicode16String new.    
       
  2035     testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
       
  2036      
       
  2037     readData := testingRegistryPath valueNamed: 'き'.
       
  2038         
       
  2039     self assert: readData = 591541423.
       
  2040 
       
  2041     "
       
  2042      self run:#testReadValueNamed_REG_DWORD_02
       
  2043      self new testReadValueNamed_REG_DWORD_02
       
  2044     "
       
  2045 
       
  2046     "Created: / 16-11-2018 / 12:24:43 / svestkap"
       
  2047     "Modified (format): / 01-02-2019 / 13:28:30 / svestkap"
       
  2048 !
       
  2049 
       
  2050 testReadValueNamed_REG_EXPAND_SZ_01
       
  2051     "Testing if REG_EXPAND_SZ values are read correctly via valueNamed:"
       
  2052     | readData testingRegistryPath |
       
  2053     
       
  2054     readData := Unicode16String new.    
       
  2055     testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
       
  2056      
       
  2057     readData := testingRegistryPath valueNamed: ' č ルすしか'.
       
  2058         
       
  2059     self assert: readData = '''Testing Unicode chars ř ž č ルすしかき'').          '. 
       
  2060 
       
  2061     "
       
  2062      self run:#testReadValueNamed_REG_EXPAND_SZ_01
       
  2063      self new testReadValueNamed_REG_EXPAND_SZ_01
       
  2064     "
       
  2065 
       
  2066     "Created: / 16-11-2018 / 12:27:58 / svestkap"
       
  2067     "Modified (format): / 01-02-2019 / 13:28:38 / svestkap"
       
  2068 !
       
  2069 
       
  2070 testReadValueNamed_REG_EXPAND_SZ_02
       
  2071     "Testing if REG_EXPAND_SZ values are read correctly via valueNamed:"
       
  2072     | readData testingRegistryPath |
       
  2073     
       
  2074     readData := Unicode16String new.    
       
  2075     testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
       
  2076      
       
  2077     readData := testingRegistryPath valueNamed: 'Ugh'.
       
  2078         
       
  2079     self assert: readData = '''Testing Unicode chars ř ž č ルすしかき'').          '. 
       
  2080 
       
  2081     "
       
  2082      self run:#testReadValueNamed_REG_EXPAND_SZ_02
       
  2083      self new testReadValueNamed_REG_EXPAND_SZ_02
       
  2084     "
       
  2085 
       
  2086     "Created: / 16-11-2018 / 12:29:52 / svestkap"
       
  2087     "Modified (format): / 01-02-2019 / 13:28:42 / svestkap"
       
  2088 !
       
  2089 
       
  2090 testReadValueNamed_REG_MULTI_SZ_01
       
  2091     "Testing if REG_MULTI_SZ values are read correctly via valueNamed:"
       
  2092     | readData testingRegistryPath |
       
  2093         
       
  2094     testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
       
  2095      
       
  2096     readData := testingRegistryPath valueNamed: 'Font_Leelawadee UI Bold'.
       
  2097         
       
  2098     self assert: readData = #('SEGOEUIB.TTF,Segoe UI Bold,110,82' 'SEGOEUIB.TTF,Segoe UI Bold' 'MEIRYOB.TTC,Meiryo UI Bold,120,96' 
       
  2099                               'MEIRYOB.TTC,Meiryo UI Bold' 'MSJHBD.TTC,Microsoft JhengHei UI Bold,120,96' 'MSJHBD.TTC,Microsoft JhengHei UI Bold'
       
  2100                               'MSYHBD.TTC,Microsoft YaHei UI Bold,128,96' 'MSYHBD.TTC,Microsoft YaHei UI Bold' 'MALGUNBD.TTF,Malgun Gothic Bold,118,96'
       
  2101                               'MALGUNBD.TTF,Malgun Gothic Bold' 'YUGOTHB.TTC,Yu Gothic UI Bold,128,96' 'YUGOTHB.TTC,Yu Gothic UI Bold' 'SEGUISYM.TTF,Segoe UI Symbol') 
       
  2102 
       
  2103     "
       
  2104      self run:#testReadValueNamed_REG_MULTI_SZ_01
       
  2105      self new testReadValueNamed_REG_MULTI_SZ_01
       
  2106     "
       
  2107 
       
  2108     "Created: / 16-11-2018 / 12:30:24 / svestkap"
       
  2109     "Modified (format): / 01-02-2019 / 13:28:46 / svestkap"
       
  2110 !
       
  2111 
       
  2112 testReadValueNamed_REG_MULTI_SZ_02
       
  2113     "Testing if REG_MULTI_SZ values are read correctly via valueNamed:"
       
  2114     | readData testingRegistryPath |
       
  2115         
       
  2116     testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
       
  2117      
       
  2118     readData := testingRegistryPath valueNamed: 'ř ž č ルすしか'.
       
  2119         
       
  2120     self assert: readData = #('''Testing Unicode chars ř ž č ルすしかき'')'
       
  2121                               'SEGOEUIB.TTF,Segoe UI Bold,110,82' 'SEGOEUIB.TTF,Segoe UI Bold' 'MEIRYOB.TTC,Meiryo UI Bold,120,96' 
       
  2122                               'MEIRYOB.TTC,Meiryo UI Bold' 'MSJHBD.TTC,Microsoft JhengHei UI Bold,120,96' 'MSJHBD.TTC,Microsoft JhengHei UI Bold'
       
  2123                               'MSYHBD.TTC,Microsoft YaHei UI Bold,128,96' 'MSYHBD.TTC,Microsoft YaHei UI Bold' 'MALGUNBD.TTF,Malgun Gothic Bold,118,96'
       
  2124                               'MALGUNBD.TTF,Malgun Gothic Bold' 'YUGOTHB.TTC,Yu Gothic UI Bold,128,96' 'YUGOTHB.TTC,Yu Gothic UI Bold' 'SEGUISYM.TTF,Segoe UI Symbol') 
       
  2125 
       
  2126     "
       
  2127      self run:#testReadValueNamed_REG_MULTI_SZ_02
       
  2128      self new testReadValueNamed_REG_MULTI_SZ_02
       
  2129     "
       
  2130 
       
  2131     "Created: / 16-11-2018 / 12:35:57 / svestkap"
       
  2132     "Modified (format): / 01-02-2019 / 13:28:52 / svestkap"
       
  2133 !
       
  2134 
       
  2135 testReadValueNamed_REG_MULTI_SZ_03
       
  2136     "Testing if empty REG_MULTI_SZ value is read correctly via valueNamed:"
       
  2137     | readData testingRegistryPath |
       
  2138         
       
  2139     testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
       
  2140      
       
  2141     readData := testingRegistryPath valueNamed: 'testEmptyMultiSZ'.
       
  2142     
       
  2143     self assert: readData isEmpty
       
  2144 
       
  2145     "
       
  2146      self run:#testReadValueNamed_REG_MULTI_SZ_03
       
  2147      self new testReadValueNamed_REG_MULTI_SZ_03
       
  2148     "
       
  2149 
       
  2150     "Created: / 03-12-2018 / 10:59:48 / svestkap"
       
  2151     "Modified (format): / 01-02-2019 / 13:28:58 / svestkap"
       
  2152 !
       
  2153 
       
  2154 testReadValueNamed_REG_QWORD_01
       
  2155     "Testing if REG_QWORD values are read correctly via valueNamed:.
       
  2156      The read value is a QWORD maximum value"
       
  2157     | readData testingRegistryPath |
       
  2158     
       
  2159     self skipIf: (OperatingSystem getSystemInfo at: #architecture) ~= #x64 description: 'Test only for x64 architecture'.  
       
  2160     
       
  2161     readData := Unicode16String new.    
       
  2162     testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
       
  2163      
       
  2164     readData := testingRegistryPath valueNamed: 'qword_max'.
       
  2165         
       
  2166     self assert: readData = 18446744073709551615.
       
  2167 
       
  2168     "
       
  2169      self run:#testReadValueNamed_REG_QWORD_01
       
  2170      self new testReadValueNamed_REG_QWORD_01
       
  2171     "
       
  2172 
       
  2173     "Created: / 16-11-2018 / 12:25:47 / svestkap"
       
  2174     "Modified: / 01-02-2019 / 15:14:01 / svestkap"
       
  2175 !
       
  2176 
       
  2177 testReadValueNamed_REG_QWORD_02
       
  2178     "Testing if REG_QWORD values are read correctly via valueNamed:"
       
  2179     | readData testingRegistryPath |
       
  2180     
       
  2181     self skipIf: (OperatingSystem getSystemInfo at: #architecture) ~= #x64 description: 'Test only for x64 architecture'.  
       
  2182     
       
  2183     readData := Unicode16String new.    
       
  2184     testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
       
  2185      
       
  2186     readData := testingRegistryPath valueNamed: 'qwordvalue'.
       
  2187         
       
  2188     self assert: readData = 8751636011737964973.
       
  2189 
       
  2190     "
       
  2191      self run:#testReadValueNamed_REG_QWORD_02
       
  2192      self new testReadValueNamed_REG_QWORD_02
       
  2193     "
       
  2194 
       
  2195     "Created: / 16-11-2018 / 12:26:23 / svestkap"
       
  2196     "Modified: / 01-02-2019 / 15:14:06 / svestkap"
       
  2197 !
       
  2198 
       
  2199 testReadValueNamed_REG_QWORD_03
       
  2200     "Testing if REG_QWORD values are read correctly via valueNamed:"
       
  2201     | readData testingRegistryPath |
       
  2202     
       
  2203     self skipIf: (OperatingSystem getSystemInfo at: #architecture) ~= #x64 description: 'Test only for x64 architecture'.  
       
  2204     
       
  2205     readData := Unicode16String new.    
       
  2206     testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
       
  2207      
       
  2208     readData := testingRegistryPath valueNamed: 'すし'.
       
  2209         
       
  2210     self assert: readData asSmallInteger = 44527.
       
  2211 
       
  2212     "
       
  2213      self run:#testReadValueNamed_REG_QWORD_03
       
  2214      self new testReadValueNamed_REG_QWORD_03
       
  2215     "
       
  2216 
       
  2217     "Created: / 16-11-2018 / 12:27:17 / svestkap"
       
  2218     "Modified: / 01-02-2019 / 15:14:11 / svestkap"
       
  2219 !
       
  2220 
       
  2221 testReadValueNamed_REG_SZ_01
       
  2222     "Testing if REG_SZ values are read correctly via valueNamed:"
       
  2223     | readData testingRegistryPath |
       
  2224     
       
  2225     readData := Unicode16String new.    
       
  2226     testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
       
  2227      
       
  2228     readData := testingRegistryPath valueNamed: 'bledesu'.
       
  2229     
       
  2230     self assert: readData = '''Testing Unicode chars ř ž č ルすしかき'').          '.
       
  2231     
       
  2232     "
       
  2233      self run:#testReadValueNamed_REG_SZ_01
       
  2234      self new testReadValueNamed_REG_SZ_01
       
  2235     "
       
  2236 
       
  2237     "Created: / 16-11-2018 / 12:14:59 / svestkap"
       
  2238     "Modified (format): / 01-02-2019 / 13:29:53 / svestkap"
       
  2239 !
       
  2240 
       
  2241 testReadValueNamed_REG_SZ_02
       
  2242     "Testing if REG_SZ values are read correctly via valueNamed:"
       
  2243     | readData testingRegistryPath |
       
  2244     
       
  2245     readData := Unicode16String new.    
       
  2246     testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
       
  2247      
       
  2248     readData := testingRegistryPath valueNamed: ' ř ž č ル.          '.
       
  2249         
       
  2250     self assert: readData = 'Testing Unicode chars ř ž č ルすしかき'.    
       
  2251 
       
  2252     "
       
  2253      self run:#testReadValueNamed_REG_SZ_02
       
  2254      self new testReadValueNamed_REG_SZ_02
       
  2255     "
       
  2256 
       
  2257     "Created: / 16-11-2018 / 12:15:17 / svestkap"
       
  2258     "Modified (format): / 01-02-2019 / 13:29:56 / svestkap"
       
  2259 !
       
  2260 
       
  2261 testReadValueNamed_REG_SZ_03
       
  2262     "Testing if REG_SZ values are read correctly via valueNamed:"
       
  2263     | readData testingRegistryPath |
       
  2264     
       
  2265     readData := Unicode16String new.    
       
  2266     testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
       
  2267      
       
  2268     readData := testingRegistryPath valueNamed: 'しかき    '.
       
  2269         
       
  2270     self assert: readData = 'Testus gradus'.
       
  2271 
       
  2272     "
       
  2273      self run:#testReadValueNamed_REG_SZ_03
       
  2274      self new testReadValueNamed_REG_SZ_03
       
  2275     "
       
  2276 
       
  2277     "Created: / 16-11-2018 / 12:21:59 / svestkap"
       
  2278     "Modified (format): / 01-02-2019 / 13:30:00 / svestkap"
       
  2279 !
       
  2280 
       
  2281 testReadValueNamed_REG_SZ_04
       
  2282     "Testing if empty REG_SZ value is read correctly via valueNamed:"
       
  2283     | readData testingRegistryPath |
       
  2284     
       
  2285     readData := Unicode16String new.    
       
  2286     testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
       
  2287      
       
  2288     readData := testingRegistryPath valueNamed: 'emptyToTest'.
       
  2289     
       
  2290     self assert: readData isEmpty.
       
  2291     
       
  2292     "
       
  2293      self run:#testReadValueNamed_REG_SZ_04
       
  2294      self new testReadValueNamed_REG_SZ_04
       
  2295     "
       
  2296 
       
  2297     "Created: / 03-12-2018 / 10:56:11 / svestkap"
       
  2298     "Modified (format): / 01-02-2019 / 13:30:45 / svestkap"
       
  2299 !
       
  2300 
       
  2301 testReadValueNamed_nonStringValue
       
  2302     "Testing reading non-string value from Registry via valueNamed raises an error"    
       
  2303     | testingRegistryPath |
       
  2304         
       
  2305     testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
       
  2306     self should: [ testingRegistryPath valueNamed: 11 ] 
       
  2307          raise: Error 
       
  2308          suchThat: [ :e | e messageText = 'nameString is not a string!!' ].        
       
  2309 
       
  2310     "
       
  2311      self run:#testReadValueNamed_nonStringValue
       
  2312      self new testReadValueNamed_nonStringValue
       
  2313     "
       
  2314 
       
  2315     "Created: / 05-12-2018 / 12:40:31 / svestkap"
       
  2316     "Modified (format): / 30-01-2019 / 15:30:21 / svestkap"
       
  2317 !
       
  2318 
       
  2319 testValueTypeAndSize_01
       
  2320     "Testing if an error is returned when number is used instead of string as method parammeter at valueTypeAndSize:"
       
  2321     | testingRegistryPath |
       
  2322     
       
  2323     testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
       
  2324     self should: [ testingRegistryPath valueTypeAndSize: 55 ] 
       
  2325          raise: Error 
       
  2326          suchThat: [ :e | e messageText = 'nameString is not a string!!' ].                                                                          
       
  2327     
       
  2328     "
       
  2329      self run:#testValueTypeAndSize_01
       
  2330      self new testValueTypeAndSize_01
       
  2331     "
       
  2332 
       
  2333     "Created: / 30-01-2019 / 17:15:49 / svestkap"
       
  2334 !
       
  2335 
       
  2336 testValueTypeAndSize_REG_BINARY_01
       
  2337     "Testing if #REG_BINARY type returns correct size in bytes"
       
  2338     | testingRegistryPath readData testingData |
       
  2339 
       
  2340     testingData := Dictionary new.            
       
  2341     testingData at: #'REG_BINARY' put: 2. "/ [bytes] - testing registry contains #[17 16]    
       
  2342     
       
  2343     testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
       
  2344     readData := testingRegistryPath valueTypeAndSize: 'non-zero'.
       
  2345     
       
  2346     self assert: readData keys first = #REG_BINARY.  
       
  2347     self assert: (readData at: #'REG_BINARY') = (testingData at: #'REG_BINARY')    
       
  2348     
       
  2349     "
       
  2350      self run:#testValueTypeAndSize_REG_BINARY_01
       
  2351      self new testValueTypeAndSize_REG_BINARY_01
       
  2352     "
       
  2353 
       
  2354     "Created: / 31-01-2019 / 15:47:05 / svestkap"
       
  2355 !
       
  2356 
       
  2357 testValueTypeAndSize_REG_DWORD_01
       
  2358     "Testing if #REG_DWORD type returns correct size in bytes"
       
  2359     | testingData testingRegistryType testingRegistryPath readData |
       
  2360 
       
  2361     testingData := Dictionary new.
       
  2362     testingRegistryType := UninterpretedBytes isBigEndian ifTrue: [ #REG_DWORD_BIG_ENDIAN ]
       
  2363                                                          ifFalse: [ #REG_DWORD_LITTLE_ENDIAN ].
       
  2364     testingData at: testingRegistryType put: 4. "/ 32bits = 4 bytes - testing registry contains 0xffffffff 
       
  2365     
       
  2366     testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
       
  2367     readData := testingRegistryPath valueTypeAndSize: 'dword_value'.
       
  2368     
       
  2369     self assert: readData keys first = testingRegistryType.  
       
  2370     self assert: (readData at: testingRegistryType) = (testingData at: testingRegistryType)    
       
  2371     
       
  2372     "
       
  2373      self run:#testValueTypeAndSize_REG_DWORD_01
       
  2374      self new testValueTypeAndSize_REG_DWORD_01
       
  2375     "
       
  2376 
       
  2377     "Created: / 31-01-2019 / 16:03:52 / svestkap"
       
  2378     "Modified (comment): / 01-02-2019 / 15:13:01 / svestkap"
       
  2379 !
       
  2380 
       
  2381 testValueTypeAndSize_REG_EXPAND_SZ_01
       
  2382     "Testing if #REG_EXPAND_SZ type returns expected string size"
       
  2383     | testingData testingRegistryType testingRegistryPath readData |
       
  2384 
       
  2385     testingData := Dictionary new.
       
  2386     testingRegistryType := #REG_EXPAND_SZ.
       
  2387     testingData at: testingRegistryType put: 47. "/ expected string size
       
  2388     
       
  2389     testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
       
  2390     readData := testingRegistryPath valueTypeAndSize: ' č ルすしか'.
       
  2391     
       
  2392     self assert: readData keys first = testingRegistryType.  
       
  2393     self assert: (readData at: testingRegistryType) = (testingData at: testingRegistryType)    
       
  2394     
       
  2395     "
       
  2396      self run:#testValueTypeAndSize_REG_EXPAND_SZ_01
       
  2397      self new testValueTypeAndSize_REG_EXPAND_SZ_01
       
  2398     "
       
  2399 
       
  2400     "Created: / 31-01-2019 / 15:55:35 / svestkap"
       
  2401     "Modified (comment): / 01-02-2019 / 15:09:26 / svestkap"
       
  2402 !
       
  2403 
       
  2404 testValueTypeAndSize_REG_MULTI_SZ_01
       
  2405     "Testing if #REG_MULTI_SZ type returns correct size in bytes"
       
  2406     | testingData testingRegistryType testingRegistryPath readData |
       
  2407 
       
  2408     testingData := Dictionary new.
       
  2409     testingRegistryType :=  #REG_MULTI_SZ.
       
  2410     testingData at: testingRegistryType put: 974. "/ [bytes] - multiple lines in registry
       
  2411     
       
  2412     testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
       
  2413     readData := testingRegistryPath valueTypeAndSize: 'ř ž č ルすしか'.
       
  2414     
       
  2415     self assert: readData keys first = testingRegistryType.  
       
  2416     self assert: (readData at: testingRegistryType) = (testingData at: testingRegistryType)    
       
  2417     
       
  2418     "
       
  2419      self run:#testValueTypeAndSize_REG_MULTI_SZ_01
       
  2420      self new testValueTypeAndSize_REG_MULTI_SZ_01
       
  2421     "
       
  2422 
       
  2423     "Created: / 31-01-2019 / 16:14:31 / svestkap"
       
  2424 !
       
  2425 
       
  2426 testValueTypeAndSize_REG_NONE_01
       
  2427     "Testing if #REG_NONE type returns alwyas 0 as it should"
       
  2428     | testingRegistryPath readData testingData |
       
  2429 
       
  2430     testingData := Dictionary new.            
       
  2431     testingData at: #REG_NONE put: 0. "/ #REG_NONE always returns 0
       
  2432     
       
  2433     testingRegistryPath := Win32OperatingSystem registryEntry key: (registryPath,'\', '\ ルすしか_testing_delete\reg-none').
       
  2434     readData := testingRegistryPath valueTypeAndSize: ''.
       
  2435     
       
  2436     self assert: readData keys first = #REG_NONE.  
       
  2437     self assert: (readData at: #'REG_NONE') = (testingData at: #'REG_NONE')    
       
  2438     
       
  2439     "
       
  2440      self run:#testValueTypeAndSize_REG_NONE_01
       
  2441      self new testValueTypeAndSize_REG_NONE_01
       
  2442     "
       
  2443 
       
  2444     "Created: / 31-01-2019 / 15:35:37 / svestkap"
       
  2445     "Modified (comment): / 01-02-2019 / 15:13:27 / svestkap"
       
  2446 !
       
  2447 
       
  2448 testValueTypeAndSize_REG_QWORD_01
       
  2449     "Testing if #REG_QWORD type returns correct size in bytes"
       
  2450     | testingData testingRegistryType testingRegistryPath readData |
       
  2451 
       
  2452     self skipIf: (OperatingSystem getSystemInfo at: #architecture) ~= #x64 description: 'Test only for x64 architecture'.  
       
  2453     
       
  2454     testingData := Dictionary new.
       
  2455     testingRegistryType :=  #REG_QWORD.
       
  2456     testingData at: testingRegistryType put: 8. "/ 64bits = 8bytes - testing registry contains 0xffffffffffffffff 
       
  2457     
       
  2458     testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
       
  2459     readData := testingRegistryPath valueTypeAndSize: 'qword_max'.
       
  2460     
       
  2461     self assert: readData keys first = testingRegistryType.  
       
  2462     self assert: (readData at: testingRegistryType) = (testingData at: testingRegistryType)    
       
  2463     
       
  2464     "
       
  2465      self run:#testValueTypeAndSize_REG_DWORD_01
       
  2466      self new testValueTypeAndSize_REG_DWORD_01
       
  2467     "
       
  2468 
       
  2469     "Created: / 31-01-2019 / 16:12:21 / svestkap"
       
  2470     "Modified (comment): / 01-02-2019 / 15:11:57 / svestkap"
       
  2471 !
       
  2472 
       
  2473 testValueTypeAndSize_REG_SZ_01
       
  2474     "Testing if #REG_SZ type returns expected string size"
       
  2475     | testingRegistryPath readData testingData |
       
  2476 
       
  2477     testingData := Dictionary new.            
       
  2478     testingData at: #REG_SZ put: 13.
       
  2479     
       
  2480     testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
       
  2481     readData := testingRegistryPath valueTypeAndSize: 'しかき    '.
       
  2482     
       
  2483     self assert: readData keys first = #REG_SZ.  
       
  2484     self assert: (readData at: #'REG_SZ') = (testingData at: #'REG_SZ')    
       
  2485     
       
  2486     "
       
  2487      self run:#testValueTypeAndSize_REG_SZ_01
       
  2488      self new testValueTypeAndSize_REG_SZ_01
       
  2489     "
       
  2490 
       
  2491     "Created: / 30-01-2019 / 17:13:53 / svestkap"
       
  2492     "Modified (comment): / 31-01-2019 / 16:01:37 / svestkap"
  1393 ! !
  2493 ! !
  1394 
  2494 
  1395 !Win32OperatingSystemTest methodsFor:'tests-unicodeReadEnumeration'!
  2495 !Win32OperatingSystemTest methodsFor:'tests-unicodeReadEnumeration'!
  1396 
  2496 
  1397 testReadAllSubKeysDo_MaxPath
  2497 testReadAllSubKeysDo_MaxPath
  1398     "reading via allSubKeysDo (using subKeyAtIndex:) with max Path
  2498     "Reading via allSubKeysDo (using subKeyAtIndex:)with maximum path length.
  1399      The path is suppassing the Microsoft limit - for more information see testReadSubKeyAtIndex_MaxPath_01"
  2499      The path suppasses the limit specified by Microsoft - for more information see testReadSubKeyAtIndex_MaxPath_01"
  1400 
       
  1401     | readData testingRegistryPath |
  2500     | readData testingRegistryPath |
  1402 
  2501 
  1403     readData := OrderedCollection new.    
  2502     readData := OrderedCollection new.    
  1404     testingRegistryPath := Win32OperatingSystem registryEntry key: 
  2503     testingRegistryPath := Win32OperatingSystem registryEntry key: 
  1405         (registryPath,'\', ' ルすしか\256_chars_max_long|arsdfasdfjljljasdf;jl;jljsfasdfasdfljaslkdfjkasdfljalsd;jfa;lsdjflkasjdflkajsdflkjasdflkjsadlfjasldfjlsadjflksdjflksadjflkajsdflkjasdlfjalskdjflkasdjflkasdfkj;sdaf;kljkkjkklkjjjjkas|1asdfjsldfjlasdlfjlasdjfljasdlfjalsdjflajdfsdsasdfa|end').        
  2504         (registryPath,'\', ' ルすしか\256_chars_max_long|arsdfasdfjljljasdf;jl;jljsfasdfasdfljaslkdfjkasdfljalsd;jfa;lsdjflkasjdflkajsdflkjasdflkjsadlfjasldfjlsadjflksdjflksadjflkajsdflkjasdlfjalskdjflkasdjflkasdfkj;sdaf;kljkkjkklkjjjjkas|1asdfjsldfjlasdlfjlasdjfljasdlfjalsdjflajdfsdsasdfa|end').        
  1424      self run:#testReadAllSubKeysDo_MaxPath
  2523      self run:#testReadAllSubKeysDo_MaxPath
  1425      self new testReadAllSubKeysDo_MaxPath
  2524      self new testReadAllSubKeysDo_MaxPath
  1426     "
  2525     "
  1427 
  2526 
  1428     "Created: / 05-12-2018 / 12:40:53 / svestkap"
  2527     "Created: / 05-12-2018 / 12:40:53 / svestkap"
  1429 !
  2528     "Modified (comment): / 01-02-2019 / 14:57:24 / svestkap"
  1430 
  2529 !
  1431 testReadRemoteKeyOnHost
  2530 
       
  2531 testReadRemoteKeyOnHost_01
  1432     "Reading remote registry via remoteKeyOnHost:
  2532     "Reading remote registry via remoteKeyOnHost:
  1433      Note: a key must be a predefined key for more see: 
  2533      Note: a key must be a predefined key for more see: 
  1434      https://docs.microsoft.com/en-us/windows/desktop/SysInfo/predefined-keys"
  2534        https://docs.microsoft.com/en-us/windows/desktop/SysInfo/predefined-keys"
  1435     | testingRegistryPath remoteRegistry readData |
  2535     | testingRegistryPath remoteRegistry readData  |
  1436 
  2536     
  1437     "/ HKEY_CURRENT_USER is one of the predefined keys
  2537     "/ HKEY_CURRENT_USER is one of the predefined keys
  1438     testingRegistryPath := Win32OperatingSystem registryEntry key: 'HKEY_CURRENT_USER'.      
  2538     testingRegistryPath := Win32OperatingSystem registryEntry key: 'HKEY_CURRENT_USER'.        
  1439     
  2539     "/ testing done on localhost
  1440     "Skip testing if the remote registry is unreachable.  With localhost this can happen when 
  2540     "Skip testing if the remote registry is unreachable.  With localhost this can happen when 
  1441      the service RemoteRegistry, the service name in Windows 10, is not started."
  2541      the service RemoteRegistry, the service name in Windows 10, is not started."
  1442     [ remoteRegistry := testingRegistryPath remoteKeyOnHost: 'localhost' ] on: OsError do: [ :ex | "/ errorCode => `ex parameter parameter`
  2542     [ remoteRegistry := testingRegistryPath remoteKeyOnHost: 'localhost' ] on: OsError do: [ :ex | "/ errorCode => `ex parameter parameter`
  1443         self skipIf: ex parameter parameter = '53' description: 'ERROR_BAD_NETPATH, 53 (0x35) - The network path was not found.'
  2543         self skipIf: ex parameter parameter = '53' description: 'ERROR_BAD_NETPATH, 53 (0x35) - The network path was not found.'
  1444     ].
  2544     ].
  1445     
       
  1446     "/ testing done on localhost         
       
  1447     readData := remoteRegistry subKeys.
  2545     readData := remoteRegistry subKeys.
  1448     
  2546     
  1449     readData := readData copy collect: [ :subEntry | (subEntry path copyAfterLast: $\) asLowercase ].
  2547     readData := readData copy collect: [ :subEntry | (subEntry path copyAfterLast: $\) asLowercase ].
  1450     
  2548     
  1451     self assert: readData notEmptyOrNil.    
  2549     self assert: readData notEmptyOrNil.    
  1452     self assert: (readData includes: 'software').    
  2550     self assert: (readData includes: 'software').    
  1453 
  2551 
  1454     "
  2552     "
  1455      self run:#testReadRemoteKeyOnHost
  2553      self run:#testReadRemoteKeyOnHost_01
  1456      self new testReadRemoteKeyOnHost
  2554      self new testReadRemoteKeyOnHost_01
  1457     "
  2555     "
  1458 
  2556 
  1459     "Created: / 05-12-2018 / 12:41:06 / svestkap"
  2557     "Created: / 31-01-2019 / 12:11:06 / svestkap"
  1460     "Modified (format): / 16-01-2019 / 14:20:37 / svestkap"
  2558     "Modified (comment): / 01-02-2019 / 14:51:09 / svestkap"
       
  2559 !
       
  2560 
       
  2561 testReadRemoteKeyOnHost_02
       
  2562     "Reading remote registry via remoteKeyOnHost: using non-string key name
       
  2563      Note: a key must be a predefined key for more see: 
       
  2564        https://docs.microsoft.com/en-us/windows/desktop/SysInfo/predefined-keys"
       
  2565     | testingRegistryPath |
       
  2566     
       
  2567     "/ HKEY_CURRENT_USER is one of the predefined keys
       
  2568     testingRegistryPath := Win32OperatingSystem registryEntry key: 'HKEY_CURRENT_USER'.            
       
  2569     self should: [ testingRegistryPath remoteKeyOnHost: 11 ] 
       
  2570          raise: Error 
       
  2571          suchThat: [ :e | e messageText = 'hostNameString is not a string!!' ]
       
  2572     
       
  2573     "
       
  2574      self run:#testReadRemoteKeyOnHost_02
       
  2575      self new testReadRemoteKeyOnHost_02
       
  2576     "
       
  2577 
       
  2578     "Created: / 31-01-2019 / 12:10:18 / svestkap"
       
  2579     "Modified (format): / 01-02-2019 / 14:51:23 / svestkap"
  1461 !
  2580 !
  1462 
  2581 
  1463 testReadSubKeyNamesAndClassesDo_MaxPath
  2582 testReadSubKeyNamesAndClassesDo_MaxPath
  1464     "reading SubKeyNamesAndClasses with max Path
  2583     "Reading SubKeyNamesAndClasses with maximum path length.
  1465      The path is suppassing the Microsoft limit - for more information see testReadSubKeyNamesAndClassesAtIndex_MaxPath_01"
  2584      The path suppasses the limit specified by Microsoft - for more information see testReadSubKeyNamesAndClassesAtIndex_MaxPath_01"
  1466 
       
  1467     | readData testingRegistryPath |
  2585     | readData testingRegistryPath |
  1468 
  2586 
  1469     readData := OrderedDictionary new.    
  2587     readData := OrderedDictionary new.    
  1470     testingRegistryPath := Win32OperatingSystem registryEntry key: 
  2588     testingRegistryPath := Win32OperatingSystem registryEntry key: 
  1471         (registryPath,'\', ' ルすしか\256_chars_max_long|arsdfasdfjljljasdf;jl;jljsfasdfasdfljaslkdfjkasdfljalsd;jfa;lsdjflkasjdflkajsdflkjasdflkjsadlfjasldfjlsadjflksdjflksadjflkajsdflkjasdlfjalskdjflkasdjflkasdfkj;sdaf;kljkkjkklkjjjjkas|1asdfjsldfjlasdlfjlasdjfljasdlfjalsdjflajdfsdsasdfa|end').        
  2589         (registryPath,'\', ' ルすしか\256_chars_max_long|arsdfasdfjljljasdf;jl;jljsfasdfasdfljaslkdfjkasdfljalsd;jfa;lsdjflkasjdflkajsdflkjasdflkjsadlfjasldfjlsadjflksdjflksadjflkajsdflkjasdlfjalskdjflkasdjflkasdfkj;sdaf;kljkkjkklkjjjjkas|1asdfjsldfjlasdlfjlasdjfljasdlfjalsdjflajdfsdsasdfa|end').        
  1472     
  2590     
  1473     testingRegistryPath  subKeyNamesAndClassesDo: [  :name :className |
  2591     testingRegistryPath  subKeyNamesAndClassesDo: [ :name :className |
  1474         readData at: name put: className.
  2592         readData at: name put: className.
  1475     ].     
  2593     ].     
  1476 
  2594 
  1477     self assert: readData notEmptyOrNil.
  2595     self assert: readData notEmptyOrNil.
  1478     self assert: readData size = 2.
  2596     self assert: readData size = 2.
  1482      self run:#testReadSubKeyNamesAndClassesDo_MaxPath
  2600      self run:#testReadSubKeyNamesAndClassesDo_MaxPath
  1483      self new testReadSubKeyNamesAndClassesDo_MaxPath
  2601      self new testReadSubKeyNamesAndClassesDo_MaxPath
  1484     "
  2602     "
  1485 
  2603 
  1486     "Created: / 05-12-2018 / 12:41:31 / svestkap"
  2604     "Created: / 05-12-2018 / 12:41:31 / svestkap"
       
  2605     "Modified (comment): / 01-02-2019 / 14:57:00 / svestkap"
  1487 !
  2606 !
  1488 
  2607 
  1489 testReadSubKeysDo_MaxPath
  2608 testReadSubKeysDo_MaxPath
  1490     "reading via subKeysDo (using subKeyAtIndex:) with max Path
  2609     "Reading data via subKeysDo (using subKeyAtIndex:) with maximum path length.
  1491      The path is suppassing the Microsoft limit - for more information see testReadSubKeyAtIndex_MaxPath_01"
  2610      The path suppasses the limit specified by Microsoft - for more information see testReadSubKeyAtIndex_MaxPath_01"
  1492 
       
  1493     | readData testingRegistryPath |
  2611     | readData testingRegistryPath |
  1494 
  2612 
  1495     readData := OrderedCollection new.    
  2613     readData := OrderedCollection new.    
  1496     testingRegistryPath := Win32OperatingSystem registryEntry key: 
  2614     testingRegistryPath := Win32OperatingSystem registryEntry key: 
  1497         (registryPath,'\', ' ルすしか\256_chars_max_long|arsdfasdfjljljasdf;jl;jljsfasdfasdfljaslkdfjkasdfljalsd;jfa;lsdjflkasjdflkajsdflkjasdflkjsadlfjasldfjlsadjflksdjflksadjflkajsdflkjasdlfjalskdjflkasdjflkasdfkj;sdaf;kljkkjkklkjjjjkas|1asdfjsldfjlasdlfjlasdjfljasdlfjalsdjflajdfsdsasdfa|end').        
  2615         (registryPath,'\', ' ルすしか\256_chars_max_long|arsdfasdfjljljasdf;jl;jljsfasdfasdfljaslkdfjkasdfljalsd;jfa;lsdjflkasjdflkajsdflkjasdflkjsadlfjasldfjlsadjflksdjflksadjflkajsdflkjasdlfjalskdjflkasdjflkasdfkj;sdaf;kljkkjkklkjjjjkas|1asdfjsldfjlasdlfjlasdjfljasdlfjalsdjflajdfsdsasdfa|end').        
  1498     
  2616     
  1499     testingRegistryPath  subKeysDo: [ :subEntry |
  2617     testingRegistryPath subKeysDo: [ :subEntry |
  1500         readData add: subEntry
  2618         readData add: subEntry
  1501     ].     
  2619     ].     
  1502     
  2620     
  1503     self assert: readData notEmptyOrNil.    
  2621     self assert: readData notEmptyOrNil.    
  1504     self assert: readData size = 2.    
  2622     self assert: readData size = 2.    
  1514      self run:#testReadSubKeysDo_MaxPath
  2632      self run:#testReadSubKeysDo_MaxPath
  1515      self new testReadSubKeysDo_MaxPath
  2633      self new testReadSubKeysDo_MaxPath
  1516     "
  2634     "
  1517 
  2635 
  1518     "Created: / 05-12-2018 / 12:41:49 / svestkap"
  2636     "Created: / 05-12-2018 / 12:41:49 / svestkap"
       
  2637     "Modified (comment): / 01-02-2019 / 14:56:31 / svestkap"
  1519 !
  2638 !
  1520 
  2639 
  1521 testReadSubKeys_MaxPath
  2640 testReadSubKeys_MaxPath
  1522     "reading via subKeys (using subKeyAtIndex:) with max Path
  2641     "Reading via subKeys (using subKeyAtIndex:) with maximum path length.
  1523      The path is suppassing the Microsoft limit - for more information see testReadSubKeyAtIndex_MaxPath_01"
  2642      The path suppasses the limit specified by Microsoft - for more information see testReadSubKeyAtIndex_MaxPath_01"
  1524 
       
  1525     | readData testingRegistryPath |
  2643     | readData testingRegistryPath |
  1526     
  2644     
  1527     testingRegistryPath := Win32OperatingSystem registryEntry key: 
  2645     testingRegistryPath := Win32OperatingSystem registryEntry key: 
  1528         (registryPath,'\', ' ルすしか\256_chars_max_long|arsdfasdfjljljasdf;jl;jljsfasdfasdfljaslkdfjkasdfljalsd;jfa;lsdjflkasjdflkajsdflkjasdflkjsadlfjasldfjlsadjflksdjflksadjflkajsdflkjasdlfjalskdjflkasdjflkasdfkj;sdaf;kljkkjkklkjjjjkas|1asdfjsldfjlasdlfjlasdjfljasdlfjalsdjflajdfsdsasdfa|end').        
  2646         (registryPath,'\', ' ルすしか\256_chars_max_long|arsdfasdfjljljasdf;jl;jljsfasdfasdfljaslkdfjkasdfljalsd;jfa;lsdjflkasjdflkajsdflkjasdflkjsadlfjasldfjlsadjflksdjflksadjflkajsdflkjasdlfjalskdjflkasdjflkasdfkj;sdaf;kljkkjkklkjjjjkas|1asdfjsldfjlasdlfjlasdjfljasdlfjalsdjflajdfsdsasdfa|end').        
  1529     
  2647     
  1543      self run:#testReadSubKeys_MaxPath
  2661      self run:#testReadSubKeys_MaxPath
  1544      self new testReadSubKeys_MaxPath
  2662      self new testReadSubKeys_MaxPath
  1545     "
  2663     "
  1546 
  2664 
  1547     "Created: / 05-12-2018 / 12:41:59 / svestkap"
  2665     "Created: / 05-12-2018 / 12:41:59 / svestkap"
       
  2666     "Modified (comment): / 01-02-2019 / 14:56:12 / svestkap"
  1548 !
  2667 !
  1549 
  2668 
  1550 testReadValueNamesAndValuesDo_MaxPath
  2669 testReadValueNamesAndValuesDo_MaxPath
  1551     "reading via #valueNamesAndValuesDo: (using #valueNameAtIndex:) with max Path
  2670     "Reading data via #valueNamesAndValuesDo: (using #valueNameAtIndex:) with maximum path length.
  1552      The path is suppassing the Microsoft limit - for more information see testReadValueNameAtIndex_01"
  2671      The path suppasses the limit specified by Microsoft - for more information see testReadValueNameAtIndex_01"
  1553 
       
  1554     | readData testingRegistryPath |
  2672     | readData testingRegistryPath |
  1555 
  2673 
  1556     readData := OrderedDictionary new.    
  2674     readData := OrderedDictionary new.    
  1557     testingRegistryPath := Win32OperatingSystem registryEntry key: 
  2675     testingRegistryPath := Win32OperatingSystem registryEntry key: 
  1558         (registryPath,'\', ' ルすしか\256_chars_max_long|arsdfasdfjljljasdf;jl;jljsfasdfasdfljaslkdfjkasdfljalsd;jfa;lsdjflkasjdflkajsdflkjasdflkjsadlfjasldfjlsadjflksdjflksadjflkajsdflkjasdlfjalskdjflkasdjflkasdfkj;sdaf;kljkkjkklkjjjjkas|1asdfjsldfjlasdlfjlasdjfljasdlfjalsdjflajdfsdsasdfa|end').        
  2676         (registryPath,'\', ' ルすしか\256_chars_max_long|arsdfasdfjljljasdf;jl;jljsfasdfasdfljaslkdfjkasdfljalsd;jfa;lsdjflkasjdflkajsdflkjasdflkjsadlfjasldfjlsadjflksdjflksadjflkajsdflkjasdlfjalskdjflkasdjflkasdfkj;sdaf;kljkkjkklkjjjjkas|1asdfjsldfjlasdlfjlasdjfljasdlfjalsdjflajdfsdsasdfa|end').        
  1574      self run:#testReadValueNamesAndValuesDo_MaxPath
  2692      self run:#testReadValueNamesAndValuesDo_MaxPath
  1575      self new testReadValueNamesAndValuesDo_MaxPath
  2693      self new testReadValueNamesAndValuesDo_MaxPath
  1576     "
  2694     "
  1577 
  2695 
  1578     "Created: / 05-12-2018 / 12:43:05 / svestkap"
  2696     "Created: / 05-12-2018 / 12:43:05 / svestkap"
       
  2697     "Modified (comment): / 01-02-2019 / 14:54:23 / svestkap"
  1579 !
  2698 !
  1580 
  2699 
  1581 testReadValueNamesAndValuesDo_REG_SZ_01
  2700 testReadValueNamesAndValuesDo_REG_SZ_01
  1582     "Testing if REG_SZ values are read correctly via valueNamesAndValuesDo:"
  2701     "Testing if REG_SZ values are read correctly via valueNamesAndValuesDo:"
  1583 
       
  1584     | readData testingRegistryPath |
  2702     | readData testingRegistryPath |
  1585     
  2703     
  1586     readData := OrderedDictionary new.    
  2704     readData := OrderedDictionary new.    
  1587     testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
  2705     testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
  1588      
  2706      
  1596      self run:#testReadValueNamesAndValuesDo_REG_SZ_01
  2714      self run:#testReadValueNamesAndValuesDo_REG_SZ_01
  1597      self new testReadValueNamesAndValuesDo_REG_SZ_01
  2715      self new testReadValueNamesAndValuesDo_REG_SZ_01
  1598     "
  2716     "
  1599 
  2717 
  1600     "Created: / 16-11-2018 / 12:15:52 / svestkap"
  2718     "Created: / 16-11-2018 / 12:15:52 / svestkap"
       
  2719     "Modified (format): / 01-02-2019 / 13:31:44 / svestkap"
  1601 !
  2720 !
  1602 
  2721 
  1603 testReadValueNamesAndValuesDo_REG_SZ_02
  2722 testReadValueNamesAndValuesDo_REG_SZ_02
  1604     "Testing if REG_SZ values are read correctly via valueNamesAndValuesDo:"
  2723     "Testing if REG_SZ values are read correctly via valueNamesAndValuesDo:"
  1605 
       
  1606     | readData testingRegistryPath |
  2724     | readData testingRegistryPath |
  1607     
  2725     
  1608     readData := OrderedDictionary new.    
  2726     readData := OrderedDictionary new.    
  1609     testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
  2727     testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
  1610      
  2728      
  1618      self run:#testReadValueNamesAndValuesDo_REG_SZ_02
  2736      self run:#testReadValueNamesAndValuesDo_REG_SZ_02
  1619      self new testReadValueNamesAndValuesDo_REG_SZ_02
  2737      self new testReadValueNamesAndValuesDo_REG_SZ_02
  1620     "
  2738     "
  1621 
  2739 
  1622     "Created: / 05-12-2018 / 12:43:35 / svestkap"
  2740     "Created: / 05-12-2018 / 12:43:35 / svestkap"
       
  2741     "Modified (format): / 01-02-2019 / 13:31:48 / svestkap"
  1623 !
  2742 !
  1624 
  2743 
  1625 testReadValueNamesDo_MaxPath
  2744 testReadValueNamesDo_MaxPath
  1626     "reading via #valueNamesDo: (using #valueNameAtIndex:) with max Path
  2745     "Reading data via #valueNamesDo: (using #valueNameAtIndex:)  with maximum path length.
  1627      The path is suppassing the Microsoft limit - for more information see testReadValueNameAtIndex_01"
  2746      The path is suppassing the Microsoft limit - for more information see testReadValueNameAtIndex_01"
  1628 
       
  1629     | readData readDataValue testingRegistryPath |
  2747     | readData readDataValue testingRegistryPath |
  1630 
  2748 
  1631     readData := OrderedCollection new.    
  2749     readData := OrderedCollection new.    
  1632     testingRegistryPath := Win32OperatingSystem registryEntry key: 
  2750     testingRegistryPath := Win32OperatingSystem registryEntry key: 
  1633         (registryPath,'\', ' ルすしか\256_chars_max_long|arsdfasdfjljljasdf;jl;jljsfasdfasdfljaslkdfjkasdfljalsd;jfa;lsdjflkasjdflkajsdflkjasdflkjsadlfjasldfjlsadjflksdjflksadjflkajsdflkjasdlfjalskdjflkasdjflkasdfkj;sdaf;kljkkjkklkjjjjkas|1asdfjsldfjlasdlfjlasdjfljasdlfjalsdjflajdfsdsasdfa|end').        
  2751         (registryPath,'\', ' ルすしか\256_chars_max_long|arsdfasdfjljljasdf;jl;jljsfasdfasdfljaslkdfjkasdfljalsd;jfa;lsdjflkasjdflkajsdflkjasdflkjsadlfjasldfjlsadjflksdjflksadjflkajsdflkjasdlfjalskdjflkasdjflkasdfkj;sdaf;kljkkjkklkjjjjkas|1asdfjsldfjlasdlfjlasdjfljasdlfjalsdjflajdfsdsasdfa|end').        
  1651      self run:#testReadValueNamesDo_MaxPath
  2769      self run:#testReadValueNamesDo_MaxPath
  1652      self new testReadValueNamesDo_MaxPath
  2770      self new testReadValueNamesDo_MaxPath
  1653     "
  2771     "
  1654 
  2772 
  1655     "Created: / 05-12-2018 / 12:43:49 / svestkap"
  2773     "Created: / 05-12-2018 / 12:43:49 / svestkap"
       
  2774     "Modified (comment): / 01-02-2019 / 14:55:15 / svestkap"
  1656 !
  2775 !
  1657 
  2776 
  1658 testReadValueNames_MaxPath
  2777 testReadValueNames_MaxPath
  1659     "reading via #valueNames (using #valueNameAtIndex:) with max Path
  2778     "reading via #valueNames (using #valueNameAtIndex:) with max Path
  1660      The path is suppassing the Microsoft limit - for more information see testReadValueNameAtIndex_01"
  2779      The path is suppassing the Microsoft limit - for more information see testReadValueNameAtIndex_01"
  1661 
       
  1662     | readData testingRegistryPath |
  2780     | readData testingRegistryPath |
  1663 
  2781 
  1664     testingRegistryPath := Win32OperatingSystem registryEntry key: 
  2782     testingRegistryPath := Win32OperatingSystem registryEntry key: 
  1665         (registryPath,'\', ' ルすしか\256_chars_max_long|arsdfasdfjljljasdf;jl;jljsfasdfasdfljaslkdfjkasdfljalsd;jfa;lsdjflkasjdflkajsdflkjasdflkjsadlfjasldfjlsadjflksdjflksadjflkajsdflkjasdlfjalskdjflkasdjflkasdfkj;sdaf;kljkkjkklkjjjjkas|1asdfjsldfjlasdlfjlasdjfljasdlfjalsdjflajdfsdsasdfa|end').        
  2783         (registryPath,'\', ' ルすしか\256_chars_max_long|arsdfasdfjljljasdf;jl;jljsfasdfasdfljaslkdfjkasdfljalsd;jfa;lsdjflkasjdflkajsdflkjasdflkjsadlfjasldfjlsadjflksdjflksadjflkajsdflkjasdlfjalskdjflkasdjflkasdfkj;sdaf;kljkkjkklkjjjjkas|1asdfjsldfjlasdlfjlasdjfljasdlfjalsdjflajdfsdsasdfa|end').        
  1666     
  2784     
  1677      self run:#testReadValueNames_MaxPath
  2795      self run:#testReadValueNames_MaxPath
  1678      self new testReadValueNames_MaxPath
  2796      self new testReadValueNames_MaxPath
  1679     "
  2797     "
  1680 
  2798 
  1681     "Created: / 05-12-2018 / 12:44:16 / svestkap"
  2799     "Created: / 05-12-2018 / 12:44:16 / svestkap"
       
  2800     "Modified (format): / 01-02-2019 / 13:31:55 / svestkap"
  1682 !
  2801 !
  1683 
  2802 
  1684 testReadvalueNamesAndValuesDo_MaxPath_01
  2803 testReadvalueNamesAndValuesDo_MaxPath_01
  1685     "reading via #valueNamesAndValuesDo: (using #valueNameAtIndex:) with max Path
  2804     "reading via #valueNamesAndValuesDo: (using #valueNameAtIndex:) with max Path
  1686      The path is suppassing the Microsoft limit - for more information see testReadValueNameAtIndex_01"
  2805      The path is suppassing the Microsoft limit - for more information see testReadValueNameAtIndex_01"
  1687 
       
  1688     | readData testingRegistryPath |
  2806     | readData testingRegistryPath |
  1689 
  2807 
  1690     readData := OrderedDictionary new.    
  2808     readData := OrderedDictionary new.    
  1691     testingRegistryPath := Win32OperatingSystem registryEntry key: 
  2809     testingRegistryPath := Win32OperatingSystem registryEntry key: 
  1692         (registryPath,'\', ' ルすしか\256_chars_max_long|arsdfasdfjljljasdf;jl;jljsfasdfasdfljaslkdfjkasdfljalsd;jfa;lsdjflkasjdflkajsdflkjasdflkjsadlfjasldfjlsadjflksdjflksadjflkajsdflkjasdlfjalskdjflkasdjflkasdfkj;sdaf;kljkkjkklkjjjjkas|1asdfjsldfjlasdlfjlasdjfljasdlfjalsdjflajdfsdsasdfa|end').        
  2810         (registryPath,'\', ' ルすしか\256_chars_max_long|arsdfasdfjljljasdf;jl;jljsfasdfasdfljaslkdfjkasdfljalsd;jfa;lsdjflkasjdflkajsdflkjasdflkjsadlfjasldfjlsadjflksdjflksadjflkajsdflkjasdlfjalskdjflkasdjflkasdfkj;sdaf;kljkkjkklkjjjjkas|1asdfjsldfjlasdlfjlasdjfljasdlfjalsdjflajdfsdsasdfa|end').        
  1708      self run:#testReadvalueNamesAndValuesDo_MaxPath_01
  2826      self run:#testReadvalueNamesAndValuesDo_MaxPath_01
  1709      self new testReadvalueNamesAndValuesDo_MaxPath_01
  2827      self new testReadvalueNamesAndValuesDo_MaxPath_01
  1710     "
  2828     "
  1711 
  2829 
  1712     "Created: / 22-11-2018 / 14:10:34 / svestkap"
  2830     "Created: / 22-11-2018 / 14:10:34 / svestkap"
       
  2831     "Modified (format): / 01-02-2019 / 13:31:59 / svestkap"
  1713 !
  2832 !
  1714 
  2833 
  1715 testReadvalueNamesAndValuesDo_REG_SZ_02
  2834 testReadvalueNamesAndValuesDo_REG_SZ_02
  1716     "Testing if REG_SZ values are read correctly via valueNamesAndValuesDo:"
  2835     "Testing if REG_SZ values are read correctly via valueNamesAndValuesDo:"
  1717 
       
  1718     | readData testingRegistryPath |
  2836     | readData testingRegistryPath |
  1719     
  2837     
  1720     readData := OrderedDictionary new.    
  2838     readData := OrderedDictionary new.    
  1721     testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
  2839     testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
  1722      
  2840      
  1730      self run:#testReadvalueNamesAndValuesDo_REG_SZ_02
  2848      self run:#testReadvalueNamesAndValuesDo_REG_SZ_02
  1731      self new testReadvalueNamesAndValuesDo_REG_SZ_02
  2849      self new testReadvalueNamesAndValuesDo_REG_SZ_02
  1732     "
  2850     "
  1733 
  2851 
  1734     "Created: / 16-11-2018 / 12:16:16 / svestkap"
  2852     "Created: / 16-11-2018 / 12:16:16 / svestkap"
       
  2853     "Modified (format): / 01-02-2019 / 13:32:02 / svestkap"
  1735 ! !
  2854 ! !
  1736 
  2855 
  1737 !Win32OperatingSystemTest methodsFor:'tests-unicodeWrite'!
  2856 !Win32OperatingSystemTest methodsFor:'tests-unicodeWrite'!
  1738 
  2857 
  1739 testDefaultValue_01
  2858 testDefaultValue_01
  1740     "Testing if value can be stored (defaultValue:) and read (defaultValue)
  2859     "Testing if value can be stored (defaultValue:) and read (defaultValue)
  1741     Note: the value is stored in (Default) value at the key"
  2860      Note: the value is stored in (Default) value at the key"
  1742 
       
  1743     | testingRegistryPath readData |
  2861     | testingRegistryPath readData |
  1744 
  2862     
  1745     registryPath := registryPath, '\', ' ルすしか'.
  2863     registryPath := registryPath, '\', ' ルすしか'.
  1746     testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
  2864     testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
  1747     
  2865     
  1748     readData := testingRegistryPath defaultValue.
  2866     readData := testingRegistryPath defaultValue.
  1749     self assert: readData isNil.
  2867     self assert: readData isNil.
  1757      self run:#testDefaultValue_01
  2875      self run:#testDefaultValue_01
  1758      self new testDefaultValue_01
  2876      self new testDefaultValue_01
  1759     "
  2877     "
  1760 
  2878 
  1761     "Created: / 12-12-2018 / 12:35:53 / svestkap"
  2879     "Created: / 12-12-2018 / 12:35:53 / svestkap"
       
  2880     "Modified (format): / 01-02-2019 / 13:55:01 / svestkap"
  1762 !
  2881 !
  1763 
  2882 
  1764 testDefaultValue_02
  2883 testDefaultValue_02
  1765     "Testing if value can be stored (defaultValue:) and read (defaultValue) with registry type and size check
  2884     "Testing if value can be stored (defaultValue:) and read (defaultValue) with registry type and size check
  1766     Note: the value is stored in (Default) value at the key"
  2885      Note: the value is stored in (Default) value at the key"
  1767 
       
  1768     | testingRegistryPath registryType readData |
  2886     | testingRegistryPath registryType readData |
  1769 
  2887 
  1770     registryPath := registryPath, '\', ' ルすしか'.
  2888     registryPath := registryPath, '\', ' ルすしか'.
  1771     testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
  2889     testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
  1772   
  2890   
  1791      self new testDefaultValue_02
  2909      self new testDefaultValue_02
  1792     "
  2910     "
  1793 
  2911 
  1794     "Created: / 12-12-2018 / 11:07:11 / svestkap"
  2912     "Created: / 12-12-2018 / 11:07:11 / svestkap"
  1795     "Modified: / 12-12-2018 / 14:08:14 / svestkap"
  2913     "Modified: / 12-12-2018 / 14:08:14 / svestkap"
       
  2914     "Modified (comment): / 01-02-2019 / 13:55:06 / svestkap"
  1796 !
  2915 !
  1797 
  2916 
  1798 testWriteValueNamedPut_REG_BINARY_01
  2917 testWriteValueNamedPut_REG_BINARY_01
  1799     "Testing if REG_BINARY zero value is written correctly via valueNamed:put:
  2918     "Testing if REG_BINARY zero value is written correctly via valueNamed:put:
  1800      Data is written and read back again." 
  2919      Data is written and read back again." 
  1801 
       
  1802     | testingRegistryPath readData |
  2920     | testingRegistryPath readData |
  1803 
  2921 
  1804     testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.    
  2922     testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.    
  1805     testingRegistryPath valueNamed: 'non-zero' put: ByteArray new.
  2923     testingRegistryPath valueNamed: 'non-zero' put: ByteArray new.
  1806     
  2924     
  1812      self run:#testWriteValueNamedPut_REG_BINARY_01
  2930      self run:#testWriteValueNamedPut_REG_BINARY_01
  1813      self new testWriteValueNamedPut_REG_BINARY_01
  2931      self new testWriteValueNamedPut_REG_BINARY_01
  1814     "
  2932     "
  1815 
  2933 
  1816     "Created: / 04-12-2018 / 11:52:46 / svestkap"
  2934     "Created: / 04-12-2018 / 11:52:46 / svestkap"
  1817     "Modified (format): / 05-12-2018 / 12:45:43 / svestkap"
  2935     "Modified (format): / 01-02-2019 / 13:55:10 / svestkap"
  1818 !
  2936 !
  1819 
  2937 
  1820 testWriteValueNamedPut_REG_BINARY_02
  2938 testWriteValueNamedPut_REG_BINARY_02
  1821     "Testing if REG_BINARY values are written correctly via valueNamed:put:
  2939     "Testing if REG_BINARY values are written correctly via valueNamed:put:
  1822      Data is written and read back again." 
  2940      Data is written and read back again." 
  1823 
       
  1824     | testingRegistryPath byteArray readData readDataHex |
  2941     | testingRegistryPath byteArray readData readDataHex |
  1825 
  2942 
  1826     testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
  2943     testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
  1827     
       
  1828     readData := testingRegistryPath valueNamed: 'non-zero'.
       
  1829     self assert: readData = #[17 16].
       
  1830     
  2944     
  1831     byteArray := ByteArray new: 5.
  2945     byteArray := ByteArray new: 5.
  1832     "/ data to be written  
  2946     "/ data to be written  
  1833     byteArray replaceElementsFrom: 1 to: 5 withArray: #[18 234 11 0 18] startingAt: 1. 
  2947     byteArray replaceElementsFrom: 1 to: 5 withArray: #[18 234 11 0 18] startingAt: 1. 
  1834     
  2948     
  1844      self run:#testWriteValueNamedPut_REG_BINARY_02
  2958      self run:#testWriteValueNamedPut_REG_BINARY_02
  1845      self new testWriteValueNamedPut_REG_BINARY_02
  2959      self new testWriteValueNamedPut_REG_BINARY_02
  1846     "
  2960     "
  1847 
  2961 
  1848     "Created: / 04-12-2018 / 12:04:18 / svestkap"
  2962     "Created: / 04-12-2018 / 12:04:18 / svestkap"
  1849     "Modified: / 12-12-2018 / 13:15:23 / svestkap"
  2963     "Modified (format): / 01-02-2019 / 13:55:13 / svestkap"
  1850 !
  2964 !
  1851 
  2965 
  1852 testWriteValueNamedPut_REG_BINARY_03
  2966 testWriteValueNamedPut_REG_BINARY_03
  1853     "Testing if new REG_BINARY value name is written correctly via valueNamed:put:
  2967     "Testing if new REG_BINARY value name is written correctly via valueNamed:put:
  1854      Data is written and read back again." 
  2968      Data is written and read back again." 
  1855 
       
  1856     | testingRegistryPath byteArray readData readDataHex |
  2969     | testingRegistryPath byteArray readData readDataHex |
  1857 
  2970 
  1858     testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
  2971     testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
  1859     
  2972     
  1860     byteArray := ByteArray new: 5.
  2973     byteArray := ByteArray new: 5.
  1873      self run:#testWriteValueNamedPut_REG_BINARY_03
  2986      self run:#testWriteValueNamedPut_REG_BINARY_03
  1874      self new testWriteValueNamedPut_REG_BINARY_03
  2987      self new testWriteValueNamedPut_REG_BINARY_03
  1875     "
  2988     "
  1876 
  2989 
  1877     "Created: / 07-12-2018 / 15:15:06 / svestkap"
  2990     "Created: / 07-12-2018 / 15:15:06 / svestkap"
       
  2991     "Modified (format): / 01-02-2019 / 13:56:49 / svestkap"
  1878 !
  2992 !
  1879 
  2993 
  1880 testWriteValueNamedPut_REG_BINARY_04
  2994 testWriteValueNamedPut_REG_BINARY_04
  1881     "Testing if new REG_BINARY value name is written correctly via valueNamed:put: with registry type and size check
  2995     "Testing if new REG_BINARY value name is written correctly via valueNamed:put: with registry type and size check
  1882      Data is written and read back again." 
  2996      Data is written and read back again." 
  1883 
       
  1884     | testingRegistryPath byteArray readData readDataHex registryType |
  2997     | testingRegistryPath byteArray readData readDataHex registryType |
  1885 
  2998 
  1886     testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
  2999     testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
  1887        
  3000        
  1888     byteArray := ByteArray new: 5.
  3001     byteArray := ByteArray new: 5.
  1905      self run:#testWriteValueNamedPut_REG_BINARY_04
  3018      self run:#testWriteValueNamedPut_REG_BINARY_04
  1906      self new testWriteValueNamedPut_REG_BINARY_04
  3019      self new testWriteValueNamedPut_REG_BINARY_04
  1907     "
  3020     "
  1908 
  3021 
  1909     "Created: / 12-12-2018 / 12:36:46 / svestkap"
  3022     "Created: / 12-12-2018 / 12:36:46 / svestkap"
       
  3023     "Modified (format): / 01-02-2019 / 13:56:52 / svestkap"
  1910 !
  3024 !
  1911 
  3025 
  1912 testWriteValueNamedPut_REG_BINARY_05
  3026 testWriteValueNamedPut_REG_BINARY_05
  1913     "Testing if REG_BINARY values are written correctly via valueNamed:put:
  3027     "Testing if REG_BINARY values are written correctly via valueNamed:put:
  1914      Data is written and read back again." 
  3028      Data is written and read back again." 
  1915 
       
  1916     | testingRegistryPath byteArray readData readDataHex registryType |
  3029     | testingRegistryPath byteArray readData readDataHex registryType |
  1917 
  3030 
  1918     testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
  3031     testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
  1919     
  3032     
  1920     readData := testingRegistryPath valueNamed: 'non-zero'.
  3033     readData := testingRegistryPath valueNamed: 'non-zero'.
  1944      self run:#testWriteValueNamedPut_REG_BINARY_05
  3057      self run:#testWriteValueNamedPut_REG_BINARY_05
  1945      self new testWriteValueNamedPut_REG_BINARY_05
  3058      self new testWriteValueNamedPut_REG_BINARY_05
  1946     "
  3059     "
  1947 
  3060 
  1948     "Created: / 12-12-2018 / 13:16:13 / svestkap"
  3061     "Created: / 12-12-2018 / 13:16:13 / svestkap"
       
  3062     "Modified (format): / 01-02-2019 / 13:56:55 / svestkap"
  1949 !
  3063 !
  1950 
  3064 
  1951 testWriteValueNamedPut_REG_DWORD_01
  3065 testWriteValueNamedPut_REG_DWORD_01
  1952     "Testing if REG_DWORD values are written correctly via valueNamed:put:"
  3066     "Testing if REG_DWORD values are written correctly via valueNamed:put:"
  1953 
       
  1954     | readData testingRegistryPath |
  3067     | readData testingRegistryPath |
  1955 
  3068 
  1956     readData := Integer new.     
  3069     readData := Integer new.     
  1957     testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
  3070     testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
  1958     readData := testingRegistryPath valueNamed: 'dword_value'.
       
  1959     self assert: readData = 9135. "/ the previous value
       
  1960     
       
  1961     testingRegistryPath valueNamed: 'dword_value' put: 7337.
  3071     testingRegistryPath valueNamed: 'dword_value' put: 7337.
  1962     readData := testingRegistryPath valueNamed: 'dword_value'.
  3072     readData := testingRegistryPath valueNamed: 'dword_value'.
  1963 
  3073 
  1964     self assert: readData = 7337. "/ the new value
  3074     self assert: readData = 7337.
  1965 
  3075 
  1966     "
  3076     "
  1967      self run:#testWriteValueNamedPut_REG_DWORD_01
  3077      self run:#testWriteValueNamedPut_REG_DWORD_01
  1968      self new testWriteValueNamedPut_REG_DWORD_01
  3078      self new testWriteValueNamedPut_REG_DWORD_01
  1969     "
  3079     "
  1970 
  3080 
  1971     "Created: / 05-12-2018 / 11:35:52 / svestkap"
  3081     "Created: / 05-12-2018 / 11:35:52 / svestkap"
  1972     "Modified (comment): / 12-12-2018 / 13:07:15 / svestkap"
  3082     "Modified: / 07-12-2018 / 15:13:18 / svestkap"
       
  3083     "Modified (format): / 01-02-2019 / 13:56:59 / svestkap"
  1973 !
  3084 !
  1974 
  3085 
  1975 testWriteValueNamedPut_REG_DWORD_02
  3086 testWriteValueNamedPut_REG_DWORD_02
  1976     "Testing if max DWORD is accepted as REG_DWORD (written correctly via valueNamed:put:)"
  3087     "Testing if max DWORD is accepted as REG_DWORD (written correctly via valueNamed:put:)"
  1977 
       
  1978     | readData testingRegistryPath |
  3088     | readData testingRegistryPath |
  1979 
  3089 
  1980     readData := Integer new.          
  3090     readData := Integer new.          
  1981     testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
  3091     testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
  1982     "/ max DWORD value 0xffffffff -> 4294967295 (which is on x64 SmallInteger)    
  3092     "/ max DWORD value 0xffffffff -> 4294967295 (which is on x64 SmallInteger)    
  1990      self new testWriteValueNamedPut_REG_DWORD_02
  3100      self new testWriteValueNamedPut_REG_DWORD_02
  1991     "
  3101     "
  1992 
  3102 
  1993     "Created: / 05-12-2018 / 11:36:00 / svestkap"
  3103     "Created: / 05-12-2018 / 11:36:00 / svestkap"
  1994     "Modified: / 07-12-2018 / 15:13:42 / svestkap"
  3104     "Modified: / 07-12-2018 / 15:13:42 / svestkap"
       
  3105     "Modified (format): / 01-02-2019 / 13:57:02 / svestkap"
  1995 !
  3106 !
  1996 
  3107 
  1997 testWriteValueNamedPut_REG_DWORD_03
  3108 testWriteValueNamedPut_REG_DWORD_03
  1998     "Testing if REG_DWORD values are written correctly via valueNamed:put:
  3109     "Testing if REG_DWORD values are written correctly via valueNamed:put:
  1999      Data is written and read back again."
  3110      Data is written and read back again."
  2000 
       
  2001     | readData testingRegistryPath |
  3111     | readData testingRegistryPath |
  2002 
  3112 
  2003     readData := Integer new.          
  3113     readData := Integer new.          
  2004     testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
  3114     testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
  2005     testingRegistryPath valueNamed: '11' put: 7337.
  3115     testingRegistryPath valueNamed: '11' put: 7337.
  2011      self run:#testWriteValueNamedPut_REG_DWORD_03
  3121      self run:#testWriteValueNamedPut_REG_DWORD_03
  2012      self new testWriteValueNamedPut_REG_DWORD_03
  3122      self new testWriteValueNamedPut_REG_DWORD_03
  2013     "
  3123     "
  2014 
  3124 
  2015     "Created: / 05-12-2018 / 11:35:36 / svestkap"
  3125     "Created: / 05-12-2018 / 11:35:36 / svestkap"
  2016     "Modified (format): / 07-12-2018 / 15:14:33 / svestkap"
  3126     "Modified (format): / 01-02-2019 / 13:57:05 / svestkap"
  2017 !
  3127 !
  2018 
  3128 
  2019 testWriteValueNamedPut_REG_DWORD_04
  3129 testWriteValueNamedPut_REG_DWORD_04
  2020     "Testing if REG_DWORD values are written correctly via valueNamed:put:
  3130     "Testing if REG_DWORD values are written correctly via valueNamed:put:
  2021      Data is written and read back again."
  3131      Data is written and read back again."
  2022 
       
  2023     | readData testingRegistryPath |
  3132     | readData testingRegistryPath |
  2024    
  3133    
  2025     readData := Integer new.          
  3134     readData := Integer new.          
  2026     testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
  3135     testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
  2027     testingRegistryPath valueNamed: '11' put: 7337.
  3136     testingRegistryPath valueNamed: '11' put: 7337.
  2033      self run:#testWriteValueNamedPut_REG_DWORD_04
  3142      self run:#testWriteValueNamedPut_REG_DWORD_04
  2034      self new testWriteValueNamedPut_REG_DWORD_04
  3143      self new testWriteValueNamedPut_REG_DWORD_04
  2035     "
  3144     "
  2036 
  3145 
  2037     "Created: / 05-12-2018 / 11:39:00 / svestkap"
  3146     "Created: / 05-12-2018 / 11:39:00 / svestkap"
  2038     "Modified (format): / 07-12-2018 / 15:14:24 / svestkap"
  3147     "Modified (format): / 01-02-2019 / 13:57:09 / svestkap"
  2039 !
  3148 !
  2040 
  3149 
  2041 testWriteValueNamedPut_REG_DWORD_05
  3150 testWriteValueNamedPut_REG_DWORD_05
  2042     "Testing if REG_DWORD values are written correctly via valueNamed:put:
  3151     "Testing if trying to access REG_DWORD values via name as number raises a predefined error"
  2043      Data is written and read back again.
  3152     | testingRegistryPath |
  2044      Note: user should see a warning message on Transcript"
  3153 
  2045 
  3154     testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
  2046     | readData testingRegistryPath |
  3155 
  2047 
  3156     self should: [ testingRegistryPath valueNamed: 11 put: 7337] raise: Error
  2048     readData := Unicode16String new.    
  3157         suchThat: [ :e | e messageText = 'nameString is not a string!!' ].        
  2049     testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
       
  2050 
       
  2051     readData := testingRegistryPath valueNamed: '11'.
       
  2052     self assert: readData = 'A number name'.
       
  2053 
       
  2054     self should: [ testingRegistryPath valueNamed: 11 put: 7337] raise: Error.
       
  2055     self assert: readData = 'A number name'.
       
  2056 
  3158 
  2057     "
  3159     "
  2058      self run:#testWriteValueNamedPut_REG_DWORD_05
  3160      self run:#testWriteValueNamedPut_REG_DWORD_05
  2059      self new testWriteValueNamedPut_REG_DWORD_05
  3161      self new testWriteValueNamedPut_REG_DWORD_05
  2060     "
  3162     "
  2061 
  3163 
  2062     "Created: / 05-12-2018 / 12:29:06 / svestkap"
  3164     "Created: / 05-12-2018 / 12:29:06 / svestkap"
  2063     "Modified (format): / 07-12-2018 / 09:36:30 / svestkap"
  3165     "Modified (comment): / 01-02-2019 / 14:28:28 / svestkap"
  2064 !
  3166 !
  2065 
  3167 
  2066 testWriteValueNamedPut_REG_DWORD_06
  3168 testWriteValueNamedPut_REG_DWORD_06
  2067     "Testing if new REG_DWORD value name is written correctly via valueNamed:put:
  3169     "Testing if new REG_DWORD value name is written correctly via valueNamed:put:
  2068      Data is written and read back again."
  3170      Data is written and read back again."
  2084     "Created: / 07-12-2018 / 15:10:24 / svestkap"
  3186     "Created: / 07-12-2018 / 15:10:24 / svestkap"
  2085 !
  3187 !
  2086 
  3188 
  2087 testWriteValueNamedPut_REG_DWORD_07
  3189 testWriteValueNamedPut_REG_DWORD_07
  2088     "Testing if REG_DWORD values are written correctly via valueNamed:put: with registry type and size check"
  3190     "Testing if REG_DWORD values are written correctly via valueNamed:put: with registry type and size check"
  2089 
       
  2090     | readData testingRegistryPath registryType endianness |
  3191     | readData testingRegistryPath registryType endianness |
  2091 
  3192 
  2092     readData := Integer new.     
  3193     readData := Integer new.     
  2093     testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
  3194     testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
  2094     
  3195     
  2122      self run:#testWriteValueNamedPut_REG_DWORD_07
  3223      self run:#testWriteValueNamedPut_REG_DWORD_07
  2123      self new testWriteValueNamedPut_REG_DWORD_07
  3224      self new testWriteValueNamedPut_REG_DWORD_07
  2124     "
  3225     "
  2125 
  3226 
  2126     "Created: / 12-12-2018 / 12:13:53 / svestkap"
  3227     "Created: / 12-12-2018 / 12:13:53 / svestkap"
       
  3228     "Modified (format): / 01-02-2019 / 14:10:04 / svestkap"
  2127 !
  3229 !
  2128 
  3230 
  2129 testWriteValueNamedPut_REG_EXPAND_SZ_01
  3231 testWriteValueNamedPut_REG_EXPAND_SZ_01
  2130     "Testing if REG_EXPAND_SZ values are written correctly via valueNamed:put:
  3232     "Testing if REG_EXPAND_SZ values are written correctly via valueNamed:put:
  2131      Data is written and read back again."
  3233      Data is written and read back again."
  2132 
       
  2133     | readData testingRegistryPath |
  3234     | readData testingRegistryPath |
  2134 
  3235 
  2135     readData := Unicode16String new.    
  3236     readData := Unicode16String new.    
  2136     testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
  3237     testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
  2137     testingRegistryPath valueNamed: 'bledesu' put: '"%PATH%"' unexpandedReferences: true.
  3238     testingRegistryPath valueNamed: 'bledesu' put: '"%PATH%"' unexpandedReferences: true.
  2143      self run:#testWriteValueNamedPut_REG_EXPAND_SZ_01
  3244      self run:#testWriteValueNamedPut_REG_EXPAND_SZ_01
  2144      self new testWriteValueNamedPut_REG_EXPAND_SZ_01
  3245      self new testWriteValueNamedPut_REG_EXPAND_SZ_01
  2145     "
  3246     "
  2146 
  3247 
  2147     "Created: / 07-12-2018 / 15:08:50 / svestkap"
  3248     "Created: / 07-12-2018 / 15:08:50 / svestkap"
       
  3249     "Modified (format): / 01-02-2019 / 14:29:14 / svestkap"
  2148 !
  3250 !
  2149 
  3251 
  2150 testWriteValueNamedPut_REG_EXPAND_SZ_02
  3252 testWriteValueNamedPut_REG_EXPAND_SZ_02
  2151     "Testing if new REG_EXPAND_SZ value name is written correctly via valueNamed:put:
  3253     "Testing if new REG_EXPAND_SZ value name is written correctly via valueNamed:put:
  2152      Data is written and read back again."
  3254      Data is written and read back again."
  2153 
       
  2154     | readData testingRegistryPath |
  3255     | readData testingRegistryPath |
  2155 
  3256 
  2156     readData := Unicode16String new.    
  3257     readData := Unicode16String new.    
  2157     testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
  3258     testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
  2158     testingRegistryPath valueNamed: 'Yooooル' put: '"%PATH%"' unexpandedReferences: true.
  3259     testingRegistryPath valueNamed: 'Yooooル' put: '"%PATH%"' unexpandedReferences: true.
  2164      self run:#testWriteValueNamedPut_REG_EXPAND_SZ_02
  3265      self run:#testWriteValueNamedPut_REG_EXPAND_SZ_02
  2165      self new testWriteValueNamedPut_REG_EXPAND_SZ_02
  3266      self new testWriteValueNamedPut_REG_EXPAND_SZ_02
  2166     "
  3267     "
  2167 
  3268 
  2168     "Created: / 07-12-2018 / 15:09:14 / svestkap"
  3269     "Created: / 07-12-2018 / 15:09:14 / svestkap"
       
  3270     "Modified (format): / 01-02-2019 / 14:29:20 / svestkap"
  2169 !
  3271 !
  2170 
  3272 
  2171 testWriteValueNamedPut_REG_EXPAND_SZ_03
  3273 testWriteValueNamedPut_REG_EXPAND_SZ_03
  2172     "Testing if new REG_EXPAND_SZ value name is written correctly via valueNamed:put: with registry type and size check
  3274     "Testing if new REG_EXPAND_SZ value name is written correctly via valueNamed:put: with registry type and size check
  2173      Data is written and read back again."
  3275      Data is written and read back again."
  2194 !
  3296 !
  2195 
  3297 
  2196 testWriteValueNamedPut_REG_EXPAND_SZ_04
  3298 testWriteValueNamedPut_REG_EXPAND_SZ_04
  2197     "Testing if REG_EXPAND_SZ values are written correctly via valueNamed:put: with registry type and size check    
  3299     "Testing if REG_EXPAND_SZ values are written correctly via valueNamed:put: with registry type and size check    
  2198      Data is written and read back again (notice the registry type change #REG_SZ to #REG_EXPAND_SZ)."
  3300      Data is written and read back again (notice the registry type change #REG_SZ to #REG_EXPAND_SZ)."
  2199 
       
  2200     | readData testingRegistryPath registryType |
  3301     | readData testingRegistryPath registryType |
  2201 
  3302 
  2202     readData := Unicode16String new.    
  3303     readData := Unicode16String new.    
  2203     testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
  3304     testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
  2204     "/ checking type and size
  3305     "/ checking type and size
  2223      self run:#testWriteValueNamedPut_REG_EXPAND_SZ_04
  3324      self run:#testWriteValueNamedPut_REG_EXPAND_SZ_04
  2224      self new testWriteValueNamedPut_REG_EXPAND_SZ_04
  3325      self new testWriteValueNamedPut_REG_EXPAND_SZ_04
  2225     "
  3326     "
  2226 
  3327 
  2227     "Created: / 12-12-2018 / 13:22:25 / svestkap"
  3328     "Created: / 12-12-2018 / 13:22:25 / svestkap"
       
  3329     "Modified (format): / 01-02-2019 / 14:29:48 / svestkap"
  2228 !
  3330 !
  2229 
  3331 
  2230 testWriteValueNamedPut_REG_MULTI_SZ_01
  3332 testWriteValueNamedPut_REG_MULTI_SZ_01
  2231     "Testing if REG_MULTI_SZ values are write correctly via valueNamed:put:"
  3333     "Testing if REG_MULTI_SZ values are write correctly via valueNamed:put:"
  2232 
       
  2233     | readData testingRegistryPath |
  3334     | readData testingRegistryPath |
  2234 
  3335 
  2235     testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
  3336     testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
  2236     testingRegistryPath valueNamed: 'Font_Leelawadee UI Bold' put: #('SEGOEUIB.TTF,Segoe UI Bold,110,82' 'řeřicha - ルすしかき').
  3337     testingRegistryPath valueNamed: 'Font_Leelawadee UI Bold' put: #('SEGOEUIB.TTF,Segoe UI Bold,110,82' 'řeřicha - ルすしかき').
  2237     readData := testingRegistryPath valueNamed: 'Font_Leelawadee UI Bold'.
  3338     readData := testingRegistryPath valueNamed: 'Font_Leelawadee UI Bold'.
  2242      self run:#testWriteValueNamedPut_REG_MULTI_SZ_01
  3343      self run:#testWriteValueNamedPut_REG_MULTI_SZ_01
  2243      self new testWriteValueNamedPut_REG_MULTI_SZ_01
  3344      self new testWriteValueNamedPut_REG_MULTI_SZ_01
  2244     "
  3345     "
  2245 
  3346 
  2246     "Created: / 27-11-2018 / 09:29:57 / svestkap"
  3347     "Created: / 27-11-2018 / 09:29:57 / svestkap"
  2247     "Modified (format): / 07-12-2018 / 15:17:03 / svestkap"
  3348     "Modified (format): / 01-02-2019 / 14:30:32 / svestkap"
  2248 !
  3349 !
  2249 
  3350 
  2250 testWriteValueNamedPut_REG_MULTI_SZ_02
  3351 testWriteValueNamedPut_REG_MULTI_SZ_02
  2251     "Testing if REG_MULTI_SZ values are write correctly via valueNamed:put:
  3352     "Testing if REG_MULTI_SZ values are write correctly via valueNamed:put:
  2252     The value data could be up to available memory (in reality NOT recommended to go over 1MB).
  3353      The value data could be up to available memory (in reality NOT recommended to go over 1MB).
  2253     Testing here a 2^16 + 2 sized OrderedCollection (a reasonable compromize between size and speed)"
  3354      Testing here a 2^16 + 2 sized OrderedCollection (a reasonable trade-off between size and speed)"
  2254 
       
  2255     | testingRegistryPath testData testDataArray readData |
  3355     | testingRegistryPath testData testDataArray readData |
  2256 
  3356 
  2257     testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.    
  3357     testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.    
  2258     testData := OrderedCollection new.
  3358     testData := OrderedCollection new.
  2259     
  3359     
  2275      self run:#testWriteValueNamedPut_REG_MULTI_SZ_02
  3375      self run:#testWriteValueNamedPut_REG_MULTI_SZ_02
  2276      self new testWriteValueNamedPut_REG_MULTI_SZ_02
  3376      self new testWriteValueNamedPut_REG_MULTI_SZ_02
  2277     "
  3377     "
  2278 
  3378 
  2279     "Created: / 28-11-2018 / 14:46:55 / svestkap"
  3379     "Created: / 28-11-2018 / 14:46:55 / svestkap"
  2280     "Modified (comment): / 03-12-2018 / 09:56:15 / svestkap"
  3380     "Modified (comment): / 01-02-2019 / 14:32:22 / svestkap"
  2281 !
  3381 !
  2282 
  3382 
  2283 testWriteValueNamedPut_REG_MULTI_SZ_03
  3383 testWriteValueNamedPut_REG_MULTI_SZ_03
  2284     "Testing if REG_MULTI_SZ values are write correctly via valueNamed:put:"
  3384     "Testing if REG_MULTI_SZ an empty array is written via valueNamed:put:"
  2285 
       
  2286     | readData testingRegistryPath |
  3385     | readData testingRegistryPath |
  2287 
  3386 
  2288     testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
  3387     testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
  2289     testingRegistryPath valueNamed: 'Font_Leelawadee UI Bold' put: Array new.
  3388     testingRegistryPath valueNamed: 'Font_Leelawadee UI Bold' put: Array new.
  2290     readData := testingRegistryPath valueNamed: 'Font_Leelawadee UI Bold'.
  3389     readData := testingRegistryPath valueNamed: 'Font_Leelawadee UI Bold'.
  2296      self run:#testWriteValueNamedPut_REG_MULTI_SZ_03
  3395      self run:#testWriteValueNamedPut_REG_MULTI_SZ_03
  2297      self new testWriteValueNamedPut_REG_MULTI_SZ_03
  3396      self new testWriteValueNamedPut_REG_MULTI_SZ_03
  2298     "
  3397     "
  2299 
  3398 
  2300     "Created: / 05-12-2018 / 11:54:05 / svestkap"
  3399     "Created: / 05-12-2018 / 11:54:05 / svestkap"
  2301     "Modified (format): / 07-12-2018 / 15:17:15 / svestkap"
  3400     "Modified (comment): / 01-02-2019 / 14:33:14 / svestkap"
  2302 !
  3401 !
  2303 
  3402 
  2304 testWriteValueNamedPut_REG_MULTI_SZ_04
  3403 testWriteValueNamedPut_REG_MULTI_SZ_04
  2305     "Testing if new REG_MULTI_SZ value name is written correctly via valueNamed:put:"
  3404     "Testing if new REG_MULTI_SZ value name is written correctly via valueNamed:put:"
  2306 
       
  2307     | readData testingRegistryPath |
  3405     | readData testingRegistryPath |
  2308 
  3406 
  2309     testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
  3407     testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
  2310     testingRegistryPath valueNamed: 'new_reg_multiル' put: #('SEGOEUIB.TTF,Segoe UI Bold,110,82' 'řeřicha - ルすしかき').
  3408     testingRegistryPath valueNamed: 'new_reg_multiル' put: #('SEGOEUIB.TTF,Segoe UI Bold,110,82' 'řeřicha - ルすしかき').
  2311     readData := testingRegistryPath valueNamed: 'new_reg_multiル'.
  3409     readData := testingRegistryPath valueNamed: 'new_reg_multiル'.
  2316      self run:#testWriteValueNamedPut_REG_MULTI_SZ_04
  3414      self run:#testWriteValueNamedPut_REG_MULTI_SZ_04
  2317      self new testWriteValueNamedPut_REG_MULTI_SZ_04
  3415      self new testWriteValueNamedPut_REG_MULTI_SZ_04
  2318     "
  3416     "
  2319 
  3417 
  2320     "Created: / 07-12-2018 / 15:08:03 / svestkap"
  3418     "Created: / 07-12-2018 / 15:08:03 / svestkap"
       
  3419     "Modified (format): / 01-02-2019 / 14:33:54 / svestkap"
  2321 !
  3420 !
  2322 
  3421 
  2323 testWriteValueNamedPut_REG_MULTI_SZ_05
  3422 testWriteValueNamedPut_REG_MULTI_SZ_05
  2324     "Testing if REG_MULTI_SZ values are write correctly via valueNamed:put: with registry type and size check"
  3423     "Testing if REG_MULTI_SZ values are write correctly via valueNamed:put: with registry type and size check"
  2325 
       
  2326     | registryType readData testingRegistryPath |
  3424     | registryType readData testingRegistryPath |
  2327 
  3425 
  2328     testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
  3426     testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
  2329     testingRegistryPath valueNamed: 'Font_Leelawadee UI Bold' put: #('SEGOEUIB.TTF,Segoe UI Bold,110,82' 'řeřicha - ルすしかき').
  3427     testingRegistryPath valueNamed: 'Font_Leelawadee UI Bold' put: #('SEGOEUIB.TTF,Segoe UI Bold,110,82' 'řeřicha - ルすしかき').
  2330     readData := testingRegistryPath valueNamed: 'Font_Leelawadee UI Bold'.
  3428     readData := testingRegistryPath valueNamed: 'Font_Leelawadee UI Bold'.
  2341      self run:#testWriteValueNamedPut_REG_MULTI_SZ_05
  3439      self run:#testWriteValueNamedPut_REG_MULTI_SZ_05
  2342      self new testWriteValueNamedPut_REG_MULTI_SZ_05
  3440      self new testWriteValueNamedPut_REG_MULTI_SZ_05
  2343     "
  3441     "
  2344 
  3442 
  2345     "Created: / 12-12-2018 / 11:34:08 / svestkap"
  3443     "Created: / 12-12-2018 / 11:34:08 / svestkap"
  2346     "Modified (comment): / 12-12-2018 / 12:59:04 / svestkap"
  3444     "Modified (format): / 01-02-2019 / 14:34:22 / svestkap"
  2347 !
  3445 !
  2348 
  3446 
  2349 testWriteValueNamedPut_REG_NONE_01
  3447 testWriteValueNamedPut_REG_NONE_01
  2350     "Testing if REG_NONE values are written correctly via valueNamed:put:
  3448     "Testing if REG_NONE values are written correctly via valueNamed:put:
  2351      Data is written and read back again."
  3449      Data is written and read back again."
  2352 
       
  2353     | readData testingRegistryPath |
  3450     | readData testingRegistryPath |
  2354 
  3451 
  2355     readData := Unicode16String new.    
  3452     readData := Unicode16String new.    
  2356     testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
  3453     testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
  2357     testingRegistryPath valueNamed: 'bledesu' put: nil.
  3454     testingRegistryPath valueNamed: 'bledesu' put: nil.
  2363      self run:#testWriteValueNamedPut_REG_NONE_01
  3460      self run:#testWriteValueNamedPut_REG_NONE_01
  2364      self new testWriteValueNamedPut_REG_NONE_01
  3461      self new testWriteValueNamedPut_REG_NONE_01
  2365     "
  3462     "
  2366 
  3463 
  2367     "Created: / 07-12-2018 / 15:06:08 / svestkap"
  3464     "Created: / 07-12-2018 / 15:06:08 / svestkap"
       
  3465     "Modified (format): / 01-02-2019 / 14:34:27 / svestkap"
  2368 !
  3466 !
  2369 
  3467 
  2370 testWriteValueNamedPut_REG_NONE_02
  3468 testWriteValueNamedPut_REG_NONE_02
  2371     "Testing if new REG_NONE value name is written correctly via valueNamed:put:
  3469     "Testing if new REG_NONE value name is written correctly via valueNamed:put:
  2372      Data is written and read back again."
  3470      Data is written and read back again."
  2373 
       
  2374     | readData testingRegistryPath |
  3471     | readData testingRegistryPath |
  2375 
  3472 
  2376     readData := Unicode16String new.    
  3473     readData := Unicode16String new.    
  2377     testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
  3474     testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
  2378     testingRegistryPath valueNamed: 'New nilル name' put: nil.
  3475     testingRegistryPath valueNamed: 'New nilル name' put: nil.
  2384      self run:#testWriteValueNamedPut_REG_NONE_02
  3481      self run:#testWriteValueNamedPut_REG_NONE_02
  2385      self new testWriteValueNamedPut_REG_NONE_02
  3482      self new testWriteValueNamedPut_REG_NONE_02
  2386     "
  3483     "
  2387 
  3484 
  2388     "Created: / 07-12-2018 / 15:06:48 / svestkap"
  3485     "Created: / 07-12-2018 / 15:06:48 / svestkap"
       
  3486     "Modified (format): / 01-02-2019 / 14:34:44 / svestkap"
  2389 !
  3487 !
  2390 
  3488 
  2391 testWriteValueNamedPut_REG_NONE_03
  3489 testWriteValueNamedPut_REG_NONE_03
  2392     "Testing if new REG_NONE value name is written correctly via valueNamed:put: with registry type and size check
  3490     "Testing if new REG_NONE value name is written correctly via valueNamed:put: 
  2393      Data is written and read back again."
  3491      with registry type and size check. Data is written and read back again."
  2394 
       
  2395     | readData testingRegistryPath registryType |
  3492     | readData testingRegistryPath registryType |
  2396 
  3493 
  2397     readData := Unicode16String new.    
  3494     readData := Unicode16String new.    
  2398     testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
  3495     testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
  2399     testingRegistryPath valueNamed: 'New nilル name' put: nil.
  3496     testingRegistryPath valueNamed: 'New nilル name' put: nil.
  2410      self run:#testWriteValueNamedPut_REG_NONE_03
  3507      self run:#testWriteValueNamedPut_REG_NONE_03
  2411      self new testWriteValueNamedPut_REG_NONE_03
  3508      self new testWriteValueNamedPut_REG_NONE_03
  2412     "
  3509     "
  2413 
  3510 
  2414     "Created: / 12-12-2018 / 12:47:40 / svestkap"
  3511     "Created: / 12-12-2018 / 12:47:40 / svestkap"
       
  3512     "Modified (comment): / 01-02-2019 / 14:35:12 / svestkap"
  2415 !
  3513 !
  2416 
  3514 
  2417 testWriteValueNamedPut_REG_QWORD_01
  3515 testWriteValueNamedPut_REG_QWORD_01
  2418     "Testing if max QWORD value is written and read correctly from REG_QWORD (valueNamed:put: and valueNamed:)
  3516     "Testing if max QWORD value is written and read correctly from REG_QWORD (valueNamed:put: and valueNamed:).
  2419      Storing maximum QWORD value (0xffffffffffffffff -> 18446744073709551615(x64))   "
  3517      Storing maximum QWORD value (0xffffffffffffffff -> 18446744073709551615x64)"
  2420 
       
  2421     | readData testingRegistryPath |
  3518     | readData testingRegistryPath |
  2422 
  3519 
  2423     testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
  3520     testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
  2424     testingRegistryPath valueNamed: 'qword_max' put: 18446744073709551615.
  3521     testingRegistryPath valueNamed: 'qword_max' put: 18446744073709551615.
  2425     readData := testingRegistryPath valueNamed: 'qword_max'.
  3522     readData := testingRegistryPath valueNamed: 'qword_max'.
  2431      self new testReadValueNamed_REG_QWORD_01
  3528      self new testReadValueNamed_REG_QWORD_01
  2432     "
  3529     "
  2433 
  3530 
  2434     "Created: / 26-11-2018 / 14:54:45 / svestkap"
  3531     "Created: / 26-11-2018 / 14:54:45 / svestkap"
  2435     "Modified: / 07-12-2018 / 15:11:56 / svestkap"
  3532     "Modified: / 07-12-2018 / 15:11:56 / svestkap"
  2436     "Modified (comment): / 12-12-2018 / 12:58:31 / svestkap"
  3533     "Modified (comment): / 01-02-2019 / 14:37:55 / svestkap"
  2437 !
  3534 !
  2438 
  3535 
  2439 testWriteValueNamedPut_REG_QWORD_02
  3536 testWriteValueNamedPut_REG_QWORD_02
  2440     "Testing what happens if more then max value is stored in REG_QWORD registry type (valueNamed:put: and valueNamed:)"
  3537     "Testing what happens if more then max value is stored in REG_QWORD registry type (valueNamed:put: and valueNamed:)"
  2441 
       
  2442     | readData testingRegistryPath |
  3538     | readData testingRegistryPath |
  2443 
  3539 
  2444     testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
  3540     testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
  2445     "/ max QWORD value is: 0xff-ff-ff-ff-ff-ff-ff-ff -> 18446744073709551615 (on x64 only)
  3541     "/ max QWORD value is: 0xff-ff-ff-ff-ff-ff-ff-ff -> 18446744073709551615 (on x64 only)
  2446     testingRegistryPath valueNamed: 'qword_max' put: 18446744073709551700.
  3542     testingRegistryPath valueNamed: 'qword_max' put: 18446744073709551700.
  2455      self new testWriteValueNamedPut_REG_QWORD_02
  3551      self new testWriteValueNamedPut_REG_QWORD_02
  2456     "
  3552     "
  2457 
  3553 
  2458     "Created: / 04-12-2018 / 11:02:20 / svestkap"
  3554     "Created: / 04-12-2018 / 11:02:20 / svestkap"
  2459     "Modified: / 07-12-2018 / 15:12:12 / svestkap"
  3555     "Modified: / 07-12-2018 / 15:12:12 / svestkap"
       
  3556     "Modified (format): / 01-02-2019 / 14:36:06 / svestkap"
  2460 !
  3557 !
  2461 
  3558 
  2462 testWriteValueNamedPut_REG_QWORD_03
  3559 testWriteValueNamedPut_REG_QWORD_03
  2463     "Testing if new QWORD value name is written and read correctly from REG_QWORD (valueNamed:put: and valueNamed:)"
  3560     "Testing if new QWORD value name is written and read correctly from REG_QWORD (valueNamed:put: and valueNamed:)"
  2464 
       
  2465     | readData testingRegistryPath |
  3561     | readData testingRegistryPath |
  2466 
  3562 
  2467     readData := Unicode16String new.    
  3563     readData := Unicode16String new.    
  2468     testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
  3564     testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
  2469     testingRegistryPath valueNamed: 'qword_new_testingル' put: 18446744073709551101.
  3565     testingRegistryPath valueNamed: 'qword_new_testingル' put: 18446744073709551101.
  2475      self run:#testWriteValueNamedPut_REG_QWORD_03
  3571      self run:#testWriteValueNamedPut_REG_QWORD_03
  2476      self new testWriteValueNamedPut_REG_QWORD_03
  3572      self new testWriteValueNamedPut_REG_QWORD_03
  2477     "
  3573     "
  2478 
  3574 
  2479     "Created: / 07-12-2018 / 15:05:48 / svestkap"
  3575     "Created: / 07-12-2018 / 15:05:48 / svestkap"
       
  3576     "Modified (format): / 01-02-2019 / 14:36:20 / svestkap"
  2480 !
  3577 !
  2481 
  3578 
  2482 testWriteValueNamedPut_REG_QWORD_04
  3579 testWriteValueNamedPut_REG_QWORD_04
  2483     "Testing if max QWORD value is written and read correctly from REG_QWORD (valueNamed:put: and valueNamed:)
  3580     "Testing if max QWORD value is written and read correctly from REG_QWORD (valueNamed:put: and valueNamed:)
  2484      with registry type and size check
  3581      with registry type and size check. Storing maximum QWORD value (0xffffffffffffffff -> 18446744073709551615(x64))"
  2485      Storing maximum QWORD value (0xffffffffffffffff -> 18446744073709551615(x64)) "
       
  2486 
       
  2487     | readData testingRegistryPath registryType |
  3582     | readData testingRegistryPath registryType |
  2488 
  3583 
  2489     testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
  3584     testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
  2490     testingRegistryPath valueNamed: 'qword_max' put: 18446744073709551615.
  3585     testingRegistryPath valueNamed: 'qword_max' put: 18446744073709551615.
  2491     readData := testingRegistryPath valueNamed: 'qword_max'.
  3586     readData := testingRegistryPath valueNamed: 'qword_max'.
  2500      self run:#testWriteValueNamedPut_REG_QWORD_04
  3595      self run:#testWriteValueNamedPut_REG_QWORD_04
  2501      self new testWriteValueNamedPut_REG_QWORD_04
  3596      self new testWriteValueNamedPut_REG_QWORD_04
  2502     "
  3597     "
  2503 
  3598 
  2504     "Created: / 12-12-2018 / 12:08:35 / svestkap"
  3599     "Created: / 12-12-2018 / 12:08:35 / svestkap"
       
  3600     "Modified (comment): / 01-02-2019 / 14:36:34 / svestkap"
  2505 !
  3601 !
  2506 
  3602 
  2507 testWriteValueNamedPut_REG_QWORD_05
  3603 testWriteValueNamedPut_REG_QWORD_05
  2508     "Testing if max QWORD value is written and read correctly from REG_QWORD (valueNamed:put: and valueNamed:)
  3604     "Testing if max QWORD value is written and read correctly from REG_QWORD (valueNamed:put: and valueNamed:)
  2509      with registry type and size check.  Notice the #REG_SZ -> #REG_QWORD change
  3605      with registry type and size check.  Notice the #REG_SZ -> #REG_QWORD change.
  2510      Storing maximum QWORD value (0xffffffffffffffff -> 18446744073709551615(x64)) "
  3606      Storing maximum QWORD value (0xffffffffffffffff -> 18446744073709551615(x64))"
  2511 
       
  2512     | readData testingRegistryPath registryType |
  3607     | readData testingRegistryPath registryType |
  2513 
  3608 
  2514     testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
  3609     testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
  2515     "/ checking type and size
  3610     "/ checking type and size
  2516     registryType := testingRegistryPath valueTypeAndSize: ' ř ž č ル.          '.    
  3611     registryType := testingRegistryPath valueTypeAndSize: ' ř ž č ル.          '.    
  2534      self run:#testWriteValueNamedPut_REG_QWORD_05
  3629      self run:#testWriteValueNamedPut_REG_QWORD_05
  2535      self new testWriteValueNamedPut_REG_QWORD_05
  3630      self new testWriteValueNamedPut_REG_QWORD_05
  2536     "
  3631     "
  2537 
  3632 
  2538     "Created: / 12-12-2018 / 13:38:31 / svestkap"
  3633     "Created: / 12-12-2018 / 13:38:31 / svestkap"
       
  3634     "Modified (comment): / 01-02-2019 / 14:37:40 / svestkap"
  2539 !
  3635 !
  2540 
  3636 
  2541 testWriteValueNamedPut_REG_SZ_01
  3637 testWriteValueNamedPut_REG_SZ_01
  2542     "Testing if REG_SZ values are written correctly via valueNamed:put:
  3638     "Testing if REG_SZ values are written correctly via valueNamed:put:.
  2543      Data is written and read back again."
  3639      Data is written and read back again."
  2544 
  3640     | readData testingRegistryPath |
  2545     | readData testingRegistryPath |
  3641 
  2546 
  3642     readData := Unicode16String new.    
  2547     readData := Unicode16String new.    
  3643     testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
  2548     testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
  3644     testingRegistryPath valueNamed: 'bledesu' put: 'řeřicha - ルすしかき'.
  2549 
       
  2550     readData := testingRegistryPath valueNamed: 'bledesu'.
  3645     readData := testingRegistryPath valueNamed: 'bledesu'.
  2551     self assert: readData = '''Testing Unicode chars ř ž č ルすしかき'').          '.
  3646     
  2552     
       
  2553     "/ saving data (unicode string) into registry
       
  2554     testingRegistryPath valueNamed: 'bledesu' put: 'řeřicha - ルすしかき'.
       
  2555     
       
  2556     readData := testingRegistryPath valueNamed: 'bledesu'.
       
  2557     self assert: readData = 'řeřicha - ルすしかき'.
  3647     self assert: readData = 'řeřicha - ルすしかき'.
  2558 
  3648 
  2559     "
  3649     "
  2560      self run:#testWriteValueNamedPut_REG_SZ_01
  3650      self run:#testWriteValueNamedPut_REG_SZ_01
  2561      self new testWriteValueNamedPut_REG_SZ_01
  3651      self new testWriteValueNamedPut_REG_SZ_01
  2562     "
  3652     "
  2563 
  3653 
  2564     "Created: / 26-11-2018 / 09:51:58 / svestkap"
  3654     "Created: / 26-11-2018 / 09:51:58 / svestkap"
  2565     "Modified (comment): / 12-12-2018 / 13:53:10 / svestkap"
  3655     "Modified (comment): / 01-02-2019 / 14:38:18 / svestkap"
  2566 !
  3656 !
  2567 
  3657 
  2568 testWriteValueNamedPut_REG_SZ_02
  3658 testWriteValueNamedPut_REG_SZ_02
  2569     "Testing if REG_SZ values are written correctly via valueNamed:put:
  3659     "Testing if REG_SZ values are written correctly via valueNamed:put:. Data is written and read back again.
  2570      Data is written and read back again.
       
  2571      Note: this is testing Unicode with spaces - probably the worst combination"
  3660      Note: this is testing Unicode with spaces - probably the worst combination"
  2572 
       
  2573     | readData testingRegistryPath |
  3661     | readData testingRegistryPath |
  2574 
  3662 
  2575     readData := Unicode16String new.    
  3663     readData := Unicode16String new.    
  2576     testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
  3664     testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
  2577     testingRegistryPath valueNamed: 'しかき    ' put: 'řeřicha - ルすしかき'.
  3665     testingRegistryPath valueNamed: 'しかき    ' put: 'řeřicha - ルすしかき'.
  2578     readData := testingRegistryPath valueNamed: 'しかき    '.
  3666     readData := testingRegistryPath valueNamed: 'しかき    '.
  2579 
  3667 
  2580     self assert: readData = 'řeřicha - ルすしかき'.
  3668     self assert: readData = 'řeřicha - ルすしかき'.
  2581 
  3669 
  2582 "
  3670     "
  2583      self run:#testReadValueNamed_REG_SZ_03
  3671      self run:#testReadValueNamed_REG_SZ_03
  2584      self new testReadValueNamed_REG_SZ_03
  3672      self new testReadValueNamed_REG_SZ_03
  2585     "
  3673     "
  2586 
  3674 
  2587     "Created: / 26-11-2018 / 14:10:35 / svestkap"
  3675     "Created: / 26-11-2018 / 14:10:35 / svestkap"
  2588     "Modified (format): / 07-12-2018 / 15:17:55 / svestkap"
  3676     "Modified (format): / 01-02-2019 / 14:41:51 / svestkap"
  2589 !
  3677 !
  2590 
  3678 
  2591 testWriteValueNamedPut_REG_SZ_03
  3679 testWriteValueNamedPut_REG_SZ_03
  2592     "Testing if REG_SZ empty value is written correctly via valueNamed:put:
  3680     "Testing if REG_SZ empty value is written correctly via valueNamed:put:. Data is written and read back again.
  2593      Data is written and read back again.
       
  2594      Note: this is testing Unicode with spaces - probably the worst combination"
  3681      Note: this is testing Unicode with spaces - probably the worst combination"
  2595 
       
  2596     | readData testingRegistryPath |
  3682     | readData testingRegistryPath |
  2597 
  3683 
  2598     readData := Unicode16String new.    
  3684     readData := Unicode16String new.    
  2599     testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
  3685     testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
  2600     testingRegistryPath valueNamed: 'しかき    ' put: ''.
  3686     testingRegistryPath valueNamed: 'しかき    ' put: ''.
  2601     readData := testingRegistryPath valueNamed: 'しかき    '.
  3687     readData := testingRegistryPath valueNamed: 'しかき    '.
  2602 
  3688 
  2603     self assert: readData = ''
  3689     self assert: readData = ''
  2604 
  3690 
  2605 "
  3691     "
  2606      self run:#testWriteValueNamedPut_REG_SZ_03
  3692      self run:#testWriteValueNamedPut_REG_SZ_03
  2607      self new testWriteValueNamedPut_REG_SZ_03
  3693      self new testWriteValueNamedPut_REG_SZ_03
  2608     "
  3694     "
  2609 
  3695 
  2610     "Created: / 05-12-2018 / 10:16:59 / svestkap"
  3696     "Created: / 05-12-2018 / 10:16:59 / svestkap"
  2611     "Modified (format): / 07-12-2018 / 15:17:59 / svestkap"
  3697     "Modified (format): / 01-02-2019 / 14:41:35 / svestkap"
  2612 !
  3698 !
  2613 
  3699 
  2614 testWriteValueNamedPut_REG_SZ_04
  3700 testWriteValueNamedPut_REG_SZ_04
  2615     "Testing if REG_SZ empty value is written correctly via valueNamed:put:
  3701     "Testing if REG_SZ empty value is written correctly via valueNamed:put:. Data is written and read back again.
  2616      Data is written and read back again.
       
  2617      Note: this is testing Unicode with spaces - probably the worst combination"
  3702      Note: this is testing Unicode with spaces - probably the worst combination"
  2618 
       
  2619     | readData testingRegistryPath |
  3703     | readData testingRegistryPath |
  2620 
  3704 
  2621     readData := Unicode16String new.    
  3705     readData := Unicode16String new.    
  2622     testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
  3706     testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
  2623     testingRegistryPath valueNamed: 'bledesu' put: ''.
  3707     testingRegistryPath valueNamed: 'bledesu' put: ''.
  2624     readData := testingRegistryPath valueNamed: 'bledesu'.
  3708     readData := testingRegistryPath valueNamed: 'bledesu'.
  2625 
  3709 
  2626     self assert: readData = ''
  3710     self assert: readData = ''
  2627 
  3711 
  2628 "
  3712     "
  2629      self run:#testWriteValueNamedPut_REG_SZ_04
  3713      self run:#testWriteValueNamedPut_REG_SZ_04
  2630      self new testWriteValueNamedPut_REG_SZ_04
  3714      self new testWriteValueNamedPut_REG_SZ_04
  2631     "
  3715     "
  2632 
  3716 
  2633     "Created: / 05-12-2018 / 10:22:39 / svestkap"
  3717     "Created: / 05-12-2018 / 10:22:39 / svestkap"
  2634     "Modified (format): / 07-12-2018 / 15:18:04 / svestkap"
  3718     "Modified (format): / 01-02-2019 / 14:41:26 / svestkap"
  2635 !
  3719 !
  2636 
  3720 
  2637 testWriteValueNamedPut_REG_SZ_05
  3721 testWriteValueNamedPut_REG_SZ_05
  2638     "Testing if REG_SZ completely new value is written correctly via valueNamed:put:
  3722     "Testing if REG_SZ completely new value is written correctly via valueNamed:put:.
  2639      Data is written and read back again."
  3723      Data is written and read back again."
  2640 
       
  2641     | readData testingRegistryPath |
  3724     | readData testingRegistryPath |
  2642 
  3725 
  2643     readData := Unicode16String new.    
  3726     readData := Unicode16String new.    
  2644     testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
  3727     testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
  2645     testingRegistryPath valueNamed: 'Newル guy' put: 'Singルing'.
  3728     testingRegistryPath valueNamed: 'Newル guy' put: 'Singルing'.
  2646     readData := testingRegistryPath valueNamed: 'Newル guy'.
  3729     readData := testingRegistryPath valueNamed: 'Newル guy'.
  2647 
  3730 
  2648     self assert: readData = 'Singルing'
  3731     self assert: readData = 'Singルing'
  2649 
  3732 
  2650 "
  3733     "
  2651      self run:#testWriteValueNamedPut_REG_SZ_05
  3734      self run:#testWriteValueNamedPut_REG_SZ_05
  2652      self new testWriteValueNamedPut_REG_SZ_05
  3735      self new testWriteValueNamedPut_REG_SZ_05
  2653     "
  3736     "
  2654 
  3737 
  2655     "Created: / 07-12-2018 / 15:03:05 / svestkap"
  3738     "Created: / 07-12-2018 / 15:03:05 / svestkap"
       
  3739     "Modified (format): / 01-02-2019 / 14:40:47 / svestkap"
  2656 !
  3740 !
  2657 
  3741 
  2658 testWriteValueNamedPut_REG_SZ_06
  3742 testWriteValueNamedPut_REG_SZ_06
  2659     "Testing if REG_SZ completely new value is written correctly via valueNamed:put: with registry type and size check
  3743     "Testing if REG_SZ completely new value is written correctly via valueNamed:put: with registry type and size check
  2660      Data is written and read back again."
  3744      Data is written and read back again."
  2661 
       
  2662     | readData testingRegistryPath registryType |
  3745     | readData testingRegistryPath registryType |
  2663 
  3746 
  2664     readData := Unicode16String new.    
  3747     readData := Unicode16String new.    
  2665     testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
  3748     testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
  2666     testingRegistryPath valueNamed: 'Newル guy' put: 'Singルing'.
  3749     testingRegistryPath valueNamed: 'Newル guy' put: 'Singルing'.
  2670     self assert: registryType first equals: 8.           
  3753     self assert: registryType first equals: 8.           
  2671    
  3754    
  2672     readData := testingRegistryPath valueNamed: 'Newル guy'. 
  3755     readData := testingRegistryPath valueNamed: 'Newル guy'. 
  2673     self assert: readData = 'Singルing'
  3756     self assert: readData = 'Singルing'
  2674 
  3757 
  2675 "
  3758     "
  2676      self run:#testWriteValueNamedPut_REG_SZ_06
  3759      self run:#testWriteValueNamedPut_REG_SZ_06
  2677      self new testWriteValueNamedPut_REG_SZ_06
  3760      self new testWriteValueNamedPut_REG_SZ_06
  2678     "
  3761     "
  2679 
  3762 
  2680     "Created: / 12-12-2018 / 12:39:52 / svestkap"
  3763     "Created: / 12-12-2018 / 12:39:52 / svestkap"
       
  3764     "Modified (format): / 01-02-2019 / 14:43:29 / svestkap"
  2681 !
  3765 !
  2682 
  3766 
  2683 testWriteValueNamedPut_REG_SZ_07
  3767 testWriteValueNamedPut_REG_SZ_07
  2684     "Testing if REG_SZ values are written correctly via valueNamed:put: (notice the registry type change: #REG_MULTI_SZ to #REG_SZ)
  3768     "Testing if REG_SZ values are written correctly via valueNamed:put:. Data is written and read back again.
  2685      Data is written and read back again."
  3769      Note: the registry type change: #REG_MULTI_SZ to #REG_SZ."
  2686 
       
  2687     | readData testingRegistryPath registryType |
  3770     | readData testingRegistryPath registryType |
  2688 
  3771 
  2689     readData := Unicode16String new.    
  3772     readData := Unicode16String new.    
  2690     testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
  3773     testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
  2691     "/ reading type and size
  3774     "/ reading type and size
  2707      self run:#testWriteValueNamedPut_REG_SZ_07
  3790      self run:#testWriteValueNamedPut_REG_SZ_07
  2708      self new testWriteValueNamedPut_REG_SZ_07
  3791      self new testWriteValueNamedPut_REG_SZ_07
  2709     "
  3792     "
  2710 
  3793 
  2711     "Created: / 12-12-2018 / 13:48:00 / svestkap"
  3794     "Created: / 12-12-2018 / 13:48:00 / svestkap"
       
  3795     "Modified (comment): / 01-02-2019 / 14:44:48 / svestkap"
  2712 ! !
  3796 ! !
  2713 
  3797 
  2714 !Win32OperatingSystemTest class methodsFor:'documentation'!
  3798 !Win32OperatingSystemTest class methodsFor:'documentation'!
  2715 
  3799 
  2716 version
  3800 version