RegressionTests__Win32OperatingSystemTest.st
author Jan Vrany <jan.vrany@labware.com>
Fri, 18 Jun 2021 17:01:51 +0100
branchjv
changeset 2598 5e6256e136d4
parent 2593 773015856b61
child 2604 d6d5dfaa3e00
permissions -rwxr-xr-x
Fix `IntegerTest` Do not use #deepCopy with desctructive operations, #deepCopy on numbers is an no-op (they're immutable, except internal destructive helpers)
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2078
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
     1
"{ Encoding: utf8 }"
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
     2
1974
f2eaf05205d6 Copyright updates
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1566
diff changeset
     3
"
f2eaf05205d6 Copyright updates
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1566
diff changeset
     4
 COPYRIGHT (c) Claus Gittinger / eXept Software AG
f2eaf05205d6 Copyright updates
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1566
diff changeset
     5
 COPYRIGHT (c) 2016 Jan Vrany
f2eaf05205d6 Copyright updates
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1566
diff changeset
     6
              All Rights Reserved
f2eaf05205d6 Copyright updates
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1566
diff changeset
     7
f2eaf05205d6 Copyright updates
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1566
diff changeset
     8
 This software is furnished under a license and may be used
f2eaf05205d6 Copyright updates
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1566
diff changeset
     9
 only in accordance with the terms of that license and with the
f2eaf05205d6 Copyright updates
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1566
diff changeset
    10
 inclusion of the above copyright notice.   This software may not
f2eaf05205d6 Copyright updates
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1566
diff changeset
    11
 be provided or otherwise made available to, or used by, any
f2eaf05205d6 Copyright updates
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1566
diff changeset
    12
 other person.  No title to or ownership of the software is
f2eaf05205d6 Copyright updates
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1566
diff changeset
    13
 hereby transferred.
f2eaf05205d6 Copyright updates
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1566
diff changeset
    14
"
1447
2351db93aa5b package changes
Claus Gittinger <cg@exept.de>
parents: 1392
diff changeset
    15
"{ Package: 'stx:goodies/regression' }"
344
21c39da58029 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    16
21c39da58029 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    17
"{ NameSpace: RegressionTests }"
21c39da58029 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    18
21c39da58029 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    19
TestCase subclass:#Win32OperatingSystemTest
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
    20
	instanceVariableNames:'registryPath windowsDetailsRegistryPath'
675
f98a0bb2f639 changed: #testMutex
Stefan Vogel <sv@exept.de>
parents: 355
diff changeset
    21
	classVariableNames:''
f98a0bb2f639 changed: #testMutex
Stefan Vogel <sv@exept.de>
parents: 355
diff changeset
    22
	poolDictionaries:''
1161
3d9b4eaddcf3 category changes
Claus Gittinger <cg@exept.de>
parents: 675
diff changeset
    23
	category:'tests-Regression-RuntimeSystem'
344
21c39da58029 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    24
!
21c39da58029 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    25
1974
f2eaf05205d6 Copyright updates
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1566
diff changeset
    26
!Win32OperatingSystemTest class methodsFor:'documentation'!
f2eaf05205d6 Copyright updates
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1566
diff changeset
    27
f2eaf05205d6 Copyright updates
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1566
diff changeset
    28
copyright
f2eaf05205d6 Copyright updates
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1566
diff changeset
    29
"
f2eaf05205d6 Copyright updates
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1566
diff changeset
    30
 COPYRIGHT (c) Claus Gittinger / eXept Software AG
f2eaf05205d6 Copyright updates
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1566
diff changeset
    31
 COPYRIGHT (c) 2016 Jan Vrany
f2eaf05205d6 Copyright updates
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1566
diff changeset
    32
              All Rights Reserved
f2eaf05205d6 Copyright updates
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1566
diff changeset
    33
f2eaf05205d6 Copyright updates
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1566
diff changeset
    34
 This software is furnished under a license and may be used
f2eaf05205d6 Copyright updates
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1566
diff changeset
    35
 only in accordance with the terms of that license and with the
f2eaf05205d6 Copyright updates
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1566
diff changeset
    36
 inclusion of the above copyright notice.   This software may not
f2eaf05205d6 Copyright updates
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1566
diff changeset
    37
 be provided or otherwise made available to, or used by, any
f2eaf05205d6 Copyright updates
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1566
diff changeset
    38
 other person.  No title to or ownership of the software is
f2eaf05205d6 Copyright updates
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1566
diff changeset
    39
 hereby transferred.
f2eaf05205d6 Copyright updates
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1566
diff changeset
    40
"
f2eaf05205d6 Copyright updates
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1566
diff changeset
    41
! !
344
21c39da58029 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    42
2078
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
    43
!Win32OperatingSystemTest methodsFor:'file templates'!
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
    44
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
    45
unicodeRegistryExample
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
    46
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
    47
^  'Windows Registry Editor Version 5.00
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
    48
2593
773015856b61 Replacing the hardcoded registry path in order for the registry tests to run correctly in parallel, duh! Fixed tests that relied on the fixed size of the hardcoded path.
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2592
diff changeset
    49
[HKEY_CURRENT_USER\Software\%1]
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
    50
@="しか OMG"
2078
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
    51
"emptyToTest"=""
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
    52
"testEmptyMultiSZ"=hex(7):00,00
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
    53
"bledesu"="''Testing Unicode chars ř ž č ルすしかき'').          "
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
    54
"しかき    "="Testus gradus"
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
    55
" ř ž č ル.          "="Testing Unicode chars ř ž č ルすしかき"
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
    56
"zero"=hex:
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
    57
"non-zero"=hex:11,10
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
    58
"す    "=hex:10
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
    59
"dword_value"=dword:000023af
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
    60
"11"="A number name"
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
    61
"き"=dword:234234af
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
    62
"qwordvalue"=hex(b):ad,61,28,a3,95,0e,74,79
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
    63
"qword_max"=hex(b):ff,ff,ff,ff,ff,ff,ff,ff
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
    64
"すし"=hex(b):ef,ad,00,00,00,00,00,00
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
    65
"Font_Leelawadee UI Bold"=hex(7):53,00,45,00,47,00,4f,00,45,00,55,00,49,00,42,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
    66
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
    67
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
    68
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
    69
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
    70
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
    71
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
    72
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
    73
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
    74
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
    75
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
    76
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
    77
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
    78
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
    79
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
    80
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
    81
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
    82
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
    83
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
    84
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
    85
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
    86
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
    87
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
    88
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
    89
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
    90
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
    91
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
    92
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
    93
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
    94
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
    95
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
    96
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
    97
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
    98
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
    99
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   100
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   101
  62,00,6f,00,6c,00,00,00,00,00
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   102
"ř ž č ルすしか"=hex(7):27,00,54,00,65,00,73,00,74,00,69,00,6e,00,67,00,20,00,55,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   103
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   104
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   105
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   106
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   107
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   108
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   109
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   110
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   111
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   112
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   113
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   114
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   115
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   116
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   117
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   118
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   119
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   120
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   121
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   122
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   123
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   124
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   125
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   126
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   127
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   128
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   129
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   130
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   131
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   132
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   133
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   134
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   135
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   136
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   137
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   138
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   139
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   140
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   141
  00,00,00,00,00
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   142
"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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   143
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   144
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   145
  2e,00,20,00,20,00,20,00,20,00,20,00,20,00,20,00,20,00,20,00,20,00,00,00
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   146
" č ルすしか"=hex(2):27,00,54,00,65,00,73,00,74,00,69,00,6e,00,67,00,20,00,55,00,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   147
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   148
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   149
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   150
  00
2593
773015856b61 Replacing the hardcoded registry path in order for the registry tests to run correctly in parallel, duh! Fixed tests that relied on the fixed size of the hardcoded path.
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2592
diff changeset
   151
[HKEY_CURRENT_USER\Software\%1\ ルすしか_empty]
773015856b61 Replacing the hardcoded registry path in order for the registry tests to run correctly in parallel, duh! Fixed tests that relied on the fixed size of the hardcoded path.
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2592
diff changeset
   152
773015856b61 Replacing the hardcoded registry path in order for the registry tests to run correctly in parallel, duh! Fixed tests that relied on the fixed size of the hardcoded path.
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2592
diff changeset
   153
[HKEY_CURRENT_USER\Software\%1\ ルすしか]
2078
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   154
"bledesu"="''Testing Unicode chars ř ž č ルすしかき'').          "
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   155
"しかき    "="Testus gradus"
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   156
" ř ž č ル.          "="Testing Unicode chars ř ž č ルすしかき"
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   157
"zero"=hex:
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   158
"non-zero"=hex:11,10
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   159
"す    "=hex:10
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   160
"dword_value"=dword:000023af
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   161
"き"=dword:234234af
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   162
"qwordvalue"=hex(b):ad,61,28,a3,95,0e,74,79
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   163
"qword_max"=hex(b):ff,ff,ff,ff,ff,ff,ff,ff
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   164
"すし"=hex(b):ef,ad,00,00,00,00,00,00
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   165
"Font_Leelawadee UI Bold"=hex(7):53,00,45,00,47,00,4f,00,45,00,55,00,49,00,42,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   166
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   167
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   168
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   169
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   170
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   171
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   172
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   173
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   174
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   175
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   176
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   177
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   178
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   179
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   180
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   181
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   182
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   183
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   184
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   185
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   186
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   187
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   188
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   189
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   190
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   191
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   192
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   193
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   194
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   195
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   196
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   197
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   198
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   199
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   200
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   201
  62,00,6f,00,6c,00,00,00,00,00
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   202
"ř ž č ルすしか"=hex(7):27,00,54,00,65,00,73,00,74,00,69,00,6e,00,67,00,20,00,55,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   203
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   204
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   205
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   206
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   207
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   208
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   209
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   210
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   211
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   212
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   213
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   214
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   215
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   216
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   217
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   218
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   219
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   220
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   221
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   222
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   223
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   224
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   225
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   226
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   227
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   228
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   229
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   230
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   231
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   232
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   233
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   234
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   235
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   236
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   237
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   238
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   239
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   240
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   241
  00,00,00,00,00
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   242
"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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   243
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   244
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   245
  2e,00,20,00,20,00,20,00,20,00,20,00,20,00,20,00,20,00,20,00,20,00,00,00
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   246
" č ルすしか"=hex(2):27,00,54,00,65,00,73,00,74,00,69,00,6e,00,67,00,20,00,55,00,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   247
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   248
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   249
  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,\
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   250
  00
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   251
2593
773015856b61 Replacing the hardcoded registry path in order for the registry tests to run correctly in parallel, duh! Fixed tests that relied on the fixed size of the hardcoded path.
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2592
diff changeset
   252
[HKEY_CURRENT_USER\Software\%1\ ルすしか\256_chars_max_long|arsdfasdfjljljasdf;jl;jljsfasdfasdfljaslkdfjkasdfljalsd;jfa;lsdjflkasjdflkajsdflkjasdflkjsadlfjasldfjlsadjflksdjflksadjflkajsdflkjasdlfjalskdjflkasdjflkasdfkj;sdaf;kljkkjkklkjjjjkas|1asdfjsldfjlasdlfjlasdjfljasdlfjalsdjflajdfsdsasdfa|end]
2078
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   253
"testing"=" ルすしか"
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   254
"か"=dword:00000002
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   255
"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"
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   256
2593
773015856b61 Replacing the hardcoded registry path in order for the registry tests to run correctly in parallel, duh! Fixed tests that relied on the fixed size of the hardcoded path.
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2592
diff changeset
   257
[HKEY_CURRENT_USER\Software\%1\ ルすしか\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]
773015856b61 Replacing the hardcoded registry path in order for the registry tests to run correctly in parallel, duh! Fixed tests that relied on the fixed size of the hardcoded path.
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2592
diff changeset
   258
773015856b61 Replacing the hardcoded registry path in order for the registry tests to run correctly in parallel, duh! Fixed tests that relied on the fixed size of the hardcoded path.
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2592
diff changeset
   259
[HKEY_CURRENT_USER\Software\%1\ ルすしか\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]
773015856b61 Replacing the hardcoded registry path in order for the registry tests to run correctly in parallel, duh! Fixed tests that relied on the fixed size of the hardcoded path.
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2592
diff changeset
   260
773015856b61 Replacing the hardcoded registry path in order for the registry tests to run correctly in parallel, duh! Fixed tests that relied on the fixed size of the hardcoded path.
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2592
diff changeset
   261
[HKEY_CURRENT_USER\Software\%1\ ルすしか\256_chars_max_long|arsdfasdfjljljasdf;jl;jljsfasdfasdfljaslkdfjkasdfljalsd;jfa;lsdjflkasjdflkajsdflkjasdflkjsadlfjasldfjlsadjflksdjflksadjflkajsdflkjasdlfjalskdjflkasdjflkasdfkj;sdaf;kljkkjkklkjjjjkas|1asdfjsldfjlasdlfjlasdjfljasdlfjalsdjflajdfsdsasdfa|end\reachable]
773015856b61 Replacing the hardcoded registry path in order for the registry tests to run correctly in parallel, duh! Fixed tests that relied on the fixed size of the hardcoded path.
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2592
diff changeset
   262
773015856b61 Replacing the hardcoded registry path in order for the registry tests to run correctly in parallel, duh! Fixed tests that relied on the fixed size of the hardcoded path.
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2592
diff changeset
   263
[HKEY_CURRENT_USER\Software\%1\ ルすしか_testing_delete]
773015856b61 Replacing the hardcoded registry path in order for the registry tests to run correctly in parallel, duh! Fixed tests that relied on the fixed size of the hardcoded path.
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2592
diff changeset
   264
773015856b61 Replacing the hardcoded registry path in order for the registry tests to run correctly in parallel, duh! Fixed tests that relied on the fixed size of the hardcoded path.
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2592
diff changeset
   265
[HKEY_CURRENT_USER\Software\%1\ ルすしか_testing_delete\ughu]
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   266
"bledesu"="''Testing Unicode chars ř ž č ルすしかき'').          "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   267
"しかき    "="Testus gradus"
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   268
" ř ž č ル.          "="Testing Unicode chars ř ž č ルすしかき"
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   269
"zero"=hex:
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   270
"non-zero"=hex:11,10
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   271
"す    "=hex:10
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   272
"dword_value"=dword:000023af
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   273
"き"=dword:234234af
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   274
"qwordvalue"=hex(b):ad,61,28,a3,95,0e,74,79
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   275
"qword_max"=hex(b):ff,ff,ff,ff,ff,ff,ff,ff
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   276
"すし"=hex(b):ef,ad,00,00,00,00,00,00
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   277
"Font_Leelawadee UI Bold"=hex(7):53,00,45,00,47,00,4f,00,45,00,55,00,49,00,42,\
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   278
  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,\
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   279
  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,\
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   280
  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,\
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   281
  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,\
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   282
  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,\
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   283
  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,\
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   284
  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,\
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   285
  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,\
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   286
  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,\
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   287
  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,\
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   288
  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,\
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   289
  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,\
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   290
  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,\
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   291
  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,\
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   292
  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,\
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   293
  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,\
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   294
  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,\
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   295
  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,\
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   296
  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,\
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   297
  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,\
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   298
  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,\
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   299
  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,\
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   300
  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,\
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   301
  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,\
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   302
  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,\
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   303
  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,\
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   304
  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,\
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   305
  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,\
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   306
  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,\
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   307
  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,\
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   308
  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,\
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   309
  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,\
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   310
  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,\
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   311
  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,\
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   312
  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,\
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   313
  62,00,6f,00,6c,00,00,00,00,00
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   314
"ř ž č ルすしか"=hex(7):27,00,54,00,65,00,73,00,74,00,69,00,6e,00,67,00,20,00,55,\
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   315
  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,\
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   316
  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,\
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   317
  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,\
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   318
  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,\
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   319
  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,\
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   320
  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,\
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   321
  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,\
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   322
  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,\
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   323
  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,\
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   324
  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,\
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   325
  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,\
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   326
  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,\
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   327
  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,\
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   328
  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,\
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   329
  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,\
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   330
  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,\
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   331
  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,\
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   332
  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,\
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   333
  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,\
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   334
  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,\
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   335
  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,\
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   336
  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,\
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   337
  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,\
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   338
  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,\
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   339
  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,\
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   340
  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,\
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   341
  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,\
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   342
  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,\
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   343
  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,\
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   344
  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,\
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   345
  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,\
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   346
  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,\
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   347
  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,\
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   348
  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,\
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   349
  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,\
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   350
  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,\
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   351
  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,\
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   352
  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,\
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   353
  00,00,00,00,00
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   354
"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,\
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   355
  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,\
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   356
  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,\
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   357
  2e,00,20,00,20,00,20,00,20,00,20,00,20,00,20,00,20,00,20,00,20,00,00,00
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   358
" č ルすしか"=hex(2):27,00,54,00,65,00,73,00,74,00,69,00,6e,00,67,00,20,00,55,00,\
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   359
  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,\
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   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,\
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   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,\
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   362
  00
2593
773015856b61 Replacing the hardcoded registry path in order for the registry tests to run correctly in parallel, duh! Fixed tests that relied on the fixed size of the hardcoded path.
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2592
diff changeset
   363
[HKEY_CURRENT_USER\Software\%1\ ルすしか_testing_delete\zubr]
773015856b61 Replacing the hardcoded registry path in order for the registry tests to run correctly in parallel, duh! Fixed tests that relied on the fixed size of the hardcoded path.
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2592
diff changeset
   364
773015856b61 Replacing the hardcoded registry path in order for the registry tests to run correctly in parallel, duh! Fixed tests that relied on the fixed size of the hardcoded path.
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2592
diff changeset
   365
[HKEY_CURRENT_USER\Software\%1\ ルすしか_testing_delete\reg-none]
2086
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
   366
@=hex(0):
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
   367
2593
773015856b61 Replacing the hardcoded registry path in order for the registry tests to run correctly in parallel, duh! Fixed tests that relied on the fixed size of the hardcoded path.
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2592
diff changeset
   368
[HKEY_CURRENT_USER\Software\%1\ ルすしか_testing_delete\bobr]
773015856b61 Replacing the hardcoded registry path in order for the registry tests to run correctly in parallel, duh! Fixed tests that relied on the fixed size of the hardcoded path.
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2592
diff changeset
   369
773015856b61 Replacing the hardcoded registry path in order for the registry tests to run correctly in parallel, duh! Fixed tests that relied on the fixed size of the hardcoded path.
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2592
diff changeset
   370
[HKEY_CURRENT_USER\Software\%1\ ルすしか_testing_delete\bobr\boříččátka]
2078
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   371
'
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   372
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   373
    "Created: / 16-11-2018 / 11:24:57 / svestkap"
2593
773015856b61 Replacing the hardcoded registry path in order for the registry tests to run correctly in parallel, duh! Fixed tests that relied on the fixed size of the hardcoded path.
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2592
diff changeset
   374
    "Modified: / 16-06-2020 / 12:08:27 / svestkap"
2078
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   375
! !
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   376
344
21c39da58029 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   377
!Win32OperatingSystemTest methodsFor:'release'!
21c39da58029 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   378
1566
2ca58098256d Issue #109: Added tests for registry key creation / deletion
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1500
diff changeset
   379
setUp
2593
773015856b61 Replacing the hardcoded registry path in order for the registry tests to run correctly in parallel, duh! Fixed tests that relied on the fixed size of the hardcoded path.
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2592
diff changeset
   380
    | registryToImport randomString file returnString |
2078
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   381
2086
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
   382
    self skipIf: OperatingSystem isMSWINDOWSlike not description: 'Windows only tests (registry manipulation)'.
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
   383
    super setUp.
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
   384
    
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
   385
    windowsDetailsRegistryPath := 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion'.
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
   386
    registryToImport := self unicodeRegistryExample.
2593
773015856b61 Replacing the hardcoded registry path in order for the registry tests to run correctly in parallel, duh! Fixed tests that relied on the fixed size of the hardcoded path.
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2592
diff changeset
   387
    "/ Random is not always truly random so we add random process pid
773015856b61 Replacing the hardcoded registry path in order for the registry tests to run correctly in parallel, duh! Fixed tests that relied on the fixed size of the hardcoded path.
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2592
diff changeset
   388
    randomString := OperatingSystem getProcessId asString, '_', Random nextInteger asString.     
773015856b61 Replacing the hardcoded registry path in order for the registry tests to run correctly in parallel, duh! Fixed tests that relied on the fixed size of the hardcoded path.
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2592
diff changeset
   389
    "/ each test needs a random registry path
773015856b61 Replacing the hardcoded registry path in order for the registry tests to run correctly in parallel, duh! Fixed tests that relied on the fixed size of the hardcoded path.
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2592
diff changeset
   390
    registryToImport := registryToImport copy bindWith: 'SmalltalkX-tests_', randomString.
2078
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   391
    
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   392
    "/ registry path which will be used  
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   393
    registryPath := registryToImport 
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   394
        copyFrom: (registryToImport indexOf: $[) + 1
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   395
        to: (registryToImport indexOf: $]) - 1.       
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   396
        
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   397
    "/ temporary file which will be used for importing
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   398
    file := Filename newTemporary.
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   399
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   400
    "/ Registry export is in UTF-16LE with BOM
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   401
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   402
    " What is BOM?
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   403
      A byte order mark (BOM) consists of the character code U+FEFF at the beginning of a data stream, where it can be used as a signature 
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   404
      defining the byte order and encoding form, primarily of unmarked plaintext files. Under some higher level protocols, use of a BOM may
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   405
      be mandatory (or prohibited) in the Unicode data stream defined in that protocol."
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   406
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   407
    "/ needed to write to file as Windows Registry do UTF16-LE With Signature
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   408
    " BOM for UTF-16is:
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   409
       FE FF    UTF-16, big-endian (BE)
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   410
       FF FE    UTF-16, little-endian (LE)"
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   411
    
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   412
    "/ Writing BOM first
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   413
    file writingFileDo: [ :stream |         
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   414
       stream nextPutUtf16: (Character codePoint:16rFFFE)         
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   415
    ].    
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   416
    
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   417
    "/ this is UTF16-LE (Little Endian) Without Signature (BOM)
2592
7aa9af5b0ddb Added additional asserts into #setUp to make sure the testing environment is in expected state
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2214
diff changeset
   418
    file appendingFileDo: [ :stream | stream nextPutAllUtf16Bytes: registryToImport MSB: false ].
2078
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   419
     
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   420
    [   "/ adding registry entry so we can test it
2592
7aa9af5b0ddb Added additional asserts into #setUp to make sure the testing environment is in expected state
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2214
diff changeset
   421
        returnString := OperatingSystem getCommandOutputFrom: ('REG IMPORT ' , file asString)
2078
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   422
    ] ensure: [ file remove ].
2592
7aa9af5b0ddb Added additional asserts into #setUp to make sure the testing environment is in expected state
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2214
diff changeset
   423
    
7aa9af5b0ddb Added additional asserts into #setUp to make sure the testing environment is in expected state
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2214
diff changeset
   424
    "/ should REG IMPORT command fail the returnString is nil
7aa9af5b0ddb Added additional asserts into #setUp to make sure the testing environment is in expected state
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2214
diff changeset
   425
    self deny: returnString isNil.
7aa9af5b0ddb Added additional asserts into #setUp to make sure the testing environment is in expected state
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2214
diff changeset
   426
    "/ Check if testing registry entry was correctly created
7aa9af5b0ddb Added additional asserts into #setUp to make sure the testing environment is in expected state
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2214
diff changeset
   427
    self deny: (OperatingSystem registryEntry key: registryPath) isNil.
1566
2ca58098256d Issue #109: Added tests for registry key creation / deletion
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1500
diff changeset
   428
2ca58098256d Issue #109: Added tests for registry key creation / deletion
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1500
diff changeset
   429
    "Created: / 28-12-2016 / 22:12:14 / jv"
2593
773015856b61 Replacing the hardcoded registry path in order for the registry tests to run correctly in parallel, duh! Fixed tests that relied on the fixed size of the hardcoded path.
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2592
diff changeset
   430
    "Modified (comment): / 16-06-2020 / 16:18:38 / svestkap"
2078
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   431
!
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   432
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   433
tearDown
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   434
    self skipIf: OperatingSystem isMSWINDOWSlike not description: 'Windows specific tests'.
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   435
    super tearDown.
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   436
    
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   437
    "/ remove the added registry entry
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   438
    OperatingSystem getCommandOutputFrom:('REG DELETE "', registryPath, '" /f').
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   439
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   440
    "/ Check if testing registry was correctly deleted
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   441
    self assert: ((OperatingSystem registryEntry key: registryPath) isNil).
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   442
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   443
    "Created: / 16-11-2018 / 11:29:12 / svestkap"
344
21c39da58029 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   444
! !
21c39da58029 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   445
21c39da58029 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   446
!Win32OperatingSystemTest methodsFor:'tests'!
21c39da58029 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   447
21c39da58029 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   448
testMutex
21c39da58029 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   449
    |handle alreadyExists lastErrorCode handleAndLastErrorCode|
21c39da58029 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   450
1977
f53c1ec52418 `Win32OperatingSystemTest`: use generated mutex name to allow tests to run in parallel
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1974
diff changeset
   451
    handleAndLastErrorCode := Win32OperatingSystem createMutexNamed: UUID new printString.
344
21c39da58029 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   452
    handle := handleAndLastErrorCode first.
21c39da58029 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   453
    handle isNil ifTrue:[^ self].
21c39da58029 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   454
    lastErrorCode := handleAndLastErrorCode second.
21c39da58029 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   455
    self assert: lastErrorCode == 0.
21c39da58029 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   456
    alreadyExists := (lastErrorCode == 5 "ERROR_ACCESS_DENIED" or:[ lastErrorCode == 183 "ERROR_ALREADY_EXISTS"]).
21c39da58029 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   457
    alreadyExists ifTrue:[
1566
2ca58098256d Issue #109: Added tests for registry key creation / deletion
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1500
diff changeset
   458
        Transcript showCR: 'Mutex already exists!!'.
2ca58098256d Issue #109: Added tests for registry key creation / deletion
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1500
diff changeset
   459
        ^ self.
344
21c39da58029 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   460
    ].
1977
f53c1ec52418 `Win32OperatingSystemTest`: use generated mutex name to allow tests to run in parallel
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1974
diff changeset
   461
    [
f53c1ec52418 `Win32OperatingSystemTest`: use generated mutex name to allow tests to run in parallel
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1974
diff changeset
   462
        Transcript showCR: 'Mutex created!!'.
f53c1ec52418 `Win32OperatingSystemTest`: use generated mutex name to allow tests to run in parallel
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1974
diff changeset
   463
        Win32OperatingSystem waitForSingleObject: handle.
f53c1ec52418 `Win32OperatingSystemTest`: use generated mutex name to allow tests to run in parallel
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1974
diff changeset
   464
        Delay waitForSeconds:0.5. "/ self halt.
f53c1ec52418 `Win32OperatingSystemTest`: use generated mutex name to allow tests to run in parallel
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1974
diff changeset
   465
        Win32OperatingSystem releaseMutex: handle.
f53c1ec52418 `Win32OperatingSystemTest`: use generated mutex name to allow tests to run in parallel
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1974
diff changeset
   466
    ] ensure:[
f53c1ec52418 `Win32OperatingSystemTest`: use generated mutex name to allow tests to run in parallel
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1974
diff changeset
   467
        Win32OperatingSystem primCloseHandle: handle.
f53c1ec52418 `Win32OperatingSystemTest`: use generated mutex name to allow tests to run in parallel
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1974
diff changeset
   468
        Transcript showCR: 'Mutex closed!!'.
f53c1ec52418 `Win32OperatingSystemTest`: use generated mutex name to allow tests to run in parallel
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1974
diff changeset
   469
    ].
f53c1ec52418 `Win32OperatingSystemTest`: use generated mutex name to allow tests to run in parallel
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1974
diff changeset
   470
344
21c39da58029 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   471
21c39da58029 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   472
    "
21c39da58029 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   473
     self new testMutex
21c39da58029 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   474
    "
1566
2ca58098256d Issue #109: Added tests for registry key creation / deletion
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1500
diff changeset
   475
1977
f53c1ec52418 `Win32OperatingSystemTest`: use generated mutex name to allow tests to run in parallel
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1974
diff changeset
   476
    "Modified: / 28-06-2018 / 09:14:35 / jv"
1352
e0d857144dbf #FEATURE
Claus Gittinger <cg@exept.de>
parents: 1161
diff changeset
   477
!
e0d857144dbf #FEATURE
Claus Gittinger <cg@exept.de>
parents: 1161
diff changeset
   478
e0d857144dbf #FEATURE
Claus Gittinger <cg@exept.de>
parents: 1161
diff changeset
   479
testRegistry
e0d857144dbf #FEATURE
Claus Gittinger <cg@exept.de>
parents: 1161
diff changeset
   480
    |k hasContentType|
e0d857144dbf #FEATURE
Claus Gittinger <cg@exept.de>
parents: 1161
diff changeset
   481
e0d857144dbf #FEATURE
Claus Gittinger <cg@exept.de>
parents: 1161
diff changeset
   482
    k := OperatingSystem registryEntry key:'HKEY_CLASSES_ROOT\MIME\Database\'.
e0d857144dbf #FEATURE
Claus Gittinger <cg@exept.de>
parents: 1161
diff changeset
   483
    self assert:(k notNil).
e0d857144dbf #FEATURE
Claus Gittinger <cg@exept.de>
parents: 1161
diff changeset
   484
e0d857144dbf #FEATURE
Claus Gittinger <cg@exept.de>
parents: 1161
diff changeset
   485
    hasContentType := false.
1447
2351db93aa5b package changes
Claus Gittinger <cg@exept.de>
parents: 1392
diff changeset
   486
    k subKeyNamesAndClassesDo:[:nm :clsNm |
1566
2ca58098256d Issue #109: Added tests for registry key creation / deletion
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1500
diff changeset
   487
        "/ Transcript showCR:nm.
2ca58098256d Issue #109: Added tests for registry key creation / deletion
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1500
diff changeset
   488
        nm = 'Content Type' ifTrue:[hasContentType := true].
1352
e0d857144dbf #FEATURE
Claus Gittinger <cg@exept.de>
parents: 1161
diff changeset
   489
    ].
e0d857144dbf #FEATURE
Claus Gittinger <cg@exept.de>
parents: 1161
diff changeset
   490
    self assert:hasContentType.
e0d857144dbf #FEATURE
Claus Gittinger <cg@exept.de>
parents: 1161
diff changeset
   491
e0d857144dbf #FEATURE
Claus Gittinger <cg@exept.de>
parents: 1161
diff changeset
   492
    "/ k subKeysDo:[:k | Transcript showCR:k].
e0d857144dbf #FEATURE
Claus Gittinger <cg@exept.de>
parents: 1161
diff changeset
   493
e0d857144dbf #FEATURE
Claus Gittinger <cg@exept.de>
parents: 1161
diff changeset
   494
    "
e0d857144dbf #FEATURE
Claus Gittinger <cg@exept.de>
parents: 1161
diff changeset
   495
     self new testRegistry
e0d857144dbf #FEATURE
Claus Gittinger <cg@exept.de>
parents: 1161
diff changeset
   496
    "
1566
2ca58098256d Issue #109: Added tests for registry key creation / deletion
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1500
diff changeset
   497
2ca58098256d Issue #109: Added tests for registry key creation / deletion
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1500
diff changeset
   498
    "Modified: / 28-12-2016 / 22:13:43 / jv"
2ca58098256d Issue #109: Added tests for registry key creation / deletion
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1500
diff changeset
   499
!
2ca58098256d Issue #109: Added tests for registry key creation / deletion
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1500
diff changeset
   500
2ca58098256d Issue #109: Added tests for registry key creation / deletion
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1500
diff changeset
   501
testRegistry02a
2ca58098256d Issue #109: Added tests for registry key creation / deletion
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1500
diff changeset
   502
    | root key |
2ca58098256d Issue #109: Added tests for registry key creation / deletion
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1500
diff changeset
   503
2ca58098256d Issue #109: Added tests for registry key creation / deletion
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1500
diff changeset
   504
    root :=OperatingSystem registryEntry key:'HKEY_CURRENT_USER'.
2ca58098256d Issue #109: Added tests for registry key creation / deletion
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1500
diff changeset
   505
    root deleteSubKeyNamed: testSelector.
2ca58098256d Issue #109: Added tests for registry key creation / deletion
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1500
diff changeset
   506
2ca58098256d Issue #109: Added tests for registry key creation / deletion
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1500
diff changeset
   507
    self assert:(root subKeyNamed: testSelector) isNil.
2ca58098256d Issue #109: Added tests for registry key creation / deletion
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1500
diff changeset
   508
    self deny: (root deleteSubKeyNamed: testSelector).
2ca58098256d Issue #109: Added tests for registry key creation / deletion
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1500
diff changeset
   509
2ca58098256d Issue #109: Added tests for registry key creation / deletion
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1500
diff changeset
   510
    key := root createSubKeyNamed:testSelector.
2ca58098256d Issue #109: Added tests for registry key creation / deletion
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1500
diff changeset
   511
    self assert: key notNil.
2ca58098256d Issue #109: Added tests for registry key creation / deletion
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1500
diff changeset
   512
    self assert:(root subKeyNamed: testSelector) notNil.
2ca58098256d Issue #109: Added tests for registry key creation / deletion
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1500
diff changeset
   513
2ca58098256d Issue #109: Added tests for registry key creation / deletion
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1500
diff changeset
   514
    self assert: (root deleteSubKeyNamed:testSelector).
2ca58098256d Issue #109: Added tests for registry key creation / deletion
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1500
diff changeset
   515
    self assert:(root subKeyNamed: testSelector) isNil.
2ca58098256d Issue #109: Added tests for registry key creation / deletion
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1500
diff changeset
   516
    self deny: (root deleteSubKeyNamed: testSelector).
2ca58098256d Issue #109: Added tests for registry key creation / deletion
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1500
diff changeset
   517
2ca58098256d Issue #109: Added tests for registry key creation / deletion
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1500
diff changeset
   518
    "Created: / 28-12-2016 / 23:14:15 / jv"
2ca58098256d Issue #109: Added tests for registry key creation / deletion
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1500
diff changeset
   519
    "Modified: / 05-01-2017 / 21:45:20 / jv"
344
21c39da58029 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   520
! !
21c39da58029 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   521
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   522
!Win32OperatingSystemTest methodsFor:'tests-UnicodeCreate'!
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   523
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   524
testCreatingSubKeyNamed_01
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   525
    "Testing if new subKey is created"
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   526
    | readData testingRegistryPath readSubKeys subKeysCount |   
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   527
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   528
    testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   529
    readSubKeys := testingRegistryPath subKeys. 
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   530
    subKeysCount := readSubKeys size.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   531
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   532
    self assert: subKeysCount = 3.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   533
    "/ creating the new subKey    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   534
    readData := testingRegistryPath subKeyNamed: 'bledesu ル' flags: nil createIfAbsent: true.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   535
    "/ check if new path is with the subKeyNamed above
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   536
    self assert: (readData path copyAfterLast: $\) = 'bledesu ル' .
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   537
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   538
    readSubKeys := testingRegistryPath subKeys.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   539
    self assert: readSubKeys size = (subKeysCount + 1)
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   540
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   541
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   542
     self run:#testCreatingSubKeyNamed_01
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   543
     self new testCreatingSubKeyNamed_01
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   544
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   545
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   546
    "Created: / 07-12-2018 / 15:30:55 / svestkap"
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
   547
    "Modified: / 12-02-2019 / 14:48:57 / svestkap"
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   548
!
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   549
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   550
testCreatingSubKeyNamed_02
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   551
    "Testing if new subKey is created via createSubKeyNamed:"
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   552
    | readData testingRegistryPath readSubKeys subKeysCount |
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   553
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   554
    testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   555
    readSubKeys := testingRegistryPath subKeys. 
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   556
    subKeysCount := readSubKeys size.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   557
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   558
    self assert: subKeysCount = 3.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   559
    "/ creating the new subKey    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   560
    readData := testingRegistryPath createSubKeyNamed: 'bledesu ル'.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   561
    "/ check if new path is with the subKeyNamed above
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   562
    self assert: (readData path copyAfterLast: $\) = 'bledesu ル' .
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   563
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   564
    readSubKeys := testingRegistryPath subKeys.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   565
    self assert: readSubKeys size = (subKeysCount + 1)
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   566
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   567
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   568
     self run:#testCreatingSubKeyNamed_02
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   569
     self new testCreatingSubKeyNamed_02
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   570
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   571
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   572
    "Created: / 07-12-2018 / 15:57:09 / svestkap"
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
   573
    "Modified: / 12-02-2019 / 14:48:53 / svestkap"
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   574
!
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   575
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   576
testCreatingSubKeyNamed_Wow64_32_01
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   577
    "Testing if new subKey is created in Wow64_32 (32bit program reading 32bit registry)"
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
   578
    | windowsVersion readData testingRegistryPath readSubKeys subKeysCount |
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
   579
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
   580
    windowsVersion := Win32OperatingSystem registryEntry key: windowsDetailsRegistryPath.
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
   581
    self skipIf: (windowsVersion valueNamed: 'BuildLabEx') isNil description: 'Skipping test the registry key does not exist.  Happens in some ancient Windows (XP)'.
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
   582
    self skipIf: ((windowsVersion valueNamed: 'BuildLabEx') includesString: 'x86')  description: 'Skip test if on 32bit Windows (x86)'.  "/ amd64 for x64 Windows
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
   583
        
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   584
    testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   585
    readSubKeys := testingRegistryPath subKeys. 
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   586
    subKeysCount := readSubKeys size.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   587
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   588
    self assert: subKeysCount = 3.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   589
    "/ creating the new subKey    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   590
    readData := testingRegistryPath subKeyNamed: 'bledesu ル' flags: #KEY_WOW64_32KEY createIfAbsent: true.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   591
    "/ check if new path is with the subKeyNamed above
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   592
    self assert: (readData path copyAfterLast: $\) = 'bledesu ル' .
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   593
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   594
    readSubKeys := testingRegistryPath subKeys.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   595
    self assert: readSubKeys size = (subKeysCount + 1)
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   596
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   597
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   598
     self run:#testCreatingSubKeyNamed_Wow64_32_01
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   599
     self new testCreatingSubKeyNamed_Wow64_32_01
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   600
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   601
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   602
    "Created: / 07-12-2018 / 15:58:24 / svestkap"
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
   603
    "Modified: / 12-02-2019 / 14:47:40 / svestkap"
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   604
!
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   605
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   606
testCreatingSubKeyNamed_Wow64_32_02
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   607
    "Testing if new subKey is created in Wow64_32 (32bit program reading 32bit registry) via createSubKeyNamed:flags:"
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
   608
    | windowsVersion readData testingRegistryPath readSubKeys subKeysCount |
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
   609
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
   610
    windowsVersion := Win32OperatingSystem registryEntry key: windowsDetailsRegistryPath.
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
   611
    self skipIf: (windowsVersion valueNamed: 'BuildLabEx') isNil description: 'Skipping test the registry key does not exist.  Happens in some ancient Windows (XP)'.
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
   612
    self skipIf: ((windowsVersion valueNamed: 'BuildLabEx') includesString: 'x86')  description: 'Skip test if on 32bit Windows (x86)'.  "/ amd64 for x64 Windows
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
   613
                                                                   
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   614
    testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   615
    readSubKeys := testingRegistryPath subKeys. 
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   616
    subKeysCount := readSubKeys size.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   617
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   618
    self assert: subKeysCount = 3.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   619
    "/ creating the new subKey    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   620
    readData := testingRegistryPath createSubKeyNamed: 'bledesu ル' flags: #KEY_WOW64_32KEY.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   621
    "/ check if new path is with the subKeyNamed above
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   622
    self assert: (readData path copyAfterLast: $\) = 'bledesu ル' .
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   623
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   624
    readSubKeys := testingRegistryPath subKeys.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   625
    self assert: readSubKeys size = (subKeysCount + 1)
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   626
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   627
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   628
     self run:#testCreatingSubKeyNamed_Wow64_32_02
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   629
     self new testCreatingSubKeyNamed_Wow64_32_02
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   630
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   631
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   632
    "Created: / 07-12-2018 / 15:59:32 / svestkap"
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
   633
    "Modified: / 12-02-2019 / 14:47:57 / svestkap"
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   634
!
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   635
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   636
testCreatingSubKeyNamed_Wow64_64_01
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   637
    "Testing if new subKey is created in Wow64_32 (32bit program reading 64bit registry)"
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
   638
    | windowsVersion readData testingRegistryPath readSubKeys subKeysCount |
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
   639
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
   640
    windowsVersion := Win32OperatingSystem registryEntry key: windowsDetailsRegistryPath.
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
   641
    self skipIf: (windowsVersion valueNamed: 'BuildLabEx') isNil description: 'Skipping test the registry key does not exist.  Happens in some ancient Windows (XP)'.
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
   642
    self skipIf: ((windowsVersion valueNamed: 'BuildLabEx') includesString: 'x86')  description: 'Skip test if on 32bit Windows (x86)'.  "/ amd64 for x64 Windows
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
   643
 
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   644
    testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   645
    readSubKeys := testingRegistryPath subKeys. 
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   646
    subKeysCount := readSubKeys size.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   647
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   648
    self assert: subKeysCount = 3.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   649
    "/ creating the new subKey    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   650
    readData := testingRegistryPath subKeyNamed: 'bledesu ル' flags: #KEY_WOW64_64KEY createIfAbsent: true.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   651
    "/ check if new path is with the subKeyNamed above
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   652
    self assert: (readData path copyAfterLast: $\) = 'bledesu ル' .
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   653
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   654
    readSubKeys := testingRegistryPath subKeys.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   655
    self assert: readSubKeys size = (subKeysCount + 1)
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   656
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   657
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   658
     self run:#testCreatingSubKeyNamed_Wow64_64_01
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   659
     self new testCreatingSubKeyNamed_Wow64_64_01
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   660
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   661
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   662
    "Created: / 07-12-2018 / 15:58:38 / svestkap"
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
   663
    "Modified: / 12-02-2019 / 14:48:17 / svestkap"
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   664
!
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   665
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   666
testCreatingSubKeyNamed_Wow64_64_02
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   667
    "Testing if new subKey is created in Wow64_32 (32bit program reading 64bit registry) via createSubKeyNamed:flags:"
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
   668
    | windowsVersion readData testingRegistryPath readSubKeys subKeysCount |
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
   669
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
   670
    windowsVersion := Win32OperatingSystem registryEntry key: windowsDetailsRegistryPath.
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
   671
    self skipIf: (windowsVersion valueNamed: 'BuildLabEx') isNil description: 'Skipping test the registry key does not exist.  Happens in some ancient Windows (XP)'.
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
   672
    self skipIf: ((windowsVersion valueNamed: 'BuildLabEx') includesString: 'x86')  description: 'Skip test if on 32bit Windows (x86)'.  "/ amd64 for x64 Windows
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
   673
 
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   674
    testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   675
    readSubKeys := testingRegistryPath subKeys. 
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   676
    subKeysCount := readSubKeys size.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   677
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   678
    self assert: subKeysCount = 3.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   679
    "/ creating the new subKey    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   680
    readData := testingRegistryPath createSubKeyNamed: 'bledesu ル' flags: #KEY_WOW64_64KEY.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   681
    "/ check if new path is with the subKeyNamed above
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   682
    self assert: (readData path copyAfterLast: $\) = 'bledesu ル' .
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   683
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   684
    readSubKeys := testingRegistryPath subKeys.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   685
    self assert: readSubKeys size = (subKeysCount + 1)
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   686
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   687
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   688
     self run:#testCreatingSubKeyNamed_Wow64_64_02
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   689
     self new testCreatingSubKeyNamed_Wow64_64_02
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   690
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   691
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   692
    "Created: / 07-12-2018 / 15:59:50 / svestkap"
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
   693
    "Modified: / 12-02-2019 / 14:48:41 / svestkap"
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   694
! !
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   695
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   696
!Win32OperatingSystemTest methodsFor:'tests-UnicodeOpen'!
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   697
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   698
testOpenSubKeyNamed_01
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   699
    "Testing if an old subKey is opened"
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   700
    | readData testingRegistryPath readSubKeys subKeysCount |
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
   701
       
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   702
    testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   703
    readSubKeys := testingRegistryPath subKeys. 
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   704
    subKeysCount := readSubKeys size.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   705
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   706
    self assert: subKeysCount = 3.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   707
    "/ trying to read already existing subKey    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   708
    readData := testingRegistryPath subKeyNamed: ' ルすしか' flags: nil createIfAbsent: false.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   709
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   710
    "/ check if the existing
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   711
    self assert: (readData path copyAfterLast: $\) = ' ルすしか'.    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   712
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   713
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   714
     self run:#testOpenSubKeyNamed_01
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   715
     self new testOpenSubKeyNamed_01
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   716
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   717
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   718
    "Created: / 07-12-2018 / 15:34:21 / svestkap"
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
   719
    "Modified: / 12-02-2019 / 14:49:06 / svestkap"
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   720
!
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   721
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   722
testOpenSubKeyNamed_02
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   723
    "Testing if an old subKey is opened"
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   724
    | readData testingRegistryPath readSubKeys subKeysCount |
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   725
     
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   726
    testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   727
    readSubKeys := testingRegistryPath subKeys. 
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   728
    subKeysCount := readSubKeys size.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   729
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   730
    self assert: subKeysCount = 3.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   731
    "/ trying to read already existing subKey    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   732
    readData := testingRegistryPath subKeyNamed: ' ルすしか' flags: nil createIfAbsent: true.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   733
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   734
    "/ check if the existing
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   735
    self assert: (readData path copyAfterLast: $\) = ' ルすしか'.    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   736
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   737
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   738
     self run:#testOpenSubKeyNamed_02
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   739
     self new testOpenSubKeyNamed_02
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   740
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   741
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   742
    "Created: / 07-12-2018 / 15:36:27 / svestkap"
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
   743
    "Modified: / 12-02-2019 / 14:49:10 / svestkap"
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   744
!
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   745
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   746
testOpenSubKeyNamed_03
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   747
    "Testing if an old subKey is opened via subKeyNamed:"
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   748
    | readData testingRegistryPath readSubKeys subKeysCount |
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   749
     
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   750
    testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   751
    readSubKeys := testingRegistryPath subKeys. 
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   752
    subKeysCount := readSubKeys size.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   753
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   754
    self assert: subKeysCount = 3.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   755
    "/ trying to read already existing subKey    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   756
    readData := testingRegistryPath subKeyNamed: ' ルすしか'.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   757
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   758
    "/ check if the existing
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   759
    self assert: (readData path copyAfterLast: $\) = ' ルすしか'.    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   760
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   761
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   762
     self run:#testOpenSubKeyNamed_03
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   763
     self new testOpenSubKeyNamed_03
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   764
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   765
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   766
    "Created: / 07-12-2018 / 15:47:59 / svestkap"
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
   767
    "Modified: / 12-02-2019 / 14:49:15 / svestkap"
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   768
!
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   769
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   770
testOpenSubKeyNamed_04
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   771
    "Testing if an old subKey is opened via subKeyNamed:createIfAbsent:"
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   772
    | readData testingRegistryPath readSubKeys subKeysCount |
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   773
     
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   774
    testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   775
    readSubKeys := testingRegistryPath subKeys. 
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   776
    subKeysCount := readSubKeys size.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   777
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   778
    self assert: subKeysCount = 3.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   779
    "/ trying to read already existing subKey    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   780
    readData := testingRegistryPath subKeyNamed: ' ルすしか' createIfAbsent: true.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   781
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   782
    "/ check if the existing
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   783
    self assert: (readData path copyAfterLast: $\) = ' ルすしか'.    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   784
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   785
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   786
     self run:#testOpenSubKeyNamed_04
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   787
     self new testOpenSubKeyNamed_04
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   788
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   789
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   790
    "Created: / 07-12-2018 / 15:51:52 / svestkap"
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
   791
    "Modified: / 12-02-2019 / 14:49:20 / svestkap"
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   792
!
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   793
2086
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
   794
testOpenSubKeyNamed_05
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
   795
    "Testing an error is raised when number is used to access the subKey via subKeyNamed:createIfAbsent:"
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
   796
    | testingRegistryPath readSubKeys subKeysCount |
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
   797
     
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
   798
    testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
   799
    readSubKeys := testingRegistryPath subKeys. 
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
   800
    subKeysCount := readSubKeys size.
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
   801
    
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
   802
    self assert: subKeysCount = 3.
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
   803
    "/ trying to read already existing subKey    
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
   804
    self should: [ testingRegistryPath subKeyNamed: 11 createIfAbsent: true ] 
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
   805
         raise: Error 
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
   806
         suchThat: [ :e | e messageText = 'subKeyString is not a string!!' ]
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
   807
         
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
   808
    "
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
   809
     self run:#testOpenSubKeyNamed_05
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
   810
     self new testOpenSubKeyNamed_05
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
   811
    "
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
   812
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
   813
    "Created: / 01-02-2019 / 15:58:49 / svestkap"
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
   814
!
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
   815
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   816
testOpenSubKeyNamed_Wow64_32_01 
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   817
    "Testing if an old subKey is opened in Wow64_32 (32bit program reading 32bit registry)"
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
   818
    | windowsVersion readData testingRegistryPath readSubKeys subKeysCount |
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   819
   
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
   820
    windowsVersion := Win32OperatingSystem registryEntry key: windowsDetailsRegistryPath.
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
   821
    self skipIf: (windowsVersion valueNamed: 'BuildLabEx') isNil description: 'Skipping test the registry key does not exist.  Happens in some ancient Windows (XP)'.
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
   822
    self skipIf: ((windowsVersion valueNamed: 'BuildLabEx') includesString: 'x86')  description: 'Skip test if on 32bit Windows (x86)'.  "/ amd64 for x64 Windows
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
   823
        
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   824
    testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   825
    readSubKeys := testingRegistryPath subKeys. 
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   826
    subKeysCount := readSubKeys size.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   827
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   828
    self assert: subKeysCount = 3.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   829
    "/ trying to read already existing subKey    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   830
    readData := testingRegistryPath subKeyNamed: ' ルすしか' flags: #KEY_WOW64_32KEY createIfAbsent: false.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   831
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   832
    "/ check if the existing
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   833
    self assert: (readData path copyAfterLast: $\) = ' ルすしか'.    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   834
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   835
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   836
     self run:#testOpenSubKeyNamed_Wow64_32_01
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   837
     self new testOpenSubKeyNamed_Wow64_32_01
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   838
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   839
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   840
    "Created: / 07-12-2018 / 15:53:04 / svestkap"
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
   841
    "Modified: / 12-02-2019 / 14:47:03 / svestkap"
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   842
!
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   843
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   844
testOpenSubKeyNamed_Wow64_32_02
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   845
    "Testing if an old subKey is opened in Wow64_32 (32bit program reading 32bit registry) via subKeyNamed:flags:"
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
   846
    | windowsVersion readData testingRegistryPath readSubKeys subKeysCount |
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   847
   
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
   848
    windowsVersion := Win32OperatingSystem registryEntry key: windowsDetailsRegistryPath.
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
   849
    self skipIf: (windowsVersion valueNamed: 'BuildLabEx') isNil description: 'Skipping test the registry key does not exist.  Happens in some ancient Windows (XP)'.
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
   850
    self skipIf: ((windowsVersion valueNamed: 'BuildLabEx') includesString: 'x86')  description: 'Skip test if on 32bit Windows (x86)'.  "/ amd64 for x64 Windows
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
   851
                                                                     
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   852
    testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   853
    readSubKeys := testingRegistryPath subKeys. 
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   854
    subKeysCount := readSubKeys size.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   855
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   856
    self assert: subKeysCount = 3.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   857
    "/ trying to read already existing subKey    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   858
    readData := testingRegistryPath subKeyNamed: ' ルすしか' flags: #KEY_WOW64_32KEY.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   859
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   860
    "/ check if the existing
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   861
    self assert: (readData path copyAfterLast: $\) = ' ルすしか'.    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   862
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   863
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   864
     self run:#testOpenSubKeyNamed_Wow64_32_02
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   865
     self new testOpenSubKeyNamed_Wow64_32_02
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   866
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   867
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   868
    "Created: / 07-12-2018 / 15:54:31 / svestkap"
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
   869
    "Modified: / 12-02-2019 / 14:47:06 / svestkap"
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   870
!
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   871
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   872
testOpenSubKeyNamed_Wow64_64_01
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   873
    "Testing if an old subKey is opened in Wow64_64 (32bit program reading 64bit registry)"
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
   874
    | windowsVersion readData testingRegistryPath readSubKeys subKeysCount |
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
   875
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
   876
    windowsVersion := Win32OperatingSystem registryEntry key: windowsDetailsRegistryPath.
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
   877
    self skipIf: (windowsVersion valueNamed: 'BuildLabEx') isNil description: 'Skipping test the registry key does not exist.  Happens in some ancient Windows (XP)'.
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
   878
    self skipIf: ((windowsVersion valueNamed: 'BuildLabEx') includesString: 'x86')  description: 'Skip test if on 32bit Windows (x86)'.  "/ amd64 for x64 Windows
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
   879
                                                                    
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   880
    testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   881
    readSubKeys := testingRegistryPath subKeys. 
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   882
    subKeysCount := readSubKeys size.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   883
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   884
    self assert: subKeysCount = 3.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   885
    "/ trying to read already existing subKey    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   886
    readData := testingRegistryPath subKeyNamed: ' ルすしか' flags: #KEY_WOW64_64KEY createIfAbsent: false.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   887
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   888
    "/ check if the existing
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   889
    self assert: (readData path copyAfterLast: $\) = ' ルすしか'.    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   890
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   891
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   892
     self run:#testOpenSubKeyNamed_Wow64_64_01
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   893
     self new testOpenSubKeyNamed_Wow64_64_01
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   894
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   895
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   896
    "Created: / 07-12-2018 / 15:53:34 / svestkap"
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
   897
    "Modified: / 12-02-2019 / 14:47:09 / svestkap"
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   898
!
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   899
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   900
testOpenSubKeyNamed_Wow64_64_02
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   901
    "Testing if an old subKey is opened in Wow64_64 (32bit program reading 64bit registry) via subKeyNamed:flags:"
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
   902
    | windowsVersion readData testingRegistryPath readSubKeys subKeysCount |
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   903
   
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
   904
    windowsVersion := Win32OperatingSystem registryEntry key: windowsDetailsRegistryPath.
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
   905
    self skipIf: (windowsVersion valueNamed: 'BuildLabEx') isNil description: 'Skipping test the registry key does not exist.  Happens in some ancient Windows (XP)'.
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
   906
    self skipIf: ((windowsVersion valueNamed: 'BuildLabEx') includesString: 'x86')  description: 'Skip test if on 32bit Windows (x86)'.  "/ amd64 for x64 Windows
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
   907
                                                                    
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   908
    testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   909
    readSubKeys := testingRegistryPath subKeys. 
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   910
    subKeysCount := readSubKeys size.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   911
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   912
    self assert: subKeysCount = 3.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   913
    "/ trying to read already existing subKey    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   914
    readData := testingRegistryPath subKeyNamed: ' ルすしか' flags: #KEY_WOW64_64KEY.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   915
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   916
    "/ check if the existing
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   917
    self assert: (readData path copyAfterLast: $\) = ' ルすしか'.    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   918
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   919
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   920
     self run:#testOpenSubKeyNamed_Wow64_64_02
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   921
     self new testOpenSubKeyNamed_Wow64_64_02
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   922
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   923
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   924
    "Created: / 07-12-2018 / 15:55:07 / svestkap"
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
   925
    "Modified: / 12-02-2019 / 14:47:13 / svestkap"
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   926
!
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   927
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   928
testOpenSubKeyNamed_nonExistingWow64_32
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   929
    "Trying to read non-existing subKey in Wow64_32 (32bit program reading 32bit registry)"
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
   930
    | windowsVersion readData testingRegistryPath readSubKeys subKeysCount |
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   931
   
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
   932
    windowsVersion := Win32OperatingSystem registryEntry key: windowsDetailsRegistryPath.
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
   933
    self skipIf: (windowsVersion valueNamed: 'BuildLabEx') isNil description: 'Skipping test the registry key does not exist.  Happens in some ancient Windows (XP)'.
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
   934
    self skipIf: ((windowsVersion valueNamed: 'BuildLabEx') includesString: 'x86')  description: 'Skip test if on 32bit Windows (x86)'.  "/ amd64 for x64 Windows
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
   935
                                                                       
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   936
    testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   937
    readSubKeys := testingRegistryPath subKeys. 
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   938
    subKeysCount := readSubKeys size.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   939
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   940
    self assert: subKeysCount = 3.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   941
    "/ trying to read non-existent subKey    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   942
    readData := testingRegistryPath subKeyNamed: 'bledesu ル' flags: #KEY_WOW64_32KEY createIfAbsent: false.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   943
    "/ check if new path is with the subKeyNamed above
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   944
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   945
    self assert: readData isNil
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   946
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   947
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   948
     self run:#testOpenSubKeyNamed_nonExistingWow64_32
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   949
     self new testOpenSubKeyNamed_nonExistingWow64_32
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   950
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   951
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   952
    "Created: / 07-12-2018 / 15:44:52 / svestkap"
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
   953
    "Modified: / 12-02-2019 / 14:47:17 / svestkap"
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   954
!
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   955
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   956
testOpenSubKeyNamed_nonExistingWow64_64
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   957
    "Trying to read non-existing subKey in Wow64_32 (32bit program reading 64bit registry)"
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
   958
    | windowsVersion readData testingRegistryPath readSubKeys subKeysCount |
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   959
   
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
   960
    windowsVersion := Win32OperatingSystem registryEntry key: windowsDetailsRegistryPath.
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
   961
    self skipIf: (windowsVersion valueNamed: 'BuildLabEx') isNil description: 'Skipping test the registry key does not exist.  Happens in some ancient Windows (XP)'.
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
   962
    self skipIf: ((windowsVersion valueNamed: 'BuildLabEx') includesString: 'x86')  description: 'Skip test if on 32bit Windows (x86)'.  "/ amd64 for x64 Windows
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
   963
                                                                   
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   964
    testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   965
    readSubKeys := testingRegistryPath subKeys. 
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   966
    subKeysCount := readSubKeys size.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   967
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   968
    self assert: subKeysCount = 3.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   969
    "/ trying to read non-existent subKey    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   970
    readData := testingRegistryPath subKeyNamed: 'bledesu ル' flags: #KEY_WOW64_64KEY createIfAbsent: false.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   971
    "/ check if new path is with the subKeyNamed above
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   972
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   973
    self assert: readData isNil
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   974
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   975
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   976
     self run:#testOpenSubKeyNamed_nonExistingWow64_32
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   977
     self new testOpenSubKeyNamed_nonExistingWow64_32
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   978
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   979
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   980
    "Created: / 07-12-2018 / 15:45:42 / svestkap"
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
   981
    "Modified: / 12-02-2019 / 14:47:21 / svestkap"
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   982
!
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   983
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   984
testOpenSubKeyNamed_nonExisting_01
2086
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
   985
    "Trying to read non-existing subKey via subKeyNamed:flags:createIfAbsent:"
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   986
    | readData testingRegistryPath readSubKeys subKeysCount |
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
   987
       
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   988
    testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   989
    readSubKeys := testingRegistryPath subKeys. 
2086
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
   990
    subKeysCount := readSubKeys size.    
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
   991
    self assert: subKeysCount = 3.
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   992
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   993
    "/ trying to read non-existent subKey    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   994
    readData := testingRegistryPath subKeyNamed: 'bledesu ル' flags: nil createIfAbsent: false.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   995
    "/ check if new path is with the subKeyNamed above
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   996
    self assert: readData isNil
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   997
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   998
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   999
     self run:#testOpenSubKeyNamed_nonExisting_01
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1000
     self new testOpenSubKeyNamed_nonExisting_01
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1001
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1002
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1003
    "Created: / 07-12-2018 / 15:50:18 / svestkap"
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  1004
    "Modified: / 12-02-2019 / 14:49:32 / svestkap"
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1005
!
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1006
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1007
testOpenSubKeyNamed_nonExisting_02
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1008
    "Trying to read non-existing subKey via subKeyNamed:"
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1009
    | readData testingRegistryPath readSubKeys subKeysCount |
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1010
   
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1011
    testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1012
    readSubKeys := testingRegistryPath subKeys. 
2086
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1013
    subKeysCount := readSubKeys size.    
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1014
    self assert: subKeysCount = 3.
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1015
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1016
    "/ trying to read non-existent subKey    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1017
    readData := testingRegistryPath subKeyNamed: 'bledesu ル'.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1018
    "/ check if new path is with the subKeyNamed above
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1019
    self assert: readData isNil
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1020
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1021
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1022
     self run:#testOpenSubKeyNamed_nonExisting_02
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1023
     self new testOpenSubKeyNamed_nonExisting_02
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1024
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1025
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1026
    "Created: / 07-12-2018 / 15:50:48 / svestkap"
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  1027
    "Modified: / 12-02-2019 / 14:49:36 / svestkap"
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1028
! !
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1029
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1030
!Win32OperatingSystemTest methodsFor:'tests-unicodeDelete'!
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1031
2086
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1032
testDeleteSubKeyNamed_01
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1033
    "Testing deleting of empty subKey via deleteSubKeyNamed:"  
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1034
    | returnValue testingRegistryPath |
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1035
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1036
    testingRegistryPath := Win32OperatingSystem registryEntry key:  registryPath.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1037
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1038
    "/ if successfully deteted -> true 
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1039
    returnValue := testingRegistryPath deleteSubKeyNamed: ' ルすしか_empty'.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1040
    self assert: returnValue
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1041
 
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1042
    "
2086
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1043
     self run:#testDeleteSubKeyNamed_01
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1044
     self new testDeleteSubKeyNamed_01
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1045
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1046
2086
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1047
    "Created: / 30-01-2019 / 15:42:27 / svestkap"
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1048
    "Modified (format): / 01-02-2019 / 14:59:58 / svestkap"
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1049
!
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1050
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1051
testDeleteSubKeyNamed_02
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1052
    "Testing deleting of empty subKey via deleteSubKeyNamed:"
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1053
    | testingRegistryPath |
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1054
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1055
    testingRegistryPath := Win32OperatingSystem registryEntry key:  registryPath.
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1056
    
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1057
    self should: [ testingRegistryPath deleteSubKeyNamed: 11 ] 
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1058
         raise: Error 
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1059
         suchThat: [ :e | e messageText = 'subKeyString is not a string!!' ].            
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1060
 
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1061
    "
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1062
     self run:#testDeleteSubKeyNamed_02
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1063
     self new testDeleteSubKeyNamed_02
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1064
    "
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1065
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1066
    "Created: / 30-01-2019 / 15:42:01 / svestkap"
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1067
    "Modified (format): / 01-02-2019 / 15:00:13 / svestkap"
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1068
!
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1069
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1070
testDeleteSubKeyNamed_Wow64_32
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1071
    "Testing deleting of empty subKey via deleteSubKeyNamed: (only on x64 systems)
2086
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1072
     Wow subsystem enables running 32bit applications on 64bit windows"
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  1073
    | windowsVersion returnValue testingRegistryPath |
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  1074
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  1075
    windowsVersion := Win32OperatingSystem registryEntry key: windowsDetailsRegistryPath.
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  1076
    self skipIf: (windowsVersion valueNamed: 'BuildLabEx') isNil description: 'Skipping test the registry key does not exist.  Happens in some ancient Windows (XP)'.
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  1077
    self skipIf: ((windowsVersion valueNamed: 'BuildLabEx') includesString: 'x86')  description: 'Skip test if on 32bit Windows (x86)'.  "/ amd64 for x64 Windows
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  1078
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  1079
    testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1080
    "/ if successfully deteted -> true 
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1081
    returnValue := testingRegistryPath deleteSubKeyNamed: ' ルすしか_empty' flags:#KEY_WOW64_32KEY.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1082
    self assert: returnValue
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  1083
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1084
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1085
     self run:#testDeleteSubKeyNamed_Wow64_32
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1086
     self new testDeleteSubKeyNamed_Wow64_32
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1087
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1088
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1089
    "Created: / 07-12-2018 / 14:56:39 / svestkap"
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  1090
    "Modified: / 12-02-2019 / 14:47:25 / svestkap"
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1091
!
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1092
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1093
testDeleteSubKeyNamed_Wow64_64
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1094
    "Testing deleting of empty subKey via deleteSubKeyNamed: (only on x64 systems)
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1095
     Wow subsystem enables running 32bit applications on 64bit windows"
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  1096
    | windowsVersion returnValue testingRegistryPath |
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1097
    
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  1098
    windowsVersion := Win32OperatingSystem registryEntry key: windowsDetailsRegistryPath.
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  1099
    self skipIf: (windowsVersion valueNamed: 'BuildLabEx') isNil description: 'Skipping test the registry key does not exist.  Happens in some ancient Windows (XP)'.
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  1100
    self skipIf: ((windowsVersion valueNamed: 'BuildLabEx') includesString: 'x86')  description: 'Skip test if on 32bit Windows (x86)'.  "/ amd64 for x64 Windows
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  1101
                                                                   
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  1102
    testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.   
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1103
    "/ if successfully deteted -> true 
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1104
    returnValue := testingRegistryPath deleteSubKeyNamed: ' ルすしか_empty' flags:#KEY_WOW64_64KEY.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1105
    self assert: returnValue
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1106
 
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1107
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1108
     self run:#testDeleteSubKeyNamed_Wow64_64
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1109
     self new testDeleteSubKeyNamed_Wow64_64
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1110
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1111
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1112
    "Created: / 07-12-2018 / 14:55:03 / svestkap"
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  1113
    "Modified: / 12-02-2019 / 14:47:30 / svestkap"
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1114
!
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1115
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1116
testDeleteValueNamed_REG_BINARY
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1117
    "Testing if REG_BINARY value name is correctly deleted via deleteValueNamed:"
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1118
    | readData testingRegistryPath registryValueName deleteResult |
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1119
2086
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1120
    testingRegistryPath := Win32OperatingSystem registryEntry key: (registryPath, '\', ' ルすしか').
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1121
    registryValueName := 'non-zero'.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1122
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1123
    readData := testingRegistryPath valueNamed: registryValueName.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1124
    self assert: readData notEmptyOrNil.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1125
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1126
    deleteResult := testingRegistryPath deleteValueNamed: registryValueName.      
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1127
    self assert: deleteResult.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1128
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1129
    readData := testingRegistryPath valueNamed: registryValueName.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1130
    self assert: readData isEmptyOrNil    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1131
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1132
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1133
     self run:#testDeleteValueNamed_REG_BINARY
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1134
     self new testDeleteValueNamed_REG_BINARY
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1135
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1136
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1137
    "Created: / 06-12-2018 / 13:56:35 / svestkap"
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  1138
    "Modified: / 12-02-2019 / 14:49:58 / svestkap"
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1139
!
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1140
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1141
testDeleteValueNamed_REG_DWORD
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1142
    "Testing if REG_DWORD value name is correctly deleted via deleteValueNamed:"
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1143
    | readData testingRegistryPath registryValueName deleteResult |
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1144
2086
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1145
    testingRegistryPath := Win32OperatingSystem registryEntry key: (registryPath, '\', ' ルすしか').
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1146
    registryValueName := 'dword_value'.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1147
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1148
    readData := testingRegistryPath valueNamed: registryValueName.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1149
    self assert: readData notEmptyOrNil.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1150
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1151
    deleteResult := testingRegistryPath deleteValueNamed: registryValueName.      
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1152
    self assert: deleteResult.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1153
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1154
    readData := testingRegistryPath valueNamed: registryValueName.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1155
    self assert: readData isEmptyOrNil    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1156
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1157
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1158
     self run:#testDeleteValueNamed_REG_DWORD
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1159
     self new testDeleteValueNamed_REG_DWORD
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1160
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1161
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1162
    "Created: / 06-12-2018 / 09:09:24 / svestkap"
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  1163
    "Modified: / 12-02-2019 / 14:50:03 / svestkap"
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1164
!
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1165
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1166
testDeleteValueNamed_REG_EXPAND_SZ
2086
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1167
    "Testing if REG_EXPAND_SZ value name is correctly deleted via deleteValueNamed:"  
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1168
    | readData testingRegistryPath registryValueName deleteResult |
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1169
2086
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1170
    testingRegistryPath := Win32OperatingSystem registryEntry key: (registryPath, '\', ' ルすしか').
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1171
    registryValueName := ' č ルすしか'.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1172
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1173
    readData := testingRegistryPath valueNamed: registryValueName.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1174
    self assert: readData notEmptyOrNil.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1175
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1176
    deleteResult := testingRegistryPath deleteValueNamed: registryValueName.      
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1177
    self assert: deleteResult.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1178
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1179
    readData := testingRegistryPath valueNamed: registryValueName.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1180
    self assert: readData isEmptyOrNil    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1181
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1182
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1183
     self run:#testDeleteValueNamed_REG_EXPAND_SZ
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1184
     self new testDeleteValueNamed_REG_EXPAND_SZ
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1185
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1186
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1187
    "Created: / 06-12-2018 / 13:54:53 / svestkap"
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  1188
    "Modified: / 12-02-2019 / 14:50:06 / svestkap"
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1189
!
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1190
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1191
testDeleteValueNamed_REG_QWORD
2086
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1192
    "Testing if REG_QWORD value name is correctly deleted via deleteValueNamed:"  
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  1193
    | readData testingRegistryPath registryValueName deleteResult |        
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  1194
2086
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1195
    testingRegistryPath := Win32OperatingSystem registryEntry key: (registryPath, '\', ' ルすしか').
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1196
    registryValueName := 'qword_max'.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1197
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1198
    readData := testingRegistryPath valueNamed: registryValueName.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1199
    self assert: readData notEmptyOrNil.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1200
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1201
    deleteResult := testingRegistryPath deleteValueNamed: registryValueName.      
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1202
    self assert: deleteResult.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1203
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1204
    readData := testingRegistryPath valueNamed: registryValueName.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1205
    self assert: readData isEmptyOrNil    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1206
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1207
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1208
     self run:#testDeleteValueNamed_REG_QWORD
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1209
     self new testDeleteValueNamed_REG_QWORD
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1210
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1211
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1212
    "Created: / 06-12-2018 / 13:55:46 / svestkap"
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  1213
    "Modified: / 11-02-2019 / 13:56:54 / svestkap"
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1214
!
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1215
2086
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1216
testDeleteValueNamed_REG_SZ_01
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1217
    "Testing if REG_SZ value name is correctly deleted via deleteValueNamed:"    
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1218
    | readData testingRegistryPath registryValueName deleteResult |
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1219
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1220
    testingRegistryPath := Win32OperatingSystem registryEntry key: (registryPath, '\', ' ルすしか').
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1221
    registryValueName := ' ř ž č ル.          '.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1222
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1223
    readData := testingRegistryPath valueNamed: registryValueName.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1224
    self assert: readData notEmptyOrNil.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1225
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1226
    deleteResult := testingRegistryPath deleteValueNamed: registryValueName.      
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1227
    self assert: deleteResult.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1228
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1229
    readData := testingRegistryPath valueNamed: registryValueName.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1230
    self assert: readData isEmptyOrNil    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1231
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1232
    "
2086
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1233
     self run:#testDeleteValueNamed_REG_SZ_01
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1234
     self new testDeleteValueNamed_REG_SZ_01
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1235
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1236
2086
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1237
    "Created: / 30-01-2019 / 15:23:27 / svestkap"
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  1238
    "Modified: / 12-02-2019 / 14:50:11 / svestkap"
2086
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1239
!
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1240
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1241
testDeleteValueNamed_REG_SZ_02
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1242
    "Testing if REG_SZ value name is correctly deleted via deleteValueNamed:"    
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1243
    | readData testingRegistryPath registryValueName |
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1244
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1245
    testingRegistryPath := Win32OperatingSystem registryEntry key: (registryPath, '\', ' ルすしか').
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1246
    registryValueName := ' ř ž č ル.          '.
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1247
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1248
    readData := testingRegistryPath valueNamed: registryValueName.
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1249
    self assert: readData notEmptyOrNil.
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1250
    
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1251
    self should: [ testingRegistryPath deleteValueNamed: 88 ] 
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1252
         raise: Error
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1253
         suchThat: [ :e | e messageText = 'nameString is not a string!!' ]
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1254
         
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1255
    "
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1256
     self run:#testDeleteValueNamed_REG_SZ_02
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1257
     self new testDeleteValueNamed_REG_SZ_02
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1258
    "
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1259
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1260
    "Created: / 30-01-2019 / 15:23:10 / svestkap"
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  1261
    "Modified: / 12-02-2019 / 14:50:15 / svestkap"
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1262
!
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1263
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1264
testDeleteValueNamed_defaultValue_01
2086
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1265
    "Testing if (Default) value gets correctly deleted via deleteValueNamed:"    
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1266
    | readData registryValueName testingRegistryPath deleteResult|
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1267
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1268
    testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.        
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1269
    registryValueName := ''.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1270
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1271
    readData := testingRegistryPath valueNamed: registryValueName.    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1272
    self assert: readData notEmptyOrNil.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1273
    self assert: readData = 'しか OMG'.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1274
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1275
    deleteResult := testingRegistryPath deleteValueNamed: registryValueName.       
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1276
    self assert: deleteResult.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1277
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1278
    readData := testingRegistryPath valueNamed: registryValueName.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1279
    self assert: readData isEmptyOrNil    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1280
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1281
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1282
     self run:#testDeleteValueNamed_defaultValue_01
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1283
     self new testDeleteValueNamed_defaultValue_01
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1284
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1285
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1286
    "Created: / 06-12-2018 / 14:04:16 / svestkap"
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  1287
    "Modified: / 12-02-2019 / 14:50:19 / svestkap"
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1288
!
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1289
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1290
testDeleteValueNamed_defaultValue_02
2086
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1291
    "Testing if deleting (Default) empty gets false via deleteValueNamed:"    
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1292
    | readData registryValueName testingRegistryPath deleteResult|
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1293
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1294
    testingRegistryPath := Win32OperatingSystem registryEntry key: (registryPath, '\', ' ルすしか').       
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1295
    registryValueName := ''.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1296
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1297
    readData := testingRegistryPath valueNamed: registryValueName.    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1298
    self assert: readData isEmptyOrNil.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1299
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1300
    deleteResult := testingRegistryPath deleteValueNamed: registryValueName.       
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1301
    self assert: deleteResult not.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1302
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1303
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1304
     self run:#testDeleteValueNamed_defaultValue_02
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1305
     self new testDeleteValueNamed_defaultValue_02
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1306
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1307
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1308
    "Created: / 06-12-2018 / 14:01:38 / svestkap"
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  1309
    "Modified: / 12-02-2019 / 14:50:22 / svestkap"
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1310
!
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1311
2086
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1312
testDeleteValueNamed_nonStringValue
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1313
    "Testing if trying to delete a key with non-string name raises an error"
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1314
    | testingRegistryPath registryValueName |
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1315
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1316
    testingRegistryPath := Win32OperatingSystem registryEntry key: (registryPath, '\', ' ルすしか').
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1317
    registryValueName := 11.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1318
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1319
    self should: [ testingRegistryPath deleteValueNamed: registryValueName ] raise: Error
2086
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1320
        suchThat: [ :e | e messageText = 'nameString is not a string!!' ]    
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1321
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1322
    "
2086
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1323
     self run:#testDeleteValueNamed_nonStringValue
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1324
     self new testDeleteValueNamed_nonStringValue
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1325
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1326
2086
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1327
    "Created: / 01-02-2019 / 15:02:57 / svestkap"
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1328
! !
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1329
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1330
!Win32OperatingSystemTest methodsFor:'tests-unicodeDeleteEnumeration'!
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1331
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1332
testDeleteSubKeyNamed_deletingMultipleSubKeys
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1333
    "Testing deleting whole tree of subKeys based on subKey path size via deleteSubKeyNamed:"
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1334
    | readData returnValue testingRegistryPath |
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1335
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  1336
    readData := OrderedDictionary new.     
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1337
    testingRegistryPath := Win32OperatingSystem registryEntry key:  (registryPath, '\', ' ルすしか_testing_delete').
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1338
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1339
    testingRegistryPath allSubKeysDo: [ :subEntry |
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1340
        readData at: subEntry path put: subEntry
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1341
    ].        
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1342
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1343
    "/ sorting based on path size
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1344
    readData sort: [ :firstRegistryPath :secondRegistryPath | 
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1345
        firstRegistryPath size <  secondRegistryPath size 
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1346
    ].    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1347
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1348
    "/ sorting the path size (max -> min)
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1349
    readData reverse.      
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1350
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1351
    "/ deleting all the subKeys (even those that have some value names!!)
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1352
    readData valuesDo: [ :registryEntry |
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1353
        | tempRegistryEntry |
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1354
        tempRegistryEntry := Win32OperatingSystem registryEntry key: (registryEntry path copyUpToLast: $\).
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1355
        returnValue := tempRegistryEntry deleteSubKeyNamed: (registryEntry path copyAfterLast: $\).
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1356
        self assert: returnValue 
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1357
    ].
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1358
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1359
    "/ if successfully deteted -> true 
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1360
    testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1361
    returnValue := testingRegistryPath deleteSubKeyNamed: ' ルすしか_testing_delete'.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1362
    self assert: returnValue
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1363
 
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1364
    "
2086
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1365
     self run:#testDeleteSubKeyNamed_deletingMultipleSubKeys
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1366
     self new testDeleteSubKeyNamed_deletingMultipleSubKeys
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1367
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1368
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1369
    "Created: / 07-12-2018 / 10:54:34 / svestkap"
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  1370
    "Modified: / 12-02-2019 / 14:50:55 / svestkap"
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1371
! !
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1372
2078
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  1373
!Win32OperatingSystemTest methodsFor:'tests-unicodeRead'!
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  1374
2080
a27e62ccfc44 Issue #250: Adding tests for index methods where the index is trying to get non-existent value/subKey -> nil is returned
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2079
diff changeset
  1375
testReadSubKeyAtIndex_01
2078
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  1376
    "Reading subKeys at certain index
2086
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1377
     WARNING: subKeyAtIndex: is zero based!!!!!!"
2078
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  1378
    | readData testingRegistryPath |
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  1379
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  1380
    testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  1381
    readData := testingRegistryPath subKeyAtIndex: 0.
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  1382
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  1383
    self assert: readData notEmptyOrNil.
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  1384
    self assert: (readData path copyAfterLast: $\) = ' ルすしか'
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  1385
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  1386
    "
2080
a27e62ccfc44 Issue #250: Adding tests for index methods where the index is trying to get non-existent value/subKey -> nil is returned
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2079
diff changeset
  1387
     self run:#testReadSubKeyAtIndex_01
a27e62ccfc44 Issue #250: Adding tests for index methods where the index is trying to get non-existent value/subKey -> nil is returned
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2079
diff changeset
  1388
     self new testReadSubKeyAtIndex_01
2078
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  1389
    "
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  1390
2080
a27e62ccfc44 Issue #250: Adding tests for index methods where the index is trying to get non-existent value/subKey -> nil is returned
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2079
diff changeset
  1391
    "Created: / 11-12-2018 / 14:51:12 / svestkap"
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  1392
    "Modified (format): / 12-02-2019 / 14:51:43 / svestkap"
2078
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  1393
!
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  1394
2080
a27e62ccfc44 Issue #250: Adding tests for index methods where the index is trying to get non-existent value/subKey -> nil is returned
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2079
diff changeset
  1395
testReadSubKeyAtIndex_02
a27e62ccfc44 Issue #250: Adding tests for index methods where the index is trying to get non-existent value/subKey -> nil is returned
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2079
diff changeset
  1396
    "Reading subKeys at certain index - reading non-existent subKey
2086
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1397
     WARNING: subKeyAtIndex: is zero based!!!!!!"
2078
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  1398
    | readData testingRegistryPath |
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  1399
    
2080
a27e62ccfc44 Issue #250: Adding tests for index methods where the index is trying to get non-existent value/subKey -> nil is returned
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2079
diff changeset
  1400
    testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
a27e62ccfc44 Issue #250: Adding tests for index methods where the index is trying to get non-existent value/subKey -> nil is returned
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2079
diff changeset
  1401
    readData := testingRegistryPath subKeyAtIndex: 10.
2078
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  1402
2080
a27e62ccfc44 Issue #250: Adding tests for index methods where the index is trying to get non-existent value/subKey -> nil is returned
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2079
diff changeset
  1403
    self assert: readData isNil
2078
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  1404
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  1405
    "
2080
a27e62ccfc44 Issue #250: Adding tests for index methods where the index is trying to get non-existent value/subKey -> nil is returned
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2079
diff changeset
  1406
     self run:#testReadSubKeyAtIndex_02
a27e62ccfc44 Issue #250: Adding tests for index methods where the index is trying to get non-existent value/subKey -> nil is returned
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2079
diff changeset
  1407
     self new testReadSubKeyAtIndex_02
2078
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  1408
    "
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  1409
2080
a27e62ccfc44 Issue #250: Adding tests for index methods where the index is trying to get non-existent value/subKey -> nil is returned
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2079
diff changeset
  1410
    "Created: / 11-12-2018 / 14:49:03 / svestkap"
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  1411
    "Modified (format): / 12-02-2019 / 14:51:39 / svestkap"
2086
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1412
!
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1413
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1414
testReadSubKeyAtIndex_03
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1415
    "Reading subKeys via a String - should raise an error"
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1416
    | testingRegistryPath |
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1417
 
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1418
    testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1419
    
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1420
    self should: [ testingRegistryPath subKeyAtIndex: 'keyName' ] 
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1421
         raise: Error 
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1422
         suchThat: [ :e | e messageText = 'subKeyIndex is not an integer!!' ].               
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1423
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1424
    "
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1425
     self run:#testReadSubKeyAtIndex_03
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1426
     self new testReadSubKeyAtIndex_03
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1427
    "
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1428
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1429
    "Created: / 01-02-2019 / 15:45:35 / svestkap"
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1430
!
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1431
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1432
testReadSubKeyAtIndex_04
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1433
    "Reading subKeys via a Float - should raise an error"
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1434
    | testingRegistryPath |
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1435
 
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1436
    testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1437
    
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1438
    self should: [ testingRegistryPath subKeyAtIndex: 1.1 ] 
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1439
         raise: Error 
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1440
         suchThat: [ :e | e messageText = 'subKeyIndex is not an integer!!' ].               
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1441
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1442
    "
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1443
     self run:#testReadSubKeyAtIndex_04
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1444
     self new testReadSubKeyAtIndex_04
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1445
    "
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1446
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1447
    "Created: / 01-02-2019 / 15:48:14 / svestkap"
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1448
!
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1449
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1450
testReadSubKeyAtIndex_MaxPath
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1451
    "Reading subKeyAtIndex with max Path
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1452
     Note: This test acually breaks the limit that Microsoft specified in MSDN - registry key name should be maximum 255 characters including absolute path
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1453
       MSDN link: https://docs.microsoft.com/en-us/windows/desktop/sysinfo/registry-element-size-limits"
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1454
    | readData testingRegistryPath |
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1455
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1456
    testingRegistryPath := Win32OperatingSystem registryEntry key: 
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1457
        (registryPath,'\', ' ルすしか\256_chars_max_long|arsdfasdfjljljasdf;jl;jljsfasdfasdfljaslkdfjkasdfljalsd;jfa;lsdjflkasjdflkajsdflkjasdflkjsadlfjasldfjlsadjflksdjflksadjflkajsdflkjasdlfjalskdjflkasdjflkasdfkj;sdaf;kljkkjkklkjjjjkas|1asdfjsldfjlasdlfjlasdjfljasdlfjalsdjflajdfsdsasdfa|end').        
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1458
    
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1459
    readData := testingRegistryPath subKeyAtIndex: 0.
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1460
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1461
    self assert: readData path notEmptyOrNil.
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1462
    self assert:(readData path endsWith: '|end').    
2593
773015856b61 Replacing the hardcoded registry path in order for the registry tests to run correctly in parallel, duh! Fixed tests that relied on the fixed size of the hardcoded path.
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2592
diff changeset
  1463
       
2086
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1464
    "/ this is maximum path size which can be reached if the SubKey is reached via index
2593
773015856b61 Replacing the hardcoded registry path in order for the registry tests to run correctly in parallel, duh! Fixed tests that relied on the fixed size of the hardcoded path.
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2592
diff changeset
  1465
    self assert: (readData path copyAfterLast: $\) size = 256.
2086
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1466
    
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1467
    "
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1468
     self run:#testReadSubKeyAtIndex_MaxPath
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1469
     self new testReadSubKeyAtIndex_MaxPath
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1470
    "
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1471
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1472
    "Created: / 05-12-2018 / 12:39:54 / svestkap"
2593
773015856b61 Replacing the hardcoded registry path in order for the registry tests to run correctly in parallel, duh! Fixed tests that relied on the fixed size of the hardcoded path.
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2592
diff changeset
  1473
    "Modified (comment): / 16-06-2020 / 13:27:59 / svestkap"
2078
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  1474
!
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  1475
2080
a27e62ccfc44 Issue #250: Adding tests for index methods where the index is trying to get non-existent value/subKey -> nil is returned
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2079
diff changeset
  1476
testReadSubKeyNamesAndClassesAtIndex_01
2086
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1477
    "Reading SubKeyNamesAndClasses - reading non-existent subKey"
2078
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  1478
    | readData testingRegistryPath |
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  1479
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  1480
    testingRegistryPath := Win32OperatingSystem registryEntry key: 
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  1481
        (registryPath,'\', ' ルすしか\256_chars_max_long|arsdfasdfjljljasdf;jl;jljsfasdfasdfljaslkdfjkasdfljalsd;jfa;lsdjflkasjdflkajsdflkjasdflkjsadlfjasldfjlsadjflksdjflksadjflkajsdflkjasdlfjalskdjflkasdjflkasdfkj;sdaf;kljkkjkklkjjjjkas|1asdfjsldfjlasdlfjlasdjfljasdlfjalsdjflajdfsdsasdfa|end').        
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  1482
    
2080
a27e62ccfc44 Issue #250: Adding tests for index methods where the index is trying to get non-existent value/subKey -> nil is returned
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2079
diff changeset
  1483
    readData := testingRegistryPath subKeyNameAndClassAtIndex: 10.
2078
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  1484
2080
a27e62ccfc44 Issue #250: Adding tests for index methods where the index is trying to get non-existent value/subKey -> nil is returned
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2079
diff changeset
  1485
    self assert: readData isNil.        
2078
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  1486
    "
2080
a27e62ccfc44 Issue #250: Adding tests for index methods where the index is trying to get non-existent value/subKey -> nil is returned
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2079
diff changeset
  1487
     self run:#testReadSubKeyNamesAndClassesAtIndex_01
a27e62ccfc44 Issue #250: Adding tests for index methods where the index is trying to get non-existent value/subKey -> nil is returned
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2079
diff changeset
  1488
     self new testReadSubKeyNamesAndClassesAtIndex_01
2078
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  1489
    "
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  1490
2080
a27e62ccfc44 Issue #250: Adding tests for index methods where the index is trying to get non-existent value/subKey -> nil is returned
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2079
diff changeset
  1491
    "Created: / 11-12-2018 / 14:49:48 / svestkap"
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  1492
    "Modified: / 12-02-2019 / 14:51:56 / svestkap"
2086
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1493
!
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1494
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1495
testReadSubKeyNamesAndClassesAtIndex_02
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1496
    "Reading SubKeyNamesAndClasses via String - should raise an error"
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1497
    | testingRegistryPath |
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1498
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1499
    testingRegistryPath := Win32OperatingSystem registryEntry key: 
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1500
        (registryPath,'\', ' ルすしか\256_chars_max_long|arsdfasdfjljljasdf;jl;jljsfasdfasdfljaslkdfjkasdfljalsd;jfa;lsdjflkasjdflkajsdflkjasdflkjsadlfjasldfjlsadjflksdjflksadjflkajsdflkjasdlfjalskdjflkasdjflkasdfkj;sdaf;kljkkjkklkjjjjkas|1asdfjsldfjlasdlfjlasdjfljasdlfjalsdjflajdfsdsasdfa|end').        
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1501
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1502
    self should: [ testingRegistryPath subKeyNameAndClassAtIndex: 'asString' ] 
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1503
         raise: Error 
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1504
         suchThat: [ :e | e messageText = 'subKeyIndex is not an integer!!' ]
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1505
         
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1506
    "
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1507
     self run:#testReadSubKeyNamesAndClassesAtIndex_02
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1508
     self new testReadSubKeyNamesAndClassesAtIndex_02
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1509
    "
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1510
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1511
    "Created: / 01-02-2019 / 15:48:02 / svestkap"
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1512
!
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1513
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1514
testReadSubKeyNamesAndClassesAtIndex_03
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1515
    "Reading SubKeyNamesAndClasses via Float - should raise an error"
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1516
    | testingRegistryPath |
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1517
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1518
    testingRegistryPath := Win32OperatingSystem registryEntry key: 
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1519
        (registryPath,'\', ' ルすしか\256_chars_max_long|arsdfasdfjljljasdf;jl;jljsfasdfasdfljaslkdfjkasdfljalsd;jfa;lsdjflkasjdflkajsdflkjasdflkjsadlfjasldfjlsadjflksdjflksadjflkajsdflkjasdlfjalskdjflkasdjflkasdfkj;sdaf;kljkkjkklkjjjjkas|1asdfjsldfjlasdlfjlasdjfljasdlfjalsdjflajdfsdsasdfa|end').        
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1520
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1521
    self should: [ testingRegistryPath subKeyNameAndClassAtIndex: 1.1 ] 
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1522
         raise: Error 
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1523
         suchThat: [ :e | e messageText = 'subKeyIndex is not an integer!!' ]
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1524
         
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1525
    "
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1526
     self run:#testReadSubKeyNamesAndClassesAtIndex_03
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1527
     self new testReadSubKeyNamesAndClassesAtIndex_03
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1528
    "
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1529
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1530
    "Created: / 01-02-2019 / 15:51:03 / svestkap"
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1531
!
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1532
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1533
testReadSubKeyNamesAndClassesAtIndex_MaxPath
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1534
    "Reading SubKeyNamesAndClasses with max Path
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1535
     Note: This test acually breaks the limit that Microsoft specified in MSDN - registry key name should be maximum 255 characters including absolute path
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1536
       MSDN link: https://docs.microsoft.com/en-us/windows/desktop/sysinfo/registry-element-size-limits"
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1537
    | readData testingRegistryPath |
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1538
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1539
    testingRegistryPath := Win32OperatingSystem registryEntry key: 
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1540
        (registryPath,'\', ' ルすしか\256_chars_max_long|arsdfasdfjljljasdf;jl;jljsfasdfasdfljaslkdfjkasdfljalsd;jfa;lsdjflkasjdflkajsdflkjasdflkjsadlfjasldfjlsadjflksdjflksadjflkajsdflkjasdlfjalskdjflkasdjflkasdfkj;sdaf;kljkkjkklkjjjjkas|1asdfjsldfjlasdlfjlasdjfljasdlfjalsdjflajdfsdsasdfa|end').        
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1541
    
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1542
    readData := testingRegistryPath subKeyNameAndClassAtIndex: 0.
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1543
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1544
    self assert: readData notEmptyOrNil.
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1545
    self assert:(readData first endsWith: '|end').
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1546
    self assert: readData first = '256_chars_max_long|arsdfasdfjljljasdf;jl;jljsfasdfasdfljaslkdfjkasdfljalsd;jfa;lsdjflkasjdflkajsdflkjasdflkjsadlfjasldfjlsadjflksdjflksadjflkajsdflkjasdlfjalskdjflkasdjflkasdfkj;sdaf;kljkkjkklkjjjjkas|1asdfjsldfjlasdlfjlasdjfljasdlfjalsdjflajdfsdsasdfa|end'.        
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1547
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1548
    "/ this is maximum path size which can be reached if the SubKey is reached via index
2593
773015856b61 Replacing the hardcoded registry path in order for the registry tests to run correctly in parallel, duh! Fixed tests that relied on the fixed size of the hardcoded path.
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2592
diff changeset
  1549
    self assert: ((testingRegistryPath path copyUpTo: $-) size + readData first size) = 293.
2086
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1550
    
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1551
    "
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1552
     self run:#testReadSubKeyNamesAndClassesAtIndex_MaxPath
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1553
     self new testReadSubKeyNamesAndClassesAtIndex_MaxPath
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1554
    "
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1555
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1556
    "Created: / 05-12-2018 / 12:40:08 / svestkap"
2593
773015856b61 Replacing the hardcoded registry path in order for the registry tests to run correctly in parallel, duh! Fixed tests that relied on the fixed size of the hardcoded path.
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2592
diff changeset
  1557
    "Modified: / 16-06-2020 / 13:49:57 / svestkap"
2086
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1558
!
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1559
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1560
testReadTooLongPath
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1561
    "Trying to read too long path - nil is returned"
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1562
    | testingRegistryPath |
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1563
    
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1564
    testingRegistryPath := Win32OperatingSystem registryEntry key: 
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1565
            (registryPath,'\', ' ルすしか\256_chars_max_long|arsdfasdfjljljasdf;jl;jljsfasdfasdfljaslkdfjkasdfljalsd;jfa;lsdjflkasjdflkajsdflkjasdflkjsadlfjasldfjlsadjflksdjflksadjflkajsdflkjasdlfjalskdjflkasdjflkasdfkj;sdaf;kljkkjkklkjjjjkas|1asdfjsldfjlasdlfjlasdjfljasdlfjalsdjflajdfsdsasdfa
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1566
            |end','\','256_chars_max_long|arsdfasdfjljljasdf;jl;jljsfasdfasdfljaslkdfjkasdfljalsd;jfa;lsdjflkasjdflkajsdflkjasdflkjsadlfjasldfjlsadjflksdjflksadjflkajsdflkjasdlfjalskdjflkasdjflkasdfkj;sdaf;kljkkjkklkjjjjkas|1asdfjsldfjlasdlfjlasdjfljasdlfjalsdjflajdfsdsasdfa|end').        
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1567
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1568
    self assert: testingRegistryPath isNil            
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1569
    
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1570
    "
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1571
     self run:#testReadTooLongPath
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1572
     self new testReadTooLongPath
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1573
    "
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1574
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1575
    "Created: / 22-11-2018 / 11:19:51 / svestkap"
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1576
    "Modified (comment): / 01-02-2019 / 14:58:15 / svestkap"
2078
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  1577
!
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  1578
2080
a27e62ccfc44 Issue #250: Adding tests for index methods where the index is trying to get non-existent value/subKey -> nil is returned
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2079
diff changeset
  1579
testReadValueNameAtIndex_01
2078
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  1580
    "Reading values (#valueNameAtIndex:) at certain index
2086
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1581
     WARNING: #valueNameAtIndex: is zero based!!!!!!
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1582
     Note: This test acually breaks the limit that Microsoft specified in MSDN - registry key name should be maximum 255 characters including absolute path
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1583
       MSDN link: https://docs.microsoft.com/en-us/windows/desktop/sysinfo/registry-element-size-limits" 
2078
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  1584
    | readData testingRegistryPath |
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  1585
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  1586
    testingRegistryPath := Win32OperatingSystem registryEntry key: (registryPath,'\', ' ルすしか').
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  1587
    readData := testingRegistryPath valueNameAtIndex: 1.
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  1588
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  1589
    self assert: readData notEmptyOrNil.
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  1590
    self assert: readData = 'しかき    '
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  1591
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  1592
    "
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  1593
     self run:#testReadValueNameAtIndex
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  1594
     self new testReadValueNameAtIndex
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  1595
    "
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  1596
2080
a27e62ccfc44 Issue #250: Adding tests for index methods where the index is trying to get non-existent value/subKey -> nil is returned
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2079
diff changeset
  1597
    "Created: / 11-12-2018 / 14:54:37 / svestkap"
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  1598
    "Modified: / 12-02-2019 / 14:52:19 / svestkap"
2078
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  1599
!
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  1600
2080
a27e62ccfc44 Issue #250: Adding tests for index methods where the index is trying to get non-existent value/subKey -> nil is returned
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2079
diff changeset
  1601
testReadValueNameAtIndex_02
a27e62ccfc44 Issue #250: Adding tests for index methods where the index is trying to get non-existent value/subKey -> nil is returned
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2079
diff changeset
  1602
    "Reading values (#valueNameAtIndex:) at certain index - non-existent value" 
2078
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  1603
    | readData testingRegistryPath |
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  1604
2080
a27e62ccfc44 Issue #250: Adding tests for index methods where the index is trying to get non-existent value/subKey -> nil is returned
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2079
diff changeset
  1605
    testingRegistryPath := Win32OperatingSystem registryEntry key: (registryPath,'\', ' ルすしか').
a27e62ccfc44 Issue #250: Adding tests for index methods where the index is trying to get non-existent value/subKey -> nil is returned
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2079
diff changeset
  1606
    readData := testingRegistryPath valueNameAtIndex: 100.
2078
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  1607
2080
a27e62ccfc44 Issue #250: Adding tests for index methods where the index is trying to get non-existent value/subKey -> nil is returned
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2079
diff changeset
  1608
    self assert: readData isNil    
2078
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  1609
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  1610
    "
2080
a27e62ccfc44 Issue #250: Adding tests for index methods where the index is trying to get non-existent value/subKey -> nil is returned
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2079
diff changeset
  1611
     self run:#testReadValueNameAtIndex_02
a27e62ccfc44 Issue #250: Adding tests for index methods where the index is trying to get non-existent value/subKey -> nil is returned
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2079
diff changeset
  1612
     self new testReadValueNameAtIndex_02
2078
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  1613
    "
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  1614
2080
a27e62ccfc44 Issue #250: Adding tests for index methods where the index is trying to get non-existent value/subKey -> nil is returned
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2079
diff changeset
  1615
    "Created: / 11-12-2018 / 14:54:29 / svestkap"
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  1616
    "Modified: / 12-02-2019 / 14:52:25 / svestkap"
2086
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1617
!
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1618
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1619
testReadValueNameAtIndex_03    
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1620
    "Reading values (#valueNameAtIndex:) via String - should raise an error"
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1621
    | testingRegistryPath |
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1622
    
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1623
    testingRegistryPath := Win32OperatingSystem registryEntry key: (registryPath,'\', ' ルすしか').
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1624
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1625
    self should: [ testingRegistryPath valueNameAtIndex: 'stringInsteadOfIndex' ] 
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1626
         raise: Error 
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1627
         suchThat: [ :e | e messageText = 'valueIndex is not an integer!!' ]
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1628
                                                                                     
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1629
    "
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1630
     self run:#testReadValueNameAtIndex_03
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1631
     self new testReadValueNameAtIndex_03
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1632
    "
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1633
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1634
    "Created: / 01-02-2019 / 15:52:27 / svestkap"
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1635
!
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1636
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1637
testReadValueNameAtIndex_04    
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1638
    "Reading values (#valueNameAtIndex:) via Float - should raise an error"
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1639
    | testingRegistryPath |
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1640
    
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1641
    testingRegistryPath := Win32OperatingSystem registryEntry key: (registryPath,'\', ' ルすしか').
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1642
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1643
    self should: [ testingRegistryPath valueNameAtIndex: 1.1 ] 
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1644
         raise: Error 
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1645
         suchThat: [ :e | e messageText = 'valueIndex is not an integer!!' ]
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1646
                                                                                     
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1647
    "
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1648
     self run:#testReadValueNameAtIndex_04
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1649
     self new testReadValueNameAtIndex_04
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1650
    "
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1651
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1652
    "Created: / 01-02-2019 / 15:55:03 / svestkap"
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1653
!
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1654
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1655
testReadValueNamed_REG_BINARY_01
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1656
    "Testing if REG_BINARY values are read correctly via valueNamed:"
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1657
    | readData testingRegistryPath |
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1658
        
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1659
    testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1660
     
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1661
    readData := testingRegistryPath valueNamed: 'zero'.
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1662
        
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1663
    self assert: readData = ByteArray new.
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1664
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1665
    "
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1666
     self run:#testReadValueNamed_REG_BINARY_01
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1667
     self new testReadValueNamed_REG_BINARY_01
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1668
    "
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1669
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1670
    "Created: / 16-11-2018 / 12:37:50 / svestkap"
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1671
    "Modified (format): / 01-02-2019 / 13:28:15 / svestkap"
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1672
!
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1673
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1674
testReadValueNamed_REG_BINARY_02
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1675
    "Testing if REG_BINARY values are read correctly via valueNamed:"
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1676
    | testingRegistryPath readData readDataHex |
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1677
        
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1678
    testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1679
     
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1680
    readData := testingRegistryPath valueNamed: 'non-zero'.        
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1681
    readDataHex := readData hexPrintStringWithSeparator: $|.
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1682
    
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1683
    self assert: readData = #[17 16]. "/ ByteArray
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1684
    self assert: readDataHex = '11|10' "/ hex    
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1685
    
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1686
    "
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1687
     self run:#testReadValueNamed_REG_BINARY_02
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1688
     self new testReadValueNamed_REG_BINARY_02
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1689
    "
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1690
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1691
    "Created: / 16-11-2018 / 12:39:33 / svestkap"
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1692
    "Modified (format): / 01-02-2019 / 13:28:21 / svestkap"
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1693
!
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1694
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1695
testReadValueNamed_REG_DWORD_01
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1696
    "Testing if REG_DWORD values are read correctly via valueNamed:"
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1697
    | readData testingRegistryPath |
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  1698
        
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  1699
    testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.     
2086
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1700
    readData := testingRegistryPath valueNamed: 'dword_value'.
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1701
        
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1702
    self assert: readData = 9135.
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1703
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1704
    "
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1705
     self run:#testReadValueNamed_REG_DWORD_01
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1706
     self new testReadValueNamed_REG_DWORD_01
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1707
    "
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1708
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1709
    "Created: / 16-11-2018 / 12:24:26 / svestkap"
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  1710
    "Modified: / 12-02-2019 / 14:52:58 / svestkap"
2086
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1711
!
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1712
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1713
testReadValueNamed_REG_DWORD_02
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1714
    "Testing if REG_DWORD values are read correctly via valueNamed:"
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1715
    | readData testingRegistryPath |
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  1716
            
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  1717
    testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.     
2086
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1718
    readData := testingRegistryPath valueNamed: 'き'.
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1719
        
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1720
    self assert: readData = 591541423.
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1721
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1722
    "
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1723
     self run:#testReadValueNamed_REG_DWORD_02
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1724
     self new testReadValueNamed_REG_DWORD_02
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1725
    "
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1726
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1727
    "Created: / 16-11-2018 / 12:24:43 / svestkap"
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  1728
    "Modified: / 12-02-2019 / 14:53:05 / svestkap"
2086
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1729
!
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1730
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1731
testReadValueNamed_REG_EXPAND_SZ_01
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1732
    "Testing if REG_EXPAND_SZ values are read correctly via valueNamed:"
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1733
    | readData testingRegistryPath |
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1734
    
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  1735
    testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.     
2086
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1736
    readData := testingRegistryPath valueNamed: ' č ルすしか'.
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1737
        
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1738
    self assert: readData = '''Testing Unicode chars ř ž č ルすしかき'').          '. 
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1739
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1740
    "
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1741
     self run:#testReadValueNamed_REG_EXPAND_SZ_01
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1742
     self new testReadValueNamed_REG_EXPAND_SZ_01
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1743
    "
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1744
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1745
    "Created: / 16-11-2018 / 12:27:58 / svestkap"
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  1746
    "Modified: / 12-02-2019 / 14:53:11 / svestkap"
2086
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1747
!
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1748
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1749
testReadValueNamed_REG_EXPAND_SZ_02
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1750
    "Testing if REG_EXPAND_SZ values are read correctly via valueNamed:"
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1751
    | readData testingRegistryPath |
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1752
    
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  1753
    testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.     
2086
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1754
    readData := testingRegistryPath valueNamed: 'Ugh'.
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1755
        
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1756
    self assert: readData = '''Testing Unicode chars ř ž č ルすしかき'').          '. 
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1757
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1758
    "
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1759
     self run:#testReadValueNamed_REG_EXPAND_SZ_02
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1760
     self new testReadValueNamed_REG_EXPAND_SZ_02
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1761
    "
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1762
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1763
    "Created: / 16-11-2018 / 12:29:52 / svestkap"
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  1764
    "Modified: / 12-02-2019 / 14:53:16 / svestkap"
2086
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1765
!
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1766
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1767
testReadValueNamed_REG_MULTI_SZ_01
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1768
    "Testing if REG_MULTI_SZ values are read correctly via valueNamed:"
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1769
    | readData testingRegistryPath |
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1770
        
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1771
    testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1772
     
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1773
    readData := testingRegistryPath valueNamed: 'Font_Leelawadee UI Bold'.
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1774
        
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1775
    self assert: readData = #('SEGOEUIB.TTF,Segoe UI Bold,110,82' 'SEGOEUIB.TTF,Segoe UI Bold' 'MEIRYOB.TTC,Meiryo UI Bold,120,96' 
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1776
                              'MEIRYOB.TTC,Meiryo UI Bold' 'MSJHBD.TTC,Microsoft JhengHei UI Bold,120,96' 'MSJHBD.TTC,Microsoft JhengHei UI Bold'
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1777
                              'MSYHBD.TTC,Microsoft YaHei UI Bold,128,96' 'MSYHBD.TTC,Microsoft YaHei UI Bold' 'MALGUNBD.TTF,Malgun Gothic Bold,118,96'
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1778
                              'MALGUNBD.TTF,Malgun Gothic Bold' 'YUGOTHB.TTC,Yu Gothic UI Bold,128,96' 'YUGOTHB.TTC,Yu Gothic UI Bold' 'SEGUISYM.TTF,Segoe UI Symbol') 
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1779
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1780
    "
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1781
     self run:#testReadValueNamed_REG_MULTI_SZ_01
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1782
     self new testReadValueNamed_REG_MULTI_SZ_01
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1783
    "
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1784
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1785
    "Created: / 16-11-2018 / 12:30:24 / svestkap"
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1786
    "Modified (format): / 01-02-2019 / 13:28:46 / svestkap"
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1787
!
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1788
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1789
testReadValueNamed_REG_MULTI_SZ_02
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1790
    "Testing if REG_MULTI_SZ values are read correctly via valueNamed:"
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1791
    | readData testingRegistryPath |
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1792
        
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1793
    testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1794
     
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1795
    readData := testingRegistryPath valueNamed: 'ř ž č ルすしか'.
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1796
        
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1797
    self assert: readData = #('''Testing Unicode chars ř ž č ルすしかき'')'
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1798
                              'SEGOEUIB.TTF,Segoe UI Bold,110,82' 'SEGOEUIB.TTF,Segoe UI Bold' 'MEIRYOB.TTC,Meiryo UI Bold,120,96' 
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1799
                              'MEIRYOB.TTC,Meiryo UI Bold' 'MSJHBD.TTC,Microsoft JhengHei UI Bold,120,96' 'MSJHBD.TTC,Microsoft JhengHei UI Bold'
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1800
                              'MSYHBD.TTC,Microsoft YaHei UI Bold,128,96' 'MSYHBD.TTC,Microsoft YaHei UI Bold' 'MALGUNBD.TTF,Malgun Gothic Bold,118,96'
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1801
                              'MALGUNBD.TTF,Malgun Gothic Bold' 'YUGOTHB.TTC,Yu Gothic UI Bold,128,96' 'YUGOTHB.TTC,Yu Gothic UI Bold' 'SEGUISYM.TTF,Segoe UI Symbol') 
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1802
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1803
    "
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1804
     self run:#testReadValueNamed_REG_MULTI_SZ_02
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1805
     self new testReadValueNamed_REG_MULTI_SZ_02
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1806
    "
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1807
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1808
    "Created: / 16-11-2018 / 12:35:57 / svestkap"
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1809
    "Modified (format): / 01-02-2019 / 13:28:52 / svestkap"
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1810
!
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1811
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1812
testReadValueNamed_REG_MULTI_SZ_03
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1813
    "Testing if empty REG_MULTI_SZ value is read correctly via valueNamed:"
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1814
    | readData testingRegistryPath |
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1815
        
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1816
    testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1817
     
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1818
    readData := testingRegistryPath valueNamed: 'testEmptyMultiSZ'.
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1819
    
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1820
    self assert: readData isEmpty
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1821
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1822
    "
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1823
     self run:#testReadValueNamed_REG_MULTI_SZ_03
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1824
     self new testReadValueNamed_REG_MULTI_SZ_03
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1825
    "
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1826
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1827
    "Created: / 03-12-2018 / 10:59:48 / svestkap"
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1828
    "Modified (format): / 01-02-2019 / 13:28:58 / svestkap"
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1829
!
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1830
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1831
testReadValueNamed_REG_QWORD_01
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1832
    "Testing if REG_QWORD values are read correctly via valueNamed:.
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1833
     The read value is a QWORD maximum value"
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  1834
    | readData testingRegistryPath |    
2086
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1835
    
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  1836
    testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.    
2086
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1837
    readData := testingRegistryPath valueNamed: 'qword_max'.
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1838
        
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1839
    self assert: readData = 18446744073709551615.
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1840
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1841
    "
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1842
     self run:#testReadValueNamed_REG_QWORD_01
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1843
     self new testReadValueNamed_REG_QWORD_01
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1844
    "
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1845
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1846
    "Created: / 16-11-2018 / 12:25:47 / svestkap"
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  1847
    "Modified: / 11-02-2019 / 13:46:18 / svestkap"
2086
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1848
!
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1849
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1850
testReadValueNamed_REG_QWORD_02
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1851
    "Testing if REG_QWORD values are read correctly via valueNamed:"
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  1852
    | readData testingRegistryPath |        
2086
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1853
    
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  1854
    testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.    
2086
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1855
    readData := testingRegistryPath valueNamed: 'qwordvalue'.
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1856
        
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1857
    self assert: readData = 8751636011737964973.
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1858
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1859
    "
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1860
     self run:#testReadValueNamed_REG_QWORD_02
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1861
     self new testReadValueNamed_REG_QWORD_02
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1862
    "
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1863
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1864
    "Created: / 16-11-2018 / 12:26:23 / svestkap"
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  1865
    "Modified: / 11-02-2019 / 13:46:07 / svestkap"
2086
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1866
!
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1867
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1868
testReadValueNamed_REG_QWORD_03
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1869
    "Testing if REG_QWORD values are read correctly via valueNamed:"
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  1870
    | readData testingRegistryPath |        
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  1871
        
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  1872
    testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.    
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  1873
    readData := testingRegistryPath valueNamed: 'すし'.
2086
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1874
    
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  1875
    "/ normalize if LargeInteger    
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  1876
    readData class == LargeInteger ifTrue: [
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  1877
        readData := readData copy compressed
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  1878
    ].
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  1879
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  1880
    self assert: readData = 44527.
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  1881
    
2086
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1882
    "
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1883
     self run:#testReadValueNamed_REG_QWORD_03
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1884
     self new testReadValueNamed_REG_QWORD_03
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1885
    "
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1886
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1887
    "Created: / 16-11-2018 / 12:27:17 / svestkap"
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  1888
    "Modified (format): / 11-02-2019 / 14:17:28 / svestkap"
2086
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1889
!
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1890
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1891
testReadValueNamed_REG_SZ_01
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1892
    "Testing if REG_SZ values are read correctly via valueNamed:"
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1893
    | readData testingRegistryPath |
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1894
    
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  1895
    testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.     
2086
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1896
    readData := testingRegistryPath valueNamed: 'bledesu'.
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1897
    
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1898
    self assert: readData = '''Testing Unicode chars ř ž č ルすしかき'').          '.
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1899
    
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1900
    "
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1901
     self run:#testReadValueNamed_REG_SZ_01
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1902
     self new testReadValueNamed_REG_SZ_01
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1903
    "
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1904
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1905
    "Created: / 16-11-2018 / 12:14:59 / svestkap"
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  1906
    "Modified: / 12-02-2019 / 14:53:38 / svestkap"
2086
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1907
!
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1908
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1909
testReadValueNamed_REG_SZ_02
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1910
    "Testing if REG_SZ values are read correctly via valueNamed:"
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1911
    | readData testingRegistryPath |
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1912
    
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  1913
    testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.     
2086
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1914
    readData := testingRegistryPath valueNamed: ' ř ž č ル.          '.
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1915
        
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1916
    self assert: readData = 'Testing Unicode chars ř ž č ルすしかき'.    
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1917
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1918
    "
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1919
     self run:#testReadValueNamed_REG_SZ_02
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1920
     self new testReadValueNamed_REG_SZ_02
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1921
    "
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1922
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1923
    "Created: / 16-11-2018 / 12:15:17 / svestkap"
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  1924
    "Modified: / 12-02-2019 / 14:53:44 / svestkap"
2086
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1925
!
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1926
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1927
testReadValueNamed_REG_SZ_03
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1928
    "Testing if REG_SZ values are read correctly via valueNamed:"
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1929
    | readData testingRegistryPath |
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1930
    
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  1931
    testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.     
2086
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1932
    readData := testingRegistryPath valueNamed: 'しかき    '.
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1933
        
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1934
    self assert: readData = 'Testus gradus'.
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1935
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1936
    "
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1937
     self run:#testReadValueNamed_REG_SZ_03
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1938
     self new testReadValueNamed_REG_SZ_03
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1939
    "
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1940
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1941
    "Created: / 16-11-2018 / 12:21:59 / svestkap"
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  1942
    "Modified: / 12-02-2019 / 14:53:51 / svestkap"
2086
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1943
!
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1944
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1945
testReadValueNamed_REG_SZ_04
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1946
    "Testing if empty REG_SZ value is read correctly via valueNamed:"
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1947
    | readData testingRegistryPath |
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1948
    
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  1949
    testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.     
2086
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1950
    readData := testingRegistryPath valueNamed: 'emptyToTest'.
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1951
    
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1952
    self assert: readData isEmpty.
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1953
    
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1954
    "
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1955
     self run:#testReadValueNamed_REG_SZ_04
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1956
     self new testReadValueNamed_REG_SZ_04
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1957
    "
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1958
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1959
    "Created: / 03-12-2018 / 10:56:11 / svestkap"
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  1960
    "Modified: / 12-02-2019 / 14:53:56 / svestkap"
2086
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1961
!
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1962
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1963
testReadValueNamed_nonStringValue
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1964
    "Testing reading non-string value from Registry via valueNamed raises an error"    
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1965
    | testingRegistryPath |
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1966
        
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1967
    testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1968
    self should: [ testingRegistryPath valueNamed: 11 ] 
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1969
         raise: Error 
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1970
         suchThat: [ :e | e messageText = 'nameString is not a string!!' ].        
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1971
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1972
    "
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1973
     self run:#testReadValueNamed_nonStringValue
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1974
     self new testReadValueNamed_nonStringValue
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1975
    "
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1976
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1977
    "Created: / 05-12-2018 / 12:40:31 / svestkap"
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1978
    "Modified (format): / 30-01-2019 / 15:30:21 / svestkap"
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1979
!
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1980
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1981
testValueTypeAndSize_01
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1982
    "Testing if an error is returned when number is used instead of string as method parammeter at valueTypeAndSize:"
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1983
    | testingRegistryPath |
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1984
    
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1985
    testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1986
    self should: [ testingRegistryPath valueTypeAndSize: 55 ] 
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1987
         raise: Error 
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1988
         suchThat: [ :e | e messageText = 'nameString is not a string!!' ].                                                                          
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1989
    
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1990
    "
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1991
     self run:#testValueTypeAndSize_01
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1992
     self new testValueTypeAndSize_01
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1993
    "
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1994
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1995
    "Created: / 30-01-2019 / 17:15:49 / svestkap"
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1996
!
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1997
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1998
testValueTypeAndSize_REG_BINARY_01
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1999
    "Testing if #REG_BINARY type returns correct size in bytes"
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2000
    | testingRegistryPath readData testingData |
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2001
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2002
    testingData := Dictionary new.            
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2003
    testingData at: #'REG_BINARY' put: 2. "/ [bytes] - testing registry contains #[17 16]    
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2004
    
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2005
    testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2006
    readData := testingRegistryPath valueTypeAndSize: 'non-zero'.
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2007
    
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2008
    self assert: readData keys first = #REG_BINARY.  
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2009
    self assert: (readData at: #'REG_BINARY') = (testingData at: #'REG_BINARY')    
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2010
    
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2011
    "
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2012
     self run:#testValueTypeAndSize_REG_BINARY_01
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2013
     self new testValueTypeAndSize_REG_BINARY_01
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2014
    "
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2015
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2016
    "Created: / 31-01-2019 / 15:47:05 / svestkap"
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2017
!
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2018
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2019
testValueTypeAndSize_REG_DWORD_01
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2020
    "Testing if #REG_DWORD type returns correct size in bytes"
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2021
    | testingData testingRegistryType testingRegistryPath readData |
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2022
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2023
    testingData := Dictionary new.
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2024
    testingRegistryType := UninterpretedBytes isBigEndian ifTrue: [ #REG_DWORD_BIG_ENDIAN ]
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2025
                                                         ifFalse: [ #REG_DWORD_LITTLE_ENDIAN ].
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2026
    testingData at: testingRegistryType put: 4. "/ 32bits = 4 bytes - testing registry contains 0xffffffff 
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2027
    
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2028
    testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2029
    readData := testingRegistryPath valueTypeAndSize: 'dword_value'.
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2030
    
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2031
    self assert: readData keys first = testingRegistryType.  
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2032
    self assert: (readData at: testingRegistryType) = (testingData at: testingRegistryType)    
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2033
    
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2034
    "
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2035
     self run:#testValueTypeAndSize_REG_DWORD_01
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2036
     self new testValueTypeAndSize_REG_DWORD_01
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2037
    "
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2038
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2039
    "Created: / 31-01-2019 / 16:03:52 / svestkap"
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2040
    "Modified (comment): / 01-02-2019 / 15:13:01 / svestkap"
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2041
!
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2042
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2043
testValueTypeAndSize_REG_EXPAND_SZ_01
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2044
    "Testing if #REG_EXPAND_SZ type returns expected string size"
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2045
    | testingData testingRegistryType testingRegistryPath readData |
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2046
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2047
    testingData := Dictionary new.
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2048
    testingRegistryType := #REG_EXPAND_SZ.
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2049
    testingData at: testingRegistryType put: 47. "/ expected string size
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2050
    
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2051
    testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2052
    readData := testingRegistryPath valueTypeAndSize: ' č ルすしか'.
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2053
    
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2054
    self assert: readData keys first = testingRegistryType.  
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2055
    self assert: (readData at: testingRegistryType) = (testingData at: testingRegistryType)    
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2056
    
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2057
    "
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2058
     self run:#testValueTypeAndSize_REG_EXPAND_SZ_01
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2059
     self new testValueTypeAndSize_REG_EXPAND_SZ_01
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2060
    "
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2061
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2062
    "Created: / 31-01-2019 / 15:55:35 / svestkap"
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2063
    "Modified (comment): / 01-02-2019 / 15:09:26 / svestkap"
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2064
!
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2065
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2066
testValueTypeAndSize_REG_MULTI_SZ_01
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2067
    "Testing if #REG_MULTI_SZ type returns correct size in bytes"
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2068
    | testingData testingRegistryType testingRegistryPath readData |
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2069
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2070
    testingData := Dictionary new.
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2071
    testingRegistryType :=  #REG_MULTI_SZ.
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2072
    testingData at: testingRegistryType put: 974. "/ [bytes] - multiple lines in registry
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2073
    
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2074
    testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2075
    readData := testingRegistryPath valueTypeAndSize: 'ř ž č ルすしか'.
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2076
    
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2077
    self assert: readData keys first = testingRegistryType.  
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2078
    self assert: (readData at: testingRegistryType) = (testingData at: testingRegistryType)    
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2079
    
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2080
    "
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2081
     self run:#testValueTypeAndSize_REG_MULTI_SZ_01
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2082
     self new testValueTypeAndSize_REG_MULTI_SZ_01
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2083
    "
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2084
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2085
    "Created: / 31-01-2019 / 16:14:31 / svestkap"
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2086
!
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2087
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2088
testValueTypeAndSize_REG_NONE_01
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2089
    "Testing if #REG_NONE type returns alwyas 0 as it should"
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2090
    | testingRegistryPath readData testingData |
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2091
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2092
    testingData := Dictionary new.            
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2093
    testingData at: #REG_NONE put: 0. "/ #REG_NONE always returns 0
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2094
    
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2095
    testingRegistryPath := Win32OperatingSystem registryEntry key: (registryPath,'\', '\ ルすしか_testing_delete\reg-none').
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2096
    readData := testingRegistryPath valueTypeAndSize: ''.
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2097
    
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2098
    self assert: readData keys first = #REG_NONE.  
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2099
    self assert: (readData at: #'REG_NONE') = (testingData at: #'REG_NONE')    
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2100
    
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2101
    "
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2102
     self run:#testValueTypeAndSize_REG_NONE_01
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2103
     self new testValueTypeAndSize_REG_NONE_01
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2104
    "
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2105
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2106
    "Created: / 31-01-2019 / 15:35:37 / svestkap"
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2107
    "Modified (comment): / 01-02-2019 / 15:13:27 / svestkap"
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2108
!
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2109
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2110
testValueTypeAndSize_REG_QWORD_01
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2111
    "Testing if #REG_QWORD type returns correct size in bytes"
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  2112
    | testingData testingRegistryType testingRegistryPath readData |    
2086
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2113
    
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2114
    testingData := Dictionary new.
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2115
    testingRegistryType :=  #REG_QWORD.
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2116
    testingData at: testingRegistryType put: 8. "/ 64bits = 8bytes - testing registry contains 0xffffffffffffffff 
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2117
    
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2118
    testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2119
    readData := testingRegistryPath valueTypeAndSize: 'qword_max'.
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2120
    
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2121
    self assert: readData keys first = testingRegistryType.  
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2122
    self assert: (readData at: testingRegistryType) = (testingData at: testingRegistryType)    
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2123
    
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2124
    "
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2125
     self run:#testValueTypeAndSize_REG_DWORD_01
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2126
     self new testValueTypeAndSize_REG_DWORD_01
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2127
    "
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2128
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2129
    "Created: / 31-01-2019 / 16:12:21 / svestkap"
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  2130
    "Modified: / 11-02-2019 / 13:48:32 / svestkap"
2086
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2131
!
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2132
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2133
testValueTypeAndSize_REG_SZ_01
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2134
    "Testing if #REG_SZ type returns expected string size"
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2135
    | testingRegistryPath readData testingData |
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2136
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2137
    testingData := Dictionary new.            
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2138
    testingData at: #REG_SZ put: 13.
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2139
    
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2140
    testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2141
    readData := testingRegistryPath valueTypeAndSize: 'しかき    '.
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2142
    
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2143
    self assert: readData keys first = #REG_SZ.  
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2144
    self assert: (readData at: #'REG_SZ') = (testingData at: #'REG_SZ')    
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2145
    
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2146
    "
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2147
     self run:#testValueTypeAndSize_REG_SZ_01
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2148
     self new testValueTypeAndSize_REG_SZ_01
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2149
    "
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2150
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2151
    "Created: / 30-01-2019 / 17:13:53 / svestkap"
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2152
    "Modified (comment): / 31-01-2019 / 16:01:37 / svestkap"
2078
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2153
! !
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2154
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2155
!Win32OperatingSystemTest methodsFor:'tests-unicodeReadEnumeration'!
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2156
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2157
testReadAllSubKeysDo_MaxPath
2086
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2158
    "Reading via allSubKeysDo (using subKeyAtIndex:)with maximum path length.
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2159
     The path suppasses the limit specified by Microsoft - for more information see testReadSubKeyAtIndex_MaxPath_01"
2078
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2160
    | readData testingRegistryPath |
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2161
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2162
    readData := OrderedCollection new.    
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2163
    testingRegistryPath := Win32OperatingSystem registryEntry key: 
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2164
        (registryPath,'\', ' ルすしか\256_chars_max_long|arsdfasdfjljljasdf;jl;jljsfasdfasdfljaslkdfjkasdfljalsd;jfa;lsdjflkasjdflkajsdflkjasdflkjsadlfjasldfjlsadjflksdjflksadjflkajsdflkjasdlfjalskdjflkasdjflkasdfkj;sdaf;kljkkjkklkjjjjkas|1asdfjsldfjlasdlfjlasdjfljasdlfjalsdjflajdfsdsasdfa|end').        
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2165
    
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2166
    testingRegistryPath  allSubKeysDo: [ :subEntry |
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2167
        readData add: subEntry
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2168
    ].     
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2169
    
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2170
    self assert: readData notEmptyOrNil.    
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2171
    self assert: readData size = 3.
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2172
    "/ this is normally unreachable subKey (subkey actually called 'unreachable')
2593
773015856b61 Replacing the hardcoded registry path in order for the registry tests to run correctly in parallel, duh! Fixed tests that relied on the fixed size of the hardcoded path.
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2592
diff changeset
  2173
    self assert: ((readData at: 2) path copyUpTo: $-) size + ((readData at: 2) path copyAfterLast: $\) size = 48.
2078
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2174
    
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2175
    readData := readData copy collect: [ :subEntry | subEntry path copyAfterLast: $\ ].
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2176
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2177
    self assert: readData size = 3.    
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2178
    self assert: (readData first endsWith: '|end').
2593
773015856b61 Replacing the hardcoded registry path in order for the registry tests to run correctly in parallel, duh! Fixed tests that relied on the fixed size of the hardcoded path.
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2592
diff changeset
  2179
    self assert: readData first size = 256.
2078
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2180
    self assert: readData second = 'unreachable'.
2593
773015856b61 Replacing the hardcoded registry path in order for the registry tests to run correctly in parallel, duh! Fixed tests that relied on the fixed size of the hardcoded path.
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2592
diff changeset
  2181
    self assert: readData third = 'reachable'.
2078
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2182
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2183
    "
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2184
     self run:#testReadAllSubKeysDo_MaxPath
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2185
     self new testReadAllSubKeysDo_MaxPath
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2186
    "
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2187
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2188
    "Created: / 05-12-2018 / 12:40:53 / svestkap"
2593
773015856b61 Replacing the hardcoded registry path in order for the registry tests to run correctly in parallel, duh! Fixed tests that relied on the fixed size of the hardcoded path.
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2592
diff changeset
  2189
    "Modified (format): / 16-06-2020 / 13:48:58 / svestkap"
2078
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2190
!
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2191
2086
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2192
testReadRemoteKeyOnHost_01
2078
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2193
    "Reading remote registry via remoteKeyOnHost:
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2194
     Note: a key must be a predefined key for more see: 
2086
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2195
       https://docs.microsoft.com/en-us/windows/desktop/SysInfo/predefined-keys"
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2196
    | testingRegistryPath remoteRegistry readData  |
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2197
    
2078
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2198
    "/ HKEY_CURRENT_USER is one of the predefined keys
2086
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2199
    testingRegistryPath := Win32OperatingSystem registryEntry key: 'HKEY_CURRENT_USER'.        
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2200
    "/ testing done on localhost
2081
015864816df4 Issue #250: testReadRemoteKeyOnHost is skipped when remote registry service is not started
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2080
diff changeset
  2201
    "Skip testing if the remote registry is unreachable.  With localhost this can happen when 
015864816df4 Issue #250: testReadRemoteKeyOnHost is skipped when remote registry service is not started
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2080
diff changeset
  2202
     the service RemoteRegistry, the service name in Windows 10, is not started."
015864816df4 Issue #250: testReadRemoteKeyOnHost is skipped when remote registry service is not started
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2080
diff changeset
  2203
    [ remoteRegistry := testingRegistryPath remoteKeyOnHost: 'localhost' ] on: OsError do: [ :ex | "/ errorCode => `ex parameter parameter`
015864816df4 Issue #250: testReadRemoteKeyOnHost is skipped when remote registry service is not started
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2080
diff changeset
  2204
        self skipIf: ex parameter parameter = '53' description: 'ERROR_BAD_NETPATH, 53 (0x35) - The network path was not found.'
015864816df4 Issue #250: testReadRemoteKeyOnHost is skipped when remote registry service is not started
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2080
diff changeset
  2205
    ].
2078
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2206
    readData := remoteRegistry subKeys.
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2207
    
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2208
    readData := readData copy collect: [ :subEntry | (subEntry path copyAfterLast: $\) asLowercase ].
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2209
    
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2210
    self assert: readData notEmptyOrNil.    
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2211
    self assert: (readData includes: 'software').    
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2212
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2213
    "
2086
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2214
     self run:#testReadRemoteKeyOnHost_01
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2215
     self new testReadRemoteKeyOnHost_01
2078
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2216
    "
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2217
2086
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2218
    "Created: / 31-01-2019 / 12:11:06 / svestkap"
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2219
    "Modified (comment): / 01-02-2019 / 14:51:09 / svestkap"
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2220
!
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2221
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2222
testReadRemoteKeyOnHost_02
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2223
    "Reading remote registry via remoteKeyOnHost: using non-string key name
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2224
     Note: a key must be a predefined key for more see: 
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2225
       https://docs.microsoft.com/en-us/windows/desktop/SysInfo/predefined-keys"
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2226
    | testingRegistryPath |
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2227
    
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2228
    "/ HKEY_CURRENT_USER is one of the predefined keys
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2229
    testingRegistryPath := Win32OperatingSystem registryEntry key: 'HKEY_CURRENT_USER'.            
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2230
    self should: [ testingRegistryPath remoteKeyOnHost: 11 ] 
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2231
         raise: Error 
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2232
         suchThat: [ :e | e messageText = 'hostNameString is not a string!!' ]
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2233
    
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2234
    "
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2235
     self run:#testReadRemoteKeyOnHost_02
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2236
     self new testReadRemoteKeyOnHost_02
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2237
    "
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2238
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2239
    "Created: / 31-01-2019 / 12:10:18 / svestkap"
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2240
    "Modified (format): / 01-02-2019 / 14:51:23 / svestkap"
2078
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2241
!
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2242
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2243
testReadSubKeyNamesAndClassesDo_MaxPath
2086
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2244
    "Reading SubKeyNamesAndClasses with maximum path length.
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2245
     The path suppasses the limit specified by Microsoft - for more information see testReadSubKeyNamesAndClassesAtIndex_MaxPath_01"
2078
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2246
    | readData testingRegistryPath |
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2247
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2248
    readData := OrderedDictionary new.    
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2249
    testingRegistryPath := Win32OperatingSystem registryEntry key: 
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2250
        (registryPath,'\', ' ルすしか\256_chars_max_long|arsdfasdfjljljasdf;jl;jljsfasdfasdfljaslkdfjkasdfljalsd;jfa;lsdjflkasjdflkajsdflkjasdflkjsadlfjasldfjlsadjflksdjflksadjflkajsdflkjasdlfjalskdjflkasdjflkasdfkj;sdaf;kljkkjkklkjjjjkas|1asdfjsldfjlasdlfjlasdjfljasdlfjalsdjflajdfsdsasdfa|end').        
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2251
    
2086
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2252
    testingRegistryPath  subKeyNamesAndClassesDo: [ :name :className |
2078
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2253
        readData at: name put: className.
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2254
    ].     
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2255
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2256
    self assert: readData notEmptyOrNil.
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2257
    self assert: readData size = 2.
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2258
    self assert: (readData at: 'reachable') isEmpty. "/ the class is empty
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2259
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2260
    "
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2261
     self run:#testReadSubKeyNamesAndClassesDo_MaxPath
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2262
     self new testReadSubKeyNamesAndClassesDo_MaxPath
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2263
    "
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2264
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2265
    "Created: / 05-12-2018 / 12:41:31 / svestkap"
2086
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2266
    "Modified (comment): / 01-02-2019 / 14:57:00 / svestkap"
2078
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2267
!
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2268
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2269
testReadSubKeysDo_MaxPath
2086
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2270
    "Reading data via subKeysDo (using subKeyAtIndex:) with maximum path length.
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2271
     The path suppasses the limit specified by Microsoft - for more information see testReadSubKeyAtIndex_MaxPath_01"
2078
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2272
    | readData testingRegistryPath |
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2273
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2274
    readData := OrderedCollection new.    
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2275
    testingRegistryPath := Win32OperatingSystem registryEntry key: 
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2276
        (registryPath,'\', ' ルすしか\256_chars_max_long|arsdfasdfjljljasdf;jl;jljsfasdfasdfljaslkdfjkasdfljalsd;jfa;lsdjflkasjdflkajsdflkjasdflkjsadlfjasldfjlsadjflksdjflksadjflkajsdflkjasdlfjalskdjflkasdjflkasdfkj;sdaf;kljkkjkklkjjjjkas|1asdfjsldfjlasdlfjlasdjfljasdlfjalsdjflajdfsdsasdfa|end').        
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2277
    
2086
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2278
    testingRegistryPath subKeysDo: [ :subEntry |
2078
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2279
        readData add: subEntry
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2280
    ].     
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2281
    
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2282
    self assert: readData notEmptyOrNil.    
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2283
    self assert: readData size = 2.    
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2284
    
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2285
    readData := readData copy collect: [ :subEntry | subEntry path copyAfterLast: $\ ].
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2286
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2287
    self assert: readData size = 2.    
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2288
    self assert: (readData first endsWith: '|end').
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2289
    self assert: readData second = 'reachable'.
2593
773015856b61 Replacing the hardcoded registry path in order for the registry tests to run correctly in parallel, duh! Fixed tests that relied on the fixed size of the hardcoded path.
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2592
diff changeset
  2290
    self assert: readData first size = 256.
2078
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2291
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2292
    "
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2293
     self run:#testReadSubKeysDo_MaxPath
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2294
     self new testReadSubKeysDo_MaxPath
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2295
    "
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2296
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2297
    "Created: / 05-12-2018 / 12:41:49 / svestkap"
2593
773015856b61 Replacing the hardcoded registry path in order for the registry tests to run correctly in parallel, duh! Fixed tests that relied on the fixed size of the hardcoded path.
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2592
diff changeset
  2298
    "Modified: / 16-06-2020 / 13:21:40 / svestkap"
2078
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2299
!
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2300
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2301
testReadSubKeys_MaxPath
2086
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2302
    "Reading via subKeys (using subKeyAtIndex:) with maximum path length.
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2303
     The path suppasses the limit specified by Microsoft - for more information see testReadSubKeyAtIndex_MaxPath_01"
2078
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2304
    | readData testingRegistryPath |
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2305
    
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2306
    testingRegistryPath := Win32OperatingSystem registryEntry key: 
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2307
        (registryPath,'\', ' ルすしか\256_chars_max_long|arsdfasdfjljljasdf;jl;jljsfasdfasdfljaslkdfjkasdfljalsd;jfa;lsdjflkasjdflkajsdflkjasdflkjsadlfjasldfjlsadjflksdjflksadjflkajsdflkjasdlfjalskdjflkasdjflkasdfkj;sdaf;kljkkjkklkjjjjkas|1asdfjsldfjlasdlfjlasdjfljasdlfjalsdjflajdfsdsasdfa|end').        
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2308
    
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2309
    readData := testingRegistryPath subKeys.
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2310
    
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2311
    self assert: readData notEmptyOrNil.    
2593
773015856b61 Replacing the hardcoded registry path in order for the registry tests to run correctly in parallel, duh! Fixed tests that relied on the fixed size of the hardcoded path.
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2592
diff changeset
  2312
    self assert: readData size = 2.        
2078
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2313
    
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2314
    readData := readData copy collect: [ :subEntry | subEntry path copyAfterLast: $\ ].
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2315
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2316
    self assert: readData size = 2.    
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2317
    self assert: (readData first endsWith: '|end').
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2318
    self assert: readData second = 'reachable'.
2593
773015856b61 Replacing the hardcoded registry path in order for the registry tests to run correctly in parallel, duh! Fixed tests that relied on the fixed size of the hardcoded path.
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2592
diff changeset
  2319
    self assert: readData first size = 256. 
2078
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2320
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2321
    "
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2322
     self run:#testReadSubKeys_MaxPath
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2323
     self new testReadSubKeys_MaxPath
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2324
    "
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2325
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2326
    "Created: / 05-12-2018 / 12:41:59 / svestkap"
2593
773015856b61 Replacing the hardcoded registry path in order for the registry tests to run correctly in parallel, duh! Fixed tests that relied on the fixed size of the hardcoded path.
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2592
diff changeset
  2327
    "Modified: / 16-06-2020 / 13:20:53 / svestkap"
2078
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2328
!
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2329
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2330
testReadValueNamesAndValuesDo_MaxPath
2086
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2331
    "Reading data via #valueNamesAndValuesDo: (using #valueNameAtIndex:) with maximum path length.
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2332
     The path suppasses the limit specified by Microsoft - for more information see testReadValueNameAtIndex_01"
2078
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2333
    | readData testingRegistryPath |
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2334
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2335
    readData := OrderedDictionary new.    
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2336
    testingRegistryPath := Win32OperatingSystem registryEntry key: 
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2337
        (registryPath,'\', ' ルすしか\256_chars_max_long|arsdfasdfjljljasdf;jl;jljsfasdfasdfljaslkdfjkasdfljalsd;jfa;lsdjflkasjdflkajsdflkjasdflkjsadlfjasldfjlsadjflksdjflksadjflkajsdflkjasdlfjalskdjflkasdjflkasdfkj;sdaf;kljkkjkklkjjjjkas|1asdfjsldfjlasdlfjlasdjfljasdlfjalsdjflajdfsdsasdfa|end').        
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2338
    
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2339
    testingRegistryPath valueNamesAndValuesDo: [ :name :value |
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2340
        readData at: name put: value
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2341
    ].     
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2342
    
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2343
    self assert: readData notEmptyOrNil.    
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2344
    self assert: readData size = 3.    
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2345
    self assert: readData first =  ('testing'->' ルすしか').
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2346
    self assert: (readData at: 'か')= 2.
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2347
    self assert: readData second = 2.
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2348
    self assert: (readData at: '256_chars_max_long|arsdfasdfjljljasdf;jl;jljsfasdfasdfljaslkdfjkasdfljalsd;jfa;lsdjflkasjdflkajsdflkjasdflkjsadlfjasldfjlsadjflksdjflksadjflkajsdflkjasdlfjalskdjflkasdjflkasdfkj;sdaf;kljkkjkklkjjjjkas|1asdfjsldfjlasdlfjlasdjfljasdlfjalsdjflajdfsdsasdfa|end') 
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2349
        = 'Longer_than_256_chars_max_long|arsdfasdfjljljasdf;jl;jljsfasdfasdfljaslkdfjkasdfljalsd;jfa;lsdjflkasjdflkajsdflkjasdflkjsadlfjasldfjlsadjflksdjflksadjflkajsdflkjasdlfjalskdjflkasdjflkasdfkj;sdaf;kljkkjkklkjjjjkas|1asdfjsldfjlasdlfjlasdjfljasdlfjalsdjflajdfsdsasdfa|endsdfsdfasdfasdfasdfjlkasdjflkasjdflkjasdlfjaslkdfjlkasdjflkasdflksadlkjsadlfalsdfůlasdjflkasdjflkasjdflkůjasdflůkjasdlůfjalsůkdjflůksd'.
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2350
    self assert: readData third = 'Longer_than_256_chars_max_long|arsdfasdfjljljasdf;jl;jljsfasdfasdfljaslkdfjkasdfljalsd;jfa;lsdjflkasjdflkajsdflkjasdflkjsadlfjasldfjlsadjflksdjflksadjflkajsdflkjasdlfjalskdjflkasdjflkasdfkj;sdaf;kljkkjkklkjjjjkas|1asdfjsldfjlasdlfjlasdjfljasdlfjalsdjflajdfsdsasdfa|endsdfsdfasdfasdfasdfjlkasdjflkasjdflkjasdlfjaslkdfjlkasdjflkasdflksadlkjsadlfalsdfůlasdjflkasdjflkasjdflkůjasdflůkjasdlůfjalsůkdjflůksd'.
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2351
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2352
    "  
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2353
     self run:#testReadValueNamesAndValuesDo_MaxPath
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2354
     self new testReadValueNamesAndValuesDo_MaxPath
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2355
    "
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2356
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2357
    "Created: / 05-12-2018 / 12:43:05 / svestkap"
2086
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2358
    "Modified (comment): / 01-02-2019 / 14:54:23 / svestkap"
2078
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2359
!
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2360
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2361
testReadValueNamesAndValuesDo_REG_SZ_01
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2362
    "Testing if REG_SZ values are read correctly via valueNamesAndValuesDo:"
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2363
    | readData testingRegistryPath |
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2364
    
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2365
    readData := OrderedDictionary new.    
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2366
    testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2367
     
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2368
    testingRegistryPath valueNamesAndValuesDo: [ :name :data |
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2369
        readData at: name put: data
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2370
    ].
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2371
    
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2372
    self assert: (readData at: 'bledesu') = '''Testing Unicode chars ř ž č ルすしかき'').          '.
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2373
    
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2374
    "
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2375
     self run:#testReadValueNamesAndValuesDo_REG_SZ_01
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2376
     self new testReadValueNamesAndValuesDo_REG_SZ_01
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2377
    "
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2378
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2379
    "Created: / 16-11-2018 / 12:15:52 / svestkap"
2086
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2380
    "Modified (format): / 01-02-2019 / 13:31:44 / svestkap"
2078
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2381
!
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2382
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2383
testReadValueNamesAndValuesDo_REG_SZ_02
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2384
    "Testing if REG_SZ values are read correctly via valueNamesAndValuesDo:"
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2385
    | readData testingRegistryPath |
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2386
    
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2387
    readData := OrderedDictionary new.    
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2388
    testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2389
     
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2390
    testingRegistryPath valueNamesAndValuesDo: [ :name :data |
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2391
        readData at: name put: data
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2392
    ].
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2393
    
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2394
    self assert: (readData at: ' ř ž č ル.          ') = 'Testing Unicode chars ř ž č ルすしかき'.    
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2395
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2396
    "
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2397
     self run:#testReadValueNamesAndValuesDo_REG_SZ_02
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2398
     self new testReadValueNamesAndValuesDo_REG_SZ_02
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2399
    "
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2400
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2401
    "Created: / 05-12-2018 / 12:43:35 / svestkap"
2086
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2402
    "Modified (format): / 01-02-2019 / 13:31:48 / svestkap"
2078
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2403
!
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2404
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2405
testReadValueNamesDo_MaxPath
2086
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2406
    "Reading data via #valueNamesDo: (using #valueNameAtIndex:)  with maximum path length.
2078
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2407
     The path is suppassing the Microsoft limit - for more information see testReadValueNameAtIndex_01"
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2408
    | readData readDataValue testingRegistryPath |
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2409
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2410
    readData := OrderedCollection new.    
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2411
    testingRegistryPath := Win32OperatingSystem registryEntry key: 
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2412
        (registryPath,'\', ' ルすしか\256_chars_max_long|arsdfasdfjljljasdf;jl;jljsfasdfasdfljaslkdfjkasdfljalsd;jfa;lsdjflkasjdflkajsdflkjasdflkjsadlfjasldfjlsadjflksdjflksadjflkajsdflkjasdlfjalskdjflkasdjflkasdfkj;sdaf;kljkkjkklkjjjjkas|1asdfjsldfjlasdlfjlasdjfljasdlfjalsdjflajdfsdsasdfa|end').        
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2413
    
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2414
    testingRegistryPath valueNamesDo: [ :subEntry |
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2415
        readData add: subEntry
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2416
    ].     
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2417
    
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2418
    self assert: readData notEmptyOrNil.    
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2419
    self assert: readData size = 3.    
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2420
    self assert: readData first = 'testing'.
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2421
    self assert: readData second = 'か'.
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2422
    self assert: readData third = '256_chars_max_long|arsdfasdfjljljasdf;jl;jljsfasdfasdfljaslkdfjkasdfljalsd;jfa;lsdjflkasjdflkajsdflkjasdflkjsadlfjasldfjlsadjflksdjflksadjflkajsdflkjasdlfjalskdjflkasdjflkasdfkj;sdaf;kljkkjkklkjjjjkas|1asdfjsldfjlasdlfjlasdjfljasdlfjalsdjflajdfsdsasdfa|end'.
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2423
    
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2424
    readDataValue := testingRegistryPath valueNamed: readData third.  
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2425
    
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2426
    "/ MSDN limits: Value name 16,383 characters (@Windows 2000: 260 ANSI characters or 16,383 Unicode characters)
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2427
    "/ the following tests 401 characters       
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2428
    self assert: readDataValue = 'Longer_than_256_chars_max_long|arsdfasdfjljljasdf;jl;jljsfasdfasdfljaslkdfjkasdfljalsd;jfa;lsdjflkasjdflkajsdflkjasdflkjsadlfjasldfjlsadjflksdjflksadjflkajsdflkjasdlfjalskdjflkasdjflkasdfkj;sdaf;kljkkjkklkjjjjkas|1asdfjsldfjlasdlfjlasdjfljasdlfjalsdjflajdfsdsasdfa|endsdfsdfasdfasdfasdfjlkasdjflkasjdflkjasdlfjaslkdfjlkasdjflkasdflksadlkjsadlfalsdfůlasdjflkasdjflkasjdflkůjasdflůkjasdlůfjalsůkdjflůksd'.
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2429
    "
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2430
     self run:#testReadValueNamesDo_MaxPath
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2431
     self new testReadValueNamesDo_MaxPath
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2432
    "
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2433
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2434
    "Created: / 05-12-2018 / 12:43:49 / svestkap"
2086
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2435
    "Modified (comment): / 01-02-2019 / 14:55:15 / svestkap"
2078
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2436
!
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2437
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2438
testReadValueNames_MaxPath
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2439
    "reading via #valueNames (using #valueNameAtIndex:) with max Path
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2440
     The path is suppassing the Microsoft limit - for more information see testReadValueNameAtIndex_01"
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2441
    | readData testingRegistryPath |
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2442
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2443
    testingRegistryPath := Win32OperatingSystem registryEntry key: 
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2444
        (registryPath,'\', ' ルすしか\256_chars_max_long|arsdfasdfjljljasdf;jl;jljsfasdfasdfljaslkdfjkasdfljalsd;jfa;lsdjflkasjdflkajsdflkjasdflkjsadlfjasldfjlsadjflksdjflksadjflkajsdflkjasdlfjalskdjflkasdjflkasdfkj;sdaf;kljkkjkklkjjjjkas|1asdfjsldfjlasdlfjlasdjfljasdlfjalsdjflajdfsdsasdfa|end').        
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2445
    
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2446
    readData := testingRegistryPath valueNames.
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2447
    
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2448
    self assert: readData isArray.
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2449
    self assert: readData notEmptyOrNil.    
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2450
    self assert: readData size = 3.    
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2451
    self assert: readData first = 'testing'.
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2452
    self assert: readData second = 'か'.
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2453
    self assert: readData third = '256_chars_max_long|arsdfasdfjljljasdf;jl;jljsfasdfasdfljaslkdfjkasdfljalsd;jfa;lsdjflkasjdflkajsdflkjasdflkjsadlfjasldfjlsadjflksdjflksadjflkajsdflkjasdlfjalskdjflkasdjflkasdfkj;sdaf;kljkkjkklkjjjjkas|1asdfjsldfjlasdlfjlasdjfljasdlfjalsdjflajdfsdsasdfa|end'.
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2454
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2455
    "  
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2456
     self run:#testReadValueNames_MaxPath
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2457
     self new testReadValueNames_MaxPath
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2458
    "
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2459
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2460
    "Created: / 05-12-2018 / 12:44:16 / svestkap"
2086
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2461
    "Modified (format): / 01-02-2019 / 13:31:55 / svestkap"
2078
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2462
!
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2463
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2464
testReadvalueNamesAndValuesDo_MaxPath_01
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2465
    "reading via #valueNamesAndValuesDo: (using #valueNameAtIndex:) with max Path
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2466
     The path is suppassing the Microsoft limit - for more information see testReadValueNameAtIndex_01"
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2467
    | readData testingRegistryPath |
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2468
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2469
    readData := OrderedDictionary new.    
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2470
    testingRegistryPath := Win32OperatingSystem registryEntry key: 
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2471
        (registryPath,'\', ' ルすしか\256_chars_max_long|arsdfasdfjljljasdf;jl;jljsfasdfasdfljaslkdfjkasdfljalsd;jfa;lsdjflkasjdflkajsdflkjasdflkjsadlfjasldfjlsadjflksdjflksadjflkajsdflkjasdlfjalskdjflkasdjflkasdfkj;sdaf;kljkkjkklkjjjjkas|1asdfjsldfjlasdlfjlasdjfljasdlfjalsdjflajdfsdsasdfa|end').        
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2472
    
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2473
    testingRegistryPath valueNamesAndValuesDo: [ :name :value |
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2474
        readData at: name put: value
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2475
    ].     
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2476
    
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2477
    self assert: readData notEmptyOrNil.    
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2478
    self assert: readData size = 3.    
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2479
    self assert: readData first =  ('testing'->' ルすしか').
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2480
    self assert: (readData at: 'か')= 2.
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2481
    self assert: readData second = 2.
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2482
    self assert: (readData at: '256_chars_max_long|arsdfasdfjljljasdf;jl;jljsfasdfasdfljaslkdfjkasdfljalsd;jfa;lsdjflkasjdflkajsdflkjasdflkjsadlfjasldfjlsadjflksdjflksadjflkajsdflkjasdlfjalskdjflkasdjflkasdfkj;sdaf;kljkkjkklkjjjjkas|1asdfjsldfjlasdlfjlasdjfljasdlfjalsdjflajdfsdsasdfa|end') 
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2483
        = 'Longer_than_256_chars_max_long|arsdfasdfjljljasdf;jl;jljsfasdfasdfljaslkdfjkasdfljalsd;jfa;lsdjflkasjdflkajsdflkjasdflkjsadlfjasldfjlsadjflksdjflksadjflkajsdflkjasdlfjalskdjflkasdjflkasdfkj;sdaf;kljkkjkklkjjjjkas|1asdfjsldfjlasdlfjlasdjfljasdlfjalsdjflajdfsdsasdfa|endsdfsdfasdfasdfasdfjlkasdjflkasjdflkjasdlfjaslkdfjlkasdjflkasdflksadlkjsadlfalsdfůlasdjflkasdjflkasjdflkůjasdflůkjasdlůfjalsůkdjflůksd'.
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2484
    self assert: readData third = 'Longer_than_256_chars_max_long|arsdfasdfjljljasdf;jl;jljsfasdfasdfljaslkdfjkasdfljalsd;jfa;lsdjflkasjdflkajsdflkjasdflkjsadlfjasldfjlsadjflksdjflksadjflkajsdflkjasdlfjalskdjflkasdjflkasdfkj;sdaf;kljkkjkklkjjjjkas|1asdfjsldfjlasdlfjlasdjfljasdlfjalsdjflajdfsdsasdfa|endsdfsdfasdfasdfasdfjlkasdjflkasjdflkjasdlfjaslkdfjlkasdjflkasdflksadlkjsadlfalsdfůlasdjflkasdjflkasjdflkůjasdflůkjasdlůfjalsůkdjflůksd'.
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2485
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2486
    "  
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2487
     self run:#testReadvalueNamesAndValuesDo_MaxPath_01
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2488
     self new testReadvalueNamesAndValuesDo_MaxPath_01
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2489
    "
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2490
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2491
    "Created: / 22-11-2018 / 14:10:34 / svestkap"
2086
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2492
    "Modified (format): / 01-02-2019 / 13:31:59 / svestkap"
2078
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2493
!
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2494
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2495
testReadvalueNamesAndValuesDo_REG_SZ_02
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2496
    "Testing if REG_SZ values are read correctly via valueNamesAndValuesDo:"
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2497
    | readData testingRegistryPath |
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2498
    
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2499
    readData := OrderedDictionary new.    
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2500
    testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2501
     
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2502
    testingRegistryPath valueNamesAndValuesDo: [ :name :data |
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2503
        readData at: name put: data
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2504
    ].
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2505
    
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2506
    self assert: (readData at: ' ř ž č ル.          ') = 'Testing Unicode chars ř ž č ルすしかき'.    
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2507
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2508
    "
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2509
     self run:#testReadvalueNamesAndValuesDo_REG_SZ_02
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2510
     self new testReadvalueNamesAndValuesDo_REG_SZ_02
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2511
    "
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2512
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2513
    "Created: / 16-11-2018 / 12:16:16 / svestkap"
2086
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2514
    "Modified (format): / 01-02-2019 / 13:32:02 / svestkap"
2078
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2515
! !
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2516
2214
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2517
!Win32OperatingSystemTest methodsFor:'tests-unicodeRename'!
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2518
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2519
testRenameSubKey_01
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2520
    "Testing if subKey is correctly renamed"
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2521
    | readData testingRegistryEntryPath |   
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2522
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2523
    testingRegistryEntryPath := Win32OperatingSystem registryEntry key: registryPath.
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2524
    
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2525
    self assert: (testingRegistryEntryPath renameSubKey: ' ルすしか_testing_delete'  to: 'RenamedSubKey').
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2526
    readData := testingRegistryEntryPath subKeyNamed: 'RenamedSubKey'.
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2527
    
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2528
    self assert: readData notEmptyOrNil.
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2529
    self assert: readData path = (registryPath, '\', 'RenamedSubKey').
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2530
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2531
    "
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2532
     self run:#testRenameSubKey_01
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2533
     self new testRenameSubKey_01
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2534
    "
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2535
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2536
    "Created: / 09-04-2019 / 09:05:28 / svestkap"
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2537
!
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2538
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2539
testRenameSubKey_02
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2540
    "Testing if subKey is correctly renamed"
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2541
    | readData testingRegistryEntryPath |   
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2542
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2543
    testingRegistryEntryPath := Win32OperatingSystem registryEntry key: registryPath.
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2544
    
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2545
    self assert: (testingRegistryEntryPath renameSubKey: ' ルすしか_testing_delete'  to: 'すしか_').
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2546
    readData := testingRegistryEntryPath subKeyNamed: 'すしか_'.
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2547
    
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2548
    self assert: readData notEmptyOrNil.
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2549
    self assert: readData path = (registryPath, '\', 'すしか_').
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2550
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2551
    testingRegistryEntryPath := Win32OperatingSystem registryEntry key: (registryPath, '\', 'すしか_').
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2552
    readData := testingRegistryEntryPath subKeyNamed: 'bobr'.
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2553
    
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2554
    self assert: readData notEmptyOrNil.
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2555
    self assert: readData path = (registryPath, '\', 'すしか_', '\', 'bobr')
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2556
    
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2557
    "
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2558
     self run:#testRenameSubKey_02
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2559
     self new testRenameSubKey_02
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2560
    "
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2561
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2562
    "Created: / 09-04-2019 / 09:35:05 / svestkap"
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2563
!
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2564
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2565
testRenameSubKey_03
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2566
    "Testing when renamed subKey does not exist"
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2567
    | readData testingRegistryEntryPath |   
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2568
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2569
    testingRegistryEntryPath := Win32OperatingSystem registryEntry key: registryPath.
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2570
    
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2571
    self deny: (testingRegistryEntryPath renameSubKey: 'a key that does not exist'  to: 'すしか_').
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2572
    readData := testingRegistryEntryPath subKeyNamed: 'すしか_'.
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2573
    
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2574
    self assert: readData isEmptyOrNil
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2575
    
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2576
    "
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2577
     self run:#testRenameSubKey_03
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2578
     self new testRenameSubKey_03
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2579
    "
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2580
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2581
    "Created: / 09-04-2019 / 09:39:52 / svestkap"
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2582
! !
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2583
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2584
!Win32OperatingSystemTest methodsFor:'tests-unicodeWrite'!
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2585
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2586
testDefaultValue_01
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2587
    "Testing if value can be stored (defaultValue:) and read (defaultValue)
2086
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2588
     Note: the value is stored in (Default) value at the key"
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2589
    | testingRegistryPath readData |
2086
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2590
    
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2591
    registryPath := registryPath, '\', ' ルすしか'.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2592
    testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2593
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2594
    readData := testingRegistryPath defaultValue.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2595
    self assert: readData isNil.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2596
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2597
    testingRegistryPath defaultValue: 'すし.ACE.OLEDB.16.0'.    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2598
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2599
    readData := testingRegistryPath defaultValue.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2600
    self assert: readData = 'すし.ACE.OLEDB.16.0'.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2601
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2602
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2603
     self run:#testDefaultValue_01
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2604
     self new testDefaultValue_01
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2605
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2606
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2607
    "Created: / 12-12-2018 / 12:35:53 / svestkap"
2086
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2608
    "Modified (format): / 01-02-2019 / 13:55:01 / svestkap"
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2609
!
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2610
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2611
testDefaultValue_02
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2612
    "Testing if value can be stored (defaultValue:) and read (defaultValue) with registry type and size check
2086
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2613
     Note: the value is stored in (Default) value at the key"
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2614
    | testingRegistryPath registryType readData |
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2615
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2616
    registryPath := registryPath, '\', ' ルすしか'.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2617
    testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2618
  
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2619
    readData := testingRegistryPath defaultValue.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2620
    self assert: readData isNil.       
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2621
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2622
    testingRegistryPath defaultValue: 'すし.ACE.OLEDB.16.0'.    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2623
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2624
    registryType := testingRegistryPath valueTypeAndSize: ''.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2625
    self assert: registryType keys first isSymbol.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2626
    self assert: registryType keys first equals: #REG_SZ.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2627
    self assert: registryType first isNumber.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2628
    self assert: registryType first equals: 17.     
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2629
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2630
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2631
    readData := testingRegistryPath defaultValue.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2632
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2633
    self assert: readData = 'すし.ACE.OLEDB.16.0'.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2634
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2635
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2636
     self run:#testDefaultValue_02
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2637
     self new testDefaultValue_02
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2638
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2639
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2640
    "Created: / 12-12-2018 / 11:07:11 / svestkap"
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2641
    "Modified: / 12-12-2018 / 14:08:14 / svestkap"
2086
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2642
    "Modified (comment): / 01-02-2019 / 13:55:06 / svestkap"
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2643
!
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2644
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2645
testWriteValueNamedPut_REG_BINARY_01
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2646
    "Testing if REG_BINARY zero value is written correctly via valueNamed:put:
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2647
     Data is written and read back again." 
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2648
    | testingRegistryPath readData |
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2649
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2650
    testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2651
    testingRegistryPath valueNamed: 'non-zero' put: ByteArray new.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2652
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2653
    readData := testingRegistryPath valueNamed: 'non-zero'.    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2654
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2655
    self assert: readData = ByteArray new.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2656
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2657
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2658
     self run:#testWriteValueNamedPut_REG_BINARY_01
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2659
     self new testWriteValueNamedPut_REG_BINARY_01
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2660
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2661
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2662
    "Created: / 04-12-2018 / 11:52:46 / svestkap"
2086
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2663
    "Modified (format): / 01-02-2019 / 13:55:10 / svestkap"
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2664
!
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2665
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2666
testWriteValueNamedPut_REG_BINARY_02
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2667
    "Testing if REG_BINARY values are written correctly via valueNamed:put:
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2668
     Data is written and read back again." 
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2669
    | testingRegistryPath byteArray readData readDataHex |
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2670
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2671
    testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2672
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2673
    byteArray := ByteArray new: 5.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2674
    "/ data to be written  
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2675
    byteArray replaceElementsFrom: 1 to: 5 withArray: #[18 234 11 0 18] startingAt: 1. 
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2676
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2677
    testingRegistryPath valueNamed: 'non-zero' put: byteArray.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2678
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2679
    readData := testingRegistryPath valueNamed: 'non-zero'.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2680
    readDataHex := readData hexPrintStringWithSeparator: $|.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2681
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2682
    self assert: readData = #[18 234 11 0 18]. "/ ByteArray
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2683
    self assert: readDataHex = '12|EA|0B|00|12' "/ hex    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2684
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2685
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2686
     self run:#testWriteValueNamedPut_REG_BINARY_02
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2687
     self new testWriteValueNamedPut_REG_BINARY_02
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2688
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2689
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2690
    "Created: / 04-12-2018 / 12:04:18 / svestkap"
2086
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2691
    "Modified (format): / 01-02-2019 / 13:55:13 / svestkap"
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2692
!
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2693
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2694
testWriteValueNamedPut_REG_BINARY_03
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2695
    "Testing if new REG_BINARY value name is written correctly via valueNamed:put:
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2696
     Data is written and read back again." 
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2697
    | testingRegistryPath byteArray readData readDataHex |
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2698
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2699
    testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2700
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2701
    byteArray := ByteArray new: 5.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2702
    "/ data to be written  
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2703
    byteArray replaceElementsFrom: 1 to: 5 withArray: #[18 234 11 0 18] startingAt: 1. 
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2704
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2705
    testingRegistryPath valueNamed: 'Binaryル' put: byteArray.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2706
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2707
    readData := testingRegistryPath valueNamed: 'Binaryル'.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2708
    readDataHex := readData hexPrintStringWithSeparator: $|.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2709
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2710
    self assert: readData = #[18 234 11 0 18]. "/ ByteArray
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2711
    self assert: readDataHex = '12|EA|0B|00|12' "/ hex    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2712
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2713
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2714
     self run:#testWriteValueNamedPut_REG_BINARY_03
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2715
     self new testWriteValueNamedPut_REG_BINARY_03
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2716
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2717
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2718
    "Created: / 07-12-2018 / 15:15:06 / svestkap"
2086
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2719
    "Modified (format): / 01-02-2019 / 13:56:49 / svestkap"
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2720
!
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2721
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2722
testWriteValueNamedPut_REG_BINARY_04
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2723
    "Testing if new REG_BINARY value name is written correctly via valueNamed:put: with registry type and size check
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2724
     Data is written and read back again." 
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2725
    | testingRegistryPath byteArray readData readDataHex registryType |
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2726
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2727
    testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2728
       
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2729
    byteArray := ByteArray new: 5.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2730
    "/ data to be written  
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2731
    byteArray replaceElementsFrom: 1 to: 5 withArray: #[18 234 11 0 18] startingAt: 1. 
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2732
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2733
    testingRegistryPath valueNamed: 'Binaryル' put: byteArray.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2734
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2735
    registryType := testingRegistryPath valueTypeAndSize: 'Binaryル'.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2736
    self assert: registryType keys first equals: #REG_BINARY.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2737
    self assert: registryType first equals: 5.   
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2738
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2739
    readData := testingRegistryPath valueNamed: 'Binaryル'.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2740
    readDataHex := readData hexPrintStringWithSeparator: $|.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2741
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2742
    self assert: readData = #[18 234 11 0 18]. "/ ByteArray
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2743
    self assert: readDataHex = '12|EA|0B|00|12' "/ hex    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2744
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2745
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2746
     self run:#testWriteValueNamedPut_REG_BINARY_04
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2747
     self new testWriteValueNamedPut_REG_BINARY_04
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2748
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2749
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2750
    "Created: / 12-12-2018 / 12:36:46 / svestkap"
2086
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2751
    "Modified (format): / 01-02-2019 / 13:56:52 / svestkap"
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2752
!
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2753
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2754
testWriteValueNamedPut_REG_BINARY_05
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2755
    "Testing if REG_BINARY values are written correctly via valueNamed:put:
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2756
     Data is written and read back again." 
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2757
    | testingRegistryPath byteArray readData readDataHex registryType |
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2758
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2759
    testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2760
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2761
    readData := testingRegistryPath valueNamed: 'non-zero'.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2762
    self assert: readData = #[17 16].
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2763
    registryType := testingRegistryPath valueTypeAndSize: 'non-zero'.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2764
    self assert: registryType keys first equals: #REG_BINARY.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2765
    self assert: registryType first equals: 2.              
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2766
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2767
    byteArray := ByteArray new: 5.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2768
    "/ data to be written  
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2769
    byteArray replaceElementsFrom: 1 to: 5 withArray: #[18 234 11 0 18] startingAt: 1. 
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2770
    "/ saving value into registry
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2771
    testingRegistryPath valueNamed: 'non-zero' put: byteArray.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2772
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2773
    "/ testing the saved value
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2774
    registryType := testingRegistryPath valueTypeAndSize: 'non-zero'.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2775
    self assert: registryType keys first equals: #REG_BINARY.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2776
    self assert: registryType first equals: 5.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2777
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2778
    readData := testingRegistryPath valueNamed: 'non-zero'.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2779
    readDataHex := readData hexPrintStringWithSeparator: $|.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2780
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2781
    self assert: readData = #[18 234 11 0 18]. "/ ByteArray
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2782
    self assert: readDataHex = '12|EA|0B|00|12' "/ hex    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2783
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2784
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2785
     self run:#testWriteValueNamedPut_REG_BINARY_05
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2786
     self new testWriteValueNamedPut_REG_BINARY_05
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2787
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2788
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2789
    "Created: / 12-12-2018 / 13:16:13 / svestkap"
2086
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2790
    "Modified (format): / 01-02-2019 / 13:56:55 / svestkap"
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2791
!
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2792
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2793
testWriteValueNamedPut_REG_DWORD_01
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2794
    "Testing if REG_DWORD values are written correctly via valueNamed:put:"
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2795
    | readData testingRegistryPath |
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  2796
  
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2797
    testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2798
    testingRegistryPath valueNamed: 'dword_value' put: 7337.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2799
    readData := testingRegistryPath valueNamed: 'dword_value'.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2800
2086
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2801
    self assert: readData = 7337.
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2802
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2803
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2804
     self run:#testWriteValueNamedPut_REG_DWORD_01
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2805
     self new testWriteValueNamedPut_REG_DWORD_01
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2806
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2807
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2808
    "Created: / 05-12-2018 / 11:35:52 / svestkap"
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  2809
    "Modified: / 12-02-2019 / 14:54:58 / svestkap"
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2810
!
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2811
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2812
testWriteValueNamedPut_REG_DWORD_02
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2813
    "Testing if max DWORD is accepted as REG_DWORD (written correctly via valueNamed:put:)"
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2814
    | readData testingRegistryPath |
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2815
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2816
    testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2817
    "/ max DWORD value 0xffffffff -> 4294967295 (which is on x64 SmallInteger)    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2818
    testingRegistryPath valueNamed: 'dword_value' put: 4294967295.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2819
    readData := testingRegistryPath valueNamed: 'dword_value'.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2820
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2821
    self assert: readData = 4294967295.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2822
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2823
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2824
     self run:#testWriteValueNamedPut_REG_DWORD_02
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2825
     self new testWriteValueNamedPut_REG_DWORD_02
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2826
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2827
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2828
    "Created: / 05-12-2018 / 11:36:00 / svestkap"
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  2829
    "Modified: / 12-02-2019 / 14:55:03 / svestkap"
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2830
!
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2831
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2832
testWriteValueNamedPut_REG_DWORD_03
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2833
    "Testing if REG_DWORD values are written correctly via valueNamed:put:
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2834
     Data is written and read back again."
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2835
    | readData testingRegistryPath |
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2836
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2837
    testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2838
    testingRegistryPath valueNamed: '11' put: 7337.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2839
    readData := testingRegistryPath valueNamed: '11'.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2840
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2841
    self assert: readData = 7337
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2842
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2843
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2844
     self run:#testWriteValueNamedPut_REG_DWORD_03
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2845
     self new testWriteValueNamedPut_REG_DWORD_03
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2846
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2847
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2848
    "Created: / 05-12-2018 / 11:35:36 / svestkap"
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  2849
    "Modified: / 12-02-2019 / 14:55:08 / svestkap"
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2850
!
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2851
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2852
testWriteValueNamedPut_REG_DWORD_04
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2853
    "Testing if REG_DWORD values are written correctly via valueNamed:put:
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2854
     Data is written and read back again."
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2855
    | readData testingRegistryPath |
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  2856
       
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2857
    testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2858
    testingRegistryPath valueNamed: '11' put: 7337.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2859
    readData := testingRegistryPath valueNamed: '11'.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2860
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2861
    self assert: readData = 7337
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2862
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2863
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2864
     self run:#testWriteValueNamedPut_REG_DWORD_04
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2865
     self new testWriteValueNamedPut_REG_DWORD_04
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2866
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2867
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2868
    "Created: / 05-12-2018 / 11:39:00 / svestkap"
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  2869
    "Modified: / 12-02-2019 / 14:55:14 / svestkap"
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2870
!
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2871
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2872
testWriteValueNamedPut_REG_DWORD_05
2086
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2873
    "Testing if trying to access REG_DWORD values via name as number raises a predefined error"
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2874
    | testingRegistryPath |
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2875
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2876
    testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2877
2086
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2878
    self should: [ testingRegistryPath valueNamed: 11 put: 7337] raise: Error
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2879
        suchThat: [ :e | e messageText = 'nameString is not a string!!' ].        
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2880
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2881
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2882
     self run:#testWriteValueNamedPut_REG_DWORD_05
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2883
     self new testWriteValueNamedPut_REG_DWORD_05
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2884
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2885
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2886
    "Created: / 05-12-2018 / 12:29:06 / svestkap"
2086
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2887
    "Modified (comment): / 01-02-2019 / 14:28:28 / svestkap"
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2888
!
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2889
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2890
testWriteValueNamedPut_REG_DWORD_06
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2891
    "Testing if new REG_DWORD value name is written correctly via valueNamed:put:
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2892
     Data is written and read back again."
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2893
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2894
    | readData testingRegistryPath |
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  2895
     
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2896
    testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2897
    testingRegistryPath valueNamed: '374657654ル' put: 7337.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2898
    readData := testingRegistryPath valueNamed: '374657654ル'.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2899
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2900
    self assert: readData = 7337
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2901
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2902
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2903
     self run:#testWriteValueNamedPut_REG_DWORD_06
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2904
     self new testWriteValueNamedPut_REG_DWORD_06
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2905
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2906
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2907
    "Created: / 07-12-2018 / 15:10:24 / svestkap"
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  2908
    "Modified: / 12-02-2019 / 14:55:23 / svestkap"
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2909
!
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2910
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2911
testWriteValueNamedPut_REG_DWORD_07
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2912
    "Testing if REG_DWORD values are written correctly via valueNamed:put: with registry type and size check"
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2913
    | readData testingRegistryPath registryType endianness |
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2914
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2915
    testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2916
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2917
    "/ checking registry type and size
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2918
    registryType := testingRegistryPath valueTypeAndSize: 'dword_value'.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2919
    registryType keys first == #REG_DWORD_LITTLE_ENDIAN ifTrue: [ 
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2920
        self assert: registryType keys first equals: #REG_DWORD_LITTLE_ENDIAN.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2921
        endianness := #REG_DWORD_LITTLE_ENDIAN
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2922
    ] ifFalse: [ 
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2923
        self assert: registryType keys first equals: #REG_DWORD_BIG_ENDIAN.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2924
        endianness := #REG_DWORD_BIG_ENDIAN
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2925
    ].  
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2926
    self assert: registryType first equals: 4. "/ 32 bits = 4 bytes      
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2927
    "/ read data
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2928
    readData := testingRegistryPath valueNamed: 'dword_value'.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2929
    self assert: readData = 9135. "/ the previous value
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2930
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2931
    "/ inserting new value
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2932
    testingRegistryPath valueNamed: 'dword_value' put: 7337.  
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2933
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2934
    "/ checking registry type and size
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2935
    registryType := testingRegistryPath valueTypeAndSize: 'dword_value'.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2936
    self assert: registryType keys first equals: endianness.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2937
    self assert: registryType first equals: 4. "/ 32 bits = 4 bytes    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2938
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2939
    "/ read data
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2940
    readData := testingRegistryPath valueNamed: 'dword_value'.    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2941
    self assert: readData = 7337.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2942
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2943
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2944
     self run:#testWriteValueNamedPut_REG_DWORD_07
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2945
     self new testWriteValueNamedPut_REG_DWORD_07
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2946
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2947
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2948
    "Created: / 12-12-2018 / 12:13:53 / svestkap"
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  2949
    "Modified: / 12-02-2019 / 14:55:30 / svestkap"
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2950
!
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2951
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2952
testWriteValueNamedPut_REG_EXPAND_SZ_01
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2953
    "Testing if REG_EXPAND_SZ values are written correctly via valueNamed:put:
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2954
     Data is written and read back again."
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2955
    | readData testingRegistryPath |
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2956
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2957
    testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2958
    testingRegistryPath valueNamed: 'bledesu' put: '"%PATH%"' unexpandedReferences: true.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2959
    readData := testingRegistryPath valueNamed: 'bledesu'.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2960
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2961
    self assert: readData = '"%PATH%"'
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2962
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2963
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2964
     self run:#testWriteValueNamedPut_REG_EXPAND_SZ_01
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2965
     self new testWriteValueNamedPut_REG_EXPAND_SZ_01
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2966
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2967
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2968
    "Created: / 07-12-2018 / 15:08:50 / svestkap"
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  2969
    "Modified: / 12-02-2019 / 14:55:35 / svestkap"
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2970
!
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2971
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2972
testWriteValueNamedPut_REG_EXPAND_SZ_02
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2973
    "Testing if new REG_EXPAND_SZ value name is written correctly via valueNamed:put:
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2974
     Data is written and read back again."
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2975
    | readData testingRegistryPath |
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2976
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2977
    testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2978
    testingRegistryPath valueNamed: 'Yooooル' put: '"%PATH%"' unexpandedReferences: true.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2979
    readData := testingRegistryPath valueNamed:  'Yooooル'.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2980
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2981
    self assert: readData = '"%PATH%"'
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2982
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2983
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2984
     self run:#testWriteValueNamedPut_REG_EXPAND_SZ_02
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2985
     self new testWriteValueNamedPut_REG_EXPAND_SZ_02
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2986
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2987
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2988
    "Created: / 07-12-2018 / 15:09:14 / svestkap"
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  2989
    "Modified: / 12-02-2019 / 14:55:38 / svestkap"
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2990
!
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2991
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2992
testWriteValueNamedPut_REG_EXPAND_SZ_03
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2993
    "Testing if new REG_EXPAND_SZ value name is written correctly via valueNamed:put: with registry type and size check
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2994
     Data is written and read back again."
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2995
    | readData testingRegistryPath registryType |
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2996
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2997
    testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2998
    testingRegistryPath valueNamed: 'Yooooル' put: '"%PATH%"' unexpandedReferences: true.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2999
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3000
    registryType := testingRegistryPath valueTypeAndSize: 'Yooooル'.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3001
    self assert: registryType keys first equals: #REG_EXPAND_SZ.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3002
    self assert: registryType first equals: 8.    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3003
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3004
    readData := testingRegistryPath valueNamed:  'Yooooル'.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3005
    self assert: readData = '"%PATH%"'
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3006
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3007
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3008
     self run:#testWriteValueNamedPut_REG_EXPAND_SZ_03
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3009
     self new testWriteValueNamedPut_REG_EXPAND_SZ_03
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3010
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3011
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3012
    "Created: / 12-12-2018 / 12:41:44 / svestkap"
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  3013
    "Modified (format): / 12-02-2019 / 14:55:44 / svestkap"
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3014
!
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3015
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3016
testWriteValueNamedPut_REG_EXPAND_SZ_04
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3017
    "Testing if REG_EXPAND_SZ values are written correctly via valueNamed:put: with registry type and size check    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3018
     Data is written and read back again (notice the registry type change #REG_SZ to #REG_EXPAND_SZ)."
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3019
    | readData testingRegistryPath registryType |
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3020
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3021
    testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3022
    "/ checking type and size
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3023
    registryType := testingRegistryPath valueTypeAndSize: 'bledesu'.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3024
    self assert: registryType keys first equals: #REG_SZ.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3025
    self assert: registryType first equals: 47.    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3026
    "/ checking the actual value
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3027
    readData := testingRegistryPath valueNamed: 'bledesu'.                                                              
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3028
    self assert: readData = '''Testing Unicode chars ř ž č ルすしかき'').          '.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3029
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3030
    "/ saving value into the registry
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3031
    testingRegistryPath valueNamed: 'bledesu' put: '"%PATH%"' unexpandedReferences: true.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3032
    "/ checking type and size
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3033
    registryType := testingRegistryPath valueTypeAndSize: 'bledesu'.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3034
    self assert: registryType keys first equals: #REG_EXPAND_SZ.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3035
    self assert: registryType first equals: 8.        
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3036
    "/ checking the actual value 
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3037
    readData := testingRegistryPath valueNamed: 'bledesu'.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3038
    self assert: readData = '"%PATH%"'
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3039
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3040
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3041
     self run:#testWriteValueNamedPut_REG_EXPAND_SZ_04
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3042
     self new testWriteValueNamedPut_REG_EXPAND_SZ_04
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3043
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3044
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3045
    "Created: / 12-12-2018 / 13:22:25 / svestkap"
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  3046
    "Modified: / 12-02-2019 / 14:55:52 / svestkap"
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3047
!
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3048
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3049
testWriteValueNamedPut_REG_MULTI_SZ_01
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3050
    "Testing if REG_MULTI_SZ values are write correctly via valueNamed:put:"
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3051
    | readData testingRegistryPath |
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3052
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3053
    testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3054
    testingRegistryPath valueNamed: 'Font_Leelawadee UI Bold' put: #('SEGOEUIB.TTF,Segoe UI Bold,110,82' 'řeřicha - ルすしかき').
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3055
    readData := testingRegistryPath valueNamed: 'Font_Leelawadee UI Bold'.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3056
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3057
    self assert: readData = #('SEGOEUIB.TTF,Segoe UI Bold,110,82' 'řeřicha - ルすしかき').
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3058
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3059
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3060
     self run:#testWriteValueNamedPut_REG_MULTI_SZ_01
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3061
     self new testWriteValueNamedPut_REG_MULTI_SZ_01
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3062
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3063
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3064
    "Created: / 27-11-2018 / 09:29:57 / svestkap"
2086
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  3065
    "Modified (format): / 01-02-2019 / 14:30:32 / svestkap"
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3066
!
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3067
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3068
testWriteValueNamedPut_REG_MULTI_SZ_02
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3069
    "Testing if REG_MULTI_SZ values are write correctly via valueNamed:put:
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  3070
     Note: The value data could be up to available memory on Windows 10 (in reality NOT recommended to go over 1MB).
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  3071
     On older Windows (2003/XP) there was a hard limit on 1MB."
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3072
    | testingRegistryPath testData testDataArray readData |
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3073
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3074
    testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3075
    testData := OrderedCollection new.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3076
    
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  3077
    "This is rather tricky to test.  It must test the functionality but on all windows.  Since older windows have a hard limit
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  3078
     of 1MB (for ASCII).  Since Windows use UTF-16 internal you have to count 2 bytes per 1 character. There maybe a 4bytes per character,
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  3079
     to be on the safe side, the 256kB limit will be used.  On Windows 10 the limit is much higher, perhaps all the available memory."    
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  3080
    "/ 256kB (storing in worst case scenario / 48characters (unicode) -> 5333times        
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  3081
    5333 timesRepeat: [ testData add: 'SEGOEUIB.TTF,Segoe UI Bold,110,82'.
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3082
                       testData add: 'řeřicha - ルすしかき'
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3083
    ].
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3084
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3085
    testDataArray := testData asArray.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3086
    "/ storing the array        
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3087
    testingRegistryPath valueNamed: 'ř ž č ルすしか' put: testDataArray.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3088
    "/ reading the stored array back
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3089
    readData := testingRegistryPath valueNamed: 'ř ž č ルすしか'.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3090
        
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3091
    self assert: readData = testDataArray.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3092
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3093
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3094
     self run:#testWriteValueNamedPut_REG_MULTI_SZ_02
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3095
     self new testWriteValueNamedPut_REG_MULTI_SZ_02
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3096
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3097
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3098
    "Created: / 28-11-2018 / 14:46:55 / svestkap"
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  3099
    "Modified (comment): / 12-02-2019 / 15:08:08 / svestkap"
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3100
!
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3101
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3102
testWriteValueNamedPut_REG_MULTI_SZ_03
2086
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  3103
    "Testing if REG_MULTI_SZ an empty array is written via valueNamed:put:"
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3104
    | readData testingRegistryPath |
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3105
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3106
    testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3107
    testingRegistryPath valueNamed: 'Font_Leelawadee UI Bold' put: Array new.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3108
    readData := testingRegistryPath valueNamed: 'Font_Leelawadee UI Bold'.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3109
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3110
    self assert: readData isEmpty.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3111
    self assert: readData isArray.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3112
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3113
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3114
     self run:#testWriteValueNamedPut_REG_MULTI_SZ_03
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3115
     self new testWriteValueNamedPut_REG_MULTI_SZ_03
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3116
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3117
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3118
    "Created: / 05-12-2018 / 11:54:05 / svestkap"
2086
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  3119
    "Modified (comment): / 01-02-2019 / 14:33:14 / svestkap"
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3120
!
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3121
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3122
testWriteValueNamedPut_REG_MULTI_SZ_04
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3123
    "Testing if new REG_MULTI_SZ value name is written correctly via valueNamed:put:"
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3124
    | readData testingRegistryPath |
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3125
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3126
    testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3127
    testingRegistryPath valueNamed: 'new_reg_multiル' put: #('SEGOEUIB.TTF,Segoe UI Bold,110,82' 'řeřicha - ルすしかき').
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3128
    readData := testingRegistryPath valueNamed: 'new_reg_multiル'.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3129
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3130
    self assert: readData = #('SEGOEUIB.TTF,Segoe UI Bold,110,82' 'řeřicha - ルすしかき').
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3131
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3132
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3133
     self run:#testWriteValueNamedPut_REG_MULTI_SZ_04
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3134
     self new testWriteValueNamedPut_REG_MULTI_SZ_04
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3135
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3136
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3137
    "Created: / 07-12-2018 / 15:08:03 / svestkap"
2086
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  3138
    "Modified (format): / 01-02-2019 / 14:33:54 / svestkap"
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3139
!
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3140
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3141
testWriteValueNamedPut_REG_MULTI_SZ_05
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3142
    "Testing if REG_MULTI_SZ values are write correctly via valueNamed:put: with registry type and size check"
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3143
    | registryType readData testingRegistryPath |
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3144
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3145
    testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3146
    testingRegistryPath valueNamed: 'Font_Leelawadee UI Bold' put: #('SEGOEUIB.TTF,Segoe UI Bold,110,82' 'řeřicha - ルすしかき').
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3147
    readData := testingRegistryPath valueNamed: 'Font_Leelawadee UI Bold'.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3148
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3149
    self assert: readData = #('SEGOEUIB.TTF,Segoe UI Bold,110,82' 'řeřicha - ルすしかき').
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3150
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3151
    registryType := testingRegistryPath valueTypeAndSize: 'Font_Leelawadee UI Bold'.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3152
    self assert: registryType keys first equals: #REG_MULTI_SZ.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3153
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3154
    "/ (array node size + terminating null) + (array node size + terminating null) * sizeof(wchar_t) + terminating null
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3155
    "/ ((Array at: 1) size + 1) + ((Array at: 2) size + 1) * 2 + 1 = (34 + 16) * 2 + 1 = 101     
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3156
    self assert: (registryType at: #REG_MULTI_SZ) equals: 101.       
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3157
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3158
     self run:#testWriteValueNamedPut_REG_MULTI_SZ_05
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3159
     self new testWriteValueNamedPut_REG_MULTI_SZ_05
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3160
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3161
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3162
    "Created: / 12-12-2018 / 11:34:08 / svestkap"
2086
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  3163
    "Modified (format): / 01-02-2019 / 14:34:22 / svestkap"
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3164
!
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3165
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3166
testWriteValueNamedPut_REG_NONE_01
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3167
    "Testing if REG_NONE values are written correctly via valueNamed:put:
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3168
     Data is written and read back again."
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3169
    | readData testingRegistryPath |
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3170
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3171
    testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3172
    testingRegistryPath valueNamed: 'bledesu' put: nil.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3173
    readData := testingRegistryPath valueNamed: 'bledesu'.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3174
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3175
    self assert: readData isNil
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3176
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3177
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3178
     self run:#testWriteValueNamedPut_REG_NONE_01
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3179
     self new testWriteValueNamedPut_REG_NONE_01
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3180
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3181
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3182
    "Created: / 07-12-2018 / 15:06:08 / svestkap"
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  3183
    "Modified: / 12-02-2019 / 14:56:08 / svestkap"
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3184
!
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3185
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3186
testWriteValueNamedPut_REG_NONE_02
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3187
    "Testing if new REG_NONE value name is written correctly via valueNamed:put:
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3188
     Data is written and read back again."
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3189
    | readData testingRegistryPath |
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3190
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3191
    testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3192
    testingRegistryPath valueNamed: 'New nilル name' put: nil.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3193
    readData := testingRegistryPath valueNamed: 'New nilル name'.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3194
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3195
    self assert: readData isNil
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3196
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3197
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3198
     self run:#testWriteValueNamedPut_REG_NONE_02
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3199
     self new testWriteValueNamedPut_REG_NONE_02
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3200
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3201
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3202
    "Created: / 07-12-2018 / 15:06:48 / svestkap"
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  3203
    "Modified: / 12-02-2019 / 14:56:13 / svestkap"
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3204
!
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3205
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3206
testWriteValueNamedPut_REG_NONE_03
2086
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  3207
    "Testing if new REG_NONE value name is written correctly via valueNamed:put: 
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  3208
     with registry type and size check. Data is written and read back again."
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3209
    | readData testingRegistryPath registryType |
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3210
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3211
    testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3212
    testingRegistryPath valueNamed: 'New nilル name' put: nil.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3213
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3214
    registryType := testingRegistryPath valueTypeAndSize: 'New nilル name'.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3215
    self assert: registryType keys first equals: #REG_NONE.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3216
    self assert: registryType first equals: 0.    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3217
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3218
    readData := testingRegistryPath valueNamed: 'New nilル name'.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3219
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3220
    self assert: readData isNil
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3221
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3222
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3223
     self run:#testWriteValueNamedPut_REG_NONE_03
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3224
     self new testWriteValueNamedPut_REG_NONE_03
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3225
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3226
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3227
    "Created: / 12-12-2018 / 12:47:40 / svestkap"
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  3228
    "Modified: / 12-02-2019 / 14:56:19 / svestkap"
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3229
!
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3230
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3231
testWriteValueNamedPut_REG_QWORD_01
2086
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  3232
    "Testing if max QWORD value is written and read correctly from REG_QWORD (valueNamed:put: and valueNamed:).
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  3233
     Storing maximum QWORD value (0xffffffffffffffff -> 18446744073709551615x64)"
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3234
    | readData testingRegistryPath |
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3235
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3236
    testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3237
    testingRegistryPath valueNamed: 'qword_max' put: 18446744073709551615.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3238
    readData := testingRegistryPath valueNamed: 'qword_max'.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3239
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3240
    self assert: readData = 18446744073709551615.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3241
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3242
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3243
     self run:#testReadValueNamed_REG_QWORD_01
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3244
     self new testReadValueNamed_REG_QWORD_01
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3245
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3246
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3247
    "Created: / 26-11-2018 / 14:54:45 / svestkap"
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3248
    "Modified: / 07-12-2018 / 15:11:56 / svestkap"
2086
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  3249
    "Modified (comment): / 01-02-2019 / 14:37:55 / svestkap"
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3250
!
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3251
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3252
testWriteValueNamedPut_REG_QWORD_02
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3253
    "Testing what happens if more then max value is stored in REG_QWORD registry type (valueNamed:put: and valueNamed:)"
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3254
    | readData testingRegistryPath |
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3255
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3256
    testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3257
    "/ max QWORD value is: 0xff-ff-ff-ff-ff-ff-ff-ff -> 18446744073709551615 (on x64 only)
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3258
    testingRegistryPath valueNamed: 'qword_max' put: 18446744073709551700.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3259
    readData := testingRegistryPath valueNamed: 'qword_max'.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3260
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3261
    self assert: readData ~= 18446744073709551700.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3262
    "/ when you try to store more than maximum value you will get only the maximum losing the rest
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3263
    self assert: readData = 18446744073709551615.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3264
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3265
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3266
     self run:#testWriteValueNamedPut_REG_QWORD_02
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3267
     self new testWriteValueNamedPut_REG_QWORD_02
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3268
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3269
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3270
    "Created: / 04-12-2018 / 11:02:20 / svestkap"
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3271
    "Modified: / 07-12-2018 / 15:12:12 / svestkap"
2086
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  3272
    "Modified (format): / 01-02-2019 / 14:36:06 / svestkap"
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3273
!
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3274
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3275
testWriteValueNamedPut_REG_QWORD_03
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3276
    "Testing if new QWORD value name is written and read correctly from REG_QWORD (valueNamed:put: and valueNamed:)"
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3277
    | readData testingRegistryPath |
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3278
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3279
    testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3280
    testingRegistryPath valueNamed: 'qword_new_testingル' put: 18446744073709551101.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3281
    readData := testingRegistryPath valueNamed: 'qword_new_testingル'.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3282
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3283
    self assert: readData = 18446744073709551101.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3284
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3285
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3286
     self run:#testWriteValueNamedPut_REG_QWORD_03
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3287
     self new testWriteValueNamedPut_REG_QWORD_03
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3288
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3289
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3290
    "Created: / 07-12-2018 / 15:05:48 / svestkap"
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  3291
    "Modified: / 12-02-2019 / 14:56:27 / svestkap"
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3292
!
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3293
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3294
testWriteValueNamedPut_REG_QWORD_04
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3295
    "Testing if max QWORD value is written and read correctly from REG_QWORD (valueNamed:put: and valueNamed:)
2086
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  3296
     with registry type and size check. Storing maximum QWORD value (0xffffffffffffffff -> 18446744073709551615(x64))"
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3297
    | readData testingRegistryPath registryType |
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3298
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3299
    testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3300
    testingRegistryPath valueNamed: 'qword_max' put: 18446744073709551615.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3301
    readData := testingRegistryPath valueNamed: 'qword_max'.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3302
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3303
    registryType := testingRegistryPath valueTypeAndSize: 'qword_max'.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3304
    self assert: registryType keys first equals: #REG_QWORD.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3305
    self assert: registryType first equals: 8. "/ 64 bits = 8 bytes
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3306
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3307
    self assert: readData = 18446744073709551615.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3308
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3309
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3310
     self run:#testWriteValueNamedPut_REG_QWORD_04
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3311
     self new testWriteValueNamedPut_REG_QWORD_04
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3312
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3313
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3314
    "Created: / 12-12-2018 / 12:08:35 / svestkap"
2086
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  3315
    "Modified (comment): / 01-02-2019 / 14:36:34 / svestkap"
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3316
!
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3317
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3318
testWriteValueNamedPut_REG_QWORD_05
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3319
    "Testing if max QWORD value is written and read correctly from REG_QWORD (valueNamed:put: and valueNamed:)
2086
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  3320
     with registry type and size check.  Notice the #REG_SZ -> #REG_QWORD change.
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  3321
     Storing maximum QWORD value (0xffffffffffffffff -> 18446744073709551615(x64))"
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3322
    | readData testingRegistryPath registryType |
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3323
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3324
    testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3325
    "/ checking type and size
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3326
    registryType := testingRegistryPath valueTypeAndSize: ' ř ž č ル.          '.    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3327
    self assert: registryType keys first equals: #REG_SZ.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3328
    self assert: registryType first equals: 33. "/ string size
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3329
    "/ checking the value
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3330
    readData := testingRegistryPath valueNamed: ' ř ž č ル.          '.    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3331
    self assert: readData = 'Testing Unicode chars ř ž č ルすしかき'.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3332
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3333
    "/ saving into registry
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3334
    testingRegistryPath valueNamed: ' ř ž č ル.          ' put: 18446744073709551615.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3335
        
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3336
    registryType := testingRegistryPath valueTypeAndSize: ' ř ž č ル.          '.    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3337
    self assert: registryType keys first equals: #REG_QWORD.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3338
    self assert: registryType first equals: 8. "/ 64 bits = 8 bytes
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3339
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3340
    readData := testingRegistryPath valueNamed: ' ř ž č ル.          '.    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3341
    self assert: readData = 18446744073709551615.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3342
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3343
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3344
     self run:#testWriteValueNamedPut_REG_QWORD_05
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3345
     self new testWriteValueNamedPut_REG_QWORD_05
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3346
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3347
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3348
    "Created: / 12-12-2018 / 13:38:31 / svestkap"
2086
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  3349
    "Modified (comment): / 01-02-2019 / 14:37:40 / svestkap"
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3350
!
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3351
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3352
testWriteValueNamedPut_REG_SZ_01
2086
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  3353
    "Testing if REG_SZ values are written correctly via valueNamed:put:.
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3354
     Data is written and read back again."
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3355
    | readData testingRegistryPath |
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3356
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3357
    testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
2086
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  3358
    testingRegistryPath valueNamed: 'bledesu' put: 'řeřicha - ルすしかき'.
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3359
    readData := testingRegistryPath valueNamed: 'bledesu'.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3360
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3361
    self assert: readData = 'řeřicha - ルすしかき'.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3362
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3363
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3364
     self run:#testWriteValueNamedPut_REG_SZ_01
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3365
     self new testWriteValueNamedPut_REG_SZ_01
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3366
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3367
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3368
    "Created: / 26-11-2018 / 09:51:58 / svestkap"
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  3369
    "Modified: / 12-02-2019 / 14:56:40 / svestkap"
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3370
!
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3371
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3372
testWriteValueNamedPut_REG_SZ_02
2086
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  3373
    "Testing if REG_SZ values are written correctly via valueNamed:put:. Data is written and read back again.
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3374
     Note: this is testing Unicode with spaces - probably the worst combination"
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3375
    | readData testingRegistryPath |
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3376
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3377
    testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3378
    testingRegistryPath valueNamed: 'しかき    ' put: 'řeřicha - ルすしかき'.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3379
    readData := testingRegistryPath valueNamed: 'しかき    '.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3380
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3381
    self assert: readData = 'řeřicha - ルすしかき'.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3382
2086
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  3383
    "
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3384
     self run:#testReadValueNamed_REG_SZ_03
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3385
     self new testReadValueNamed_REG_SZ_03
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3386
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3387
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3388
    "Created: / 26-11-2018 / 14:10:35 / svestkap"
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  3389
    "Modified: / 12-02-2019 / 14:56:44 / svestkap"
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3390
!
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3391
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3392
testWriteValueNamedPut_REG_SZ_03
2086
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  3393
    "Testing if REG_SZ empty value is written correctly via valueNamed:put:. Data is written and read back again.
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3394
     Note: this is testing Unicode with spaces - probably the worst combination"
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3395
    | readData testingRegistryPath |
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3396
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3397
    testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3398
    testingRegistryPath valueNamed: 'しかき    ' put: ''.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3399
    readData := testingRegistryPath valueNamed: 'しかき    '.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3400
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3401
    self assert: readData = ''
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3402
2086
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  3403
    "
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3404
     self run:#testWriteValueNamedPut_REG_SZ_03
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3405
     self new testWriteValueNamedPut_REG_SZ_03
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3406
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3407
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3408
    "Created: / 05-12-2018 / 10:16:59 / svestkap"
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  3409
    "Modified: / 12-02-2019 / 14:56:47 / svestkap"
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3410
!
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3411
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3412
testWriteValueNamedPut_REG_SZ_04
2086
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  3413
    "Testing if REG_SZ empty value is written correctly via valueNamed:put:. Data is written and read back again.
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3414
     Note: this is testing Unicode with spaces - probably the worst combination"
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3415
    | readData testingRegistryPath |
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3416
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3417
    testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3418
    testingRegistryPath valueNamed: 'bledesu' put: ''.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3419
    readData := testingRegistryPath valueNamed: 'bledesu'.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3420
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3421
    self assert: readData = ''
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3422
2086
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  3423
    "
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3424
     self run:#testWriteValueNamedPut_REG_SZ_04
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3425
     self new testWriteValueNamedPut_REG_SZ_04
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3426
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3427
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3428
    "Created: / 05-12-2018 / 10:22:39 / svestkap"
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  3429
    "Modified: / 12-02-2019 / 14:56:51 / svestkap"
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3430
!
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3431
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3432
testWriteValueNamedPut_REG_SZ_05
2086
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  3433
    "Testing if REG_SZ completely new value is written correctly via valueNamed:put:.
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3434
     Data is written and read back again."
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3435
    | readData testingRegistryPath |
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3436
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3437
    testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3438
    testingRegistryPath valueNamed: 'Newル guy' put: 'Singルing'.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3439
    readData := testingRegistryPath valueNamed: 'Newル guy'.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3440
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3441
    self assert: readData = 'Singルing'
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3442
2086
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  3443
    "
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3444
     self run:#testWriteValueNamedPut_REG_SZ_05
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3445
     self new testWriteValueNamedPut_REG_SZ_05
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3446
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3447
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3448
    "Created: / 07-12-2018 / 15:03:05 / svestkap"
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  3449
    "Modified: / 12-02-2019 / 14:56:54 / svestkap"
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3450
!
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3451
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3452
testWriteValueNamedPut_REG_SZ_06
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3453
    "Testing if REG_SZ completely new value is written correctly via valueNamed:put: with registry type and size check
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3454
     Data is written and read back again."
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3455
    | readData testingRegistryPath registryType |
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3456
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3457
    testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3458
    testingRegistryPath valueNamed: 'Newル guy' put: 'Singルing'.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3459
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3460
    registryType := testingRegistryPath valueTypeAndSize: 'Newル guy'.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3461
    self assert: registryType keys first equals: #REG_SZ.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3462
    self assert: registryType first equals: 8.           
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3463
   
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3464
    readData := testingRegistryPath valueNamed: 'Newル guy'. 
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3465
    self assert: readData = 'Singルing'
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3466
2086
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  3467
    "
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3468
     self run:#testWriteValueNamedPut_REG_SZ_06
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3469
     self new testWriteValueNamedPut_REG_SZ_06
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3470
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3471
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3472
    "Created: / 12-12-2018 / 12:39:52 / svestkap"
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  3473
    "Modified: / 12-02-2019 / 14:56:58 / svestkap"
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3474
!
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3475
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3476
testWriteValueNamedPut_REG_SZ_07
2086
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  3477
    "Testing if REG_SZ values are written correctly via valueNamed:put:. Data is written and read back again.
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  3478
     Note: the registry type change: #REG_MULTI_SZ to #REG_SZ."
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3479
    | readData testingRegistryPath registryType |
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3480
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3481
    testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3482
    "/ reading type and size
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3483
    registryType := testingRegistryPath valueTypeAndSize: 'ř ž č ルすしか'.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3484
    self assert: registryType keys first equals: #REG_MULTI_SZ.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3485
    self assert: registryType first equals: 974. "/ REG_MULTI_SZ size in bytes
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3486
   
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3487
    "/ saving data (unicode string) into registry
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3488
    testingRegistryPath valueNamed: 'bledesu' put: 'řeřicha - ルすしかき'.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3489
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3490
    registryType := testingRegistryPath valueTypeAndSize: 'bledesu'.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3491
    self assert: registryType keys first equals: #REG_SZ.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3492
    self assert: registryType first equals: 15.              
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3493
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3494
    readData := testingRegistryPath valueNamed: 'bledesu'.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3495
    self assert: readData = 'řeřicha - ルすしかき'.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3496
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3497
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3498
     self run:#testWriteValueNamedPut_REG_SZ_07
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3499
     self new testWriteValueNamedPut_REG_SZ_07
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3500
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3501
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3502
    "Created: / 12-12-2018 / 13:48:00 / svestkap"
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  3503
    "Modified: / 12-02-2019 / 14:57:02 / svestkap"
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3504
! !
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3505
344
21c39da58029 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3506
!Win32OperatingSystemTest class methodsFor:'documentation'!
21c39da58029 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3507
21c39da58029 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3508
version
21c39da58029 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3509
    ^ '$Header$'
1566
2ca58098256d Issue #109: Added tests for registry key creation / deletion
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1500
diff changeset
  3510
!
2ca58098256d Issue #109: Added tests for registry key creation / deletion
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1500
diff changeset
  3511
2ca58098256d Issue #109: Added tests for registry key creation / deletion
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1500
diff changeset
  3512
version_HG
2ca58098256d Issue #109: Added tests for registry key creation / deletion
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1500
diff changeset
  3513
2ca58098256d Issue #109: Added tests for registry key creation / deletion
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1500
diff changeset
  3514
    ^ '$Changeset: <not expanded> $'
344
21c39da58029 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3515
! !
1161
3d9b4eaddcf3 category changes
Claus Gittinger <cg@exept.de>
parents: 675
diff changeset
  3516