RegressionTests__Win32OperatingSystemTest.st
author Patrik Svestka <patrik.svestka@gmail.com>
Wed, 20 Oct 2021 13:26:34 +0200
branchjv
changeset 2604 d6d5dfaa3e00
parent 2593 773015856b61
child 2606 ca1a3083168c
child 2607 ddf2eb8b3f1d
permissions -rwxr-xr-x
Adding tests for creating processes on MS Windows Testing: - correct execution of CreateProcessW() - Too long arguments for dir name, command path, command line
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
2604
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
     6
 COPYRIGHT (c) 2021 svestkap
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
     7
 COPYRIGHT (c) 2021 Patrik Svestka
1974
f2eaf05205d6 Copyright updates
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1566
diff changeset
     8
              All Rights Reserved
f2eaf05205d6 Copyright updates
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1566
diff changeset
     9
f2eaf05205d6 Copyright updates
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1566
diff changeset
    10
 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
    11
 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
    12
 inclusion of the above copyright notice.   This software may not
f2eaf05205d6 Copyright updates
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1566
diff changeset
    13
 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
    14
 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
    15
 hereby transferred.
f2eaf05205d6 Copyright updates
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1566
diff changeset
    16
"
1447
2351db93aa5b package changes
Claus Gittinger <cg@exept.de>
parents: 1392
diff changeset
    17
"{ Package: 'stx:goodies/regression' }"
344
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
"{ NameSpace: RegressionTests }"
21c39da58029 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    20
21c39da58029 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    21
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
    22
	instanceVariableNames:'registryPath windowsDetailsRegistryPath'
675
f98a0bb2f639 changed: #testMutex
Stefan Vogel <sv@exept.de>
parents: 355
diff changeset
    23
	classVariableNames:''
f98a0bb2f639 changed: #testMutex
Stefan Vogel <sv@exept.de>
parents: 355
diff changeset
    24
	poolDictionaries:''
1161
3d9b4eaddcf3 category changes
Claus Gittinger <cg@exept.de>
parents: 675
diff changeset
    25
	category:'tests-Regression-RuntimeSystem'
344
21c39da58029 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    26
!
21c39da58029 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    27
1974
f2eaf05205d6 Copyright updates
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1566
diff changeset
    28
!Win32OperatingSystemTest class methodsFor:'documentation'!
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
f2eaf05205d6 Copyright updates
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1566
diff changeset
    31
"
f2eaf05205d6 Copyright updates
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1566
diff changeset
    32
 COPYRIGHT (c) Claus Gittinger / eXept Software AG
f2eaf05205d6 Copyright updates
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1566
diff changeset
    33
 COPYRIGHT (c) 2016 Jan Vrany
2604
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
    34
 COPYRIGHT (c) 2021 svestkap
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
    35
 COPYRIGHT (c) 2021 Patrik Svestka
1974
f2eaf05205d6 Copyright updates
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1566
diff changeset
    36
              All Rights Reserved
f2eaf05205d6 Copyright updates
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1566
diff changeset
    37
f2eaf05205d6 Copyright updates
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1566
diff changeset
    38
 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
    39
 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
    40
 inclusion of the above copyright notice.   This software may not
f2eaf05205d6 Copyright updates
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1566
diff changeset
    41
 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
    42
 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
    43
 hereby transferred.
f2eaf05205d6 Copyright updates
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1566
diff changeset
    44
"
f2eaf05205d6 Copyright updates
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1566
diff changeset
    45
! !
344
21c39da58029 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    46
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
    47
!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
    48
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
    49
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
    50
9d76442a61bb Issue #250: Tests for 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
^  '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
    52
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
    53
[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
    54
@="しか 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
    55
"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
    56
"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
    57
"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
    58
"しかき    "="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
    59
" ř ž č ル.          "="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
    60
"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
    61
"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
    62
"す    "=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
    63
"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
    64
"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
    65
"き"=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
    66
"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
    67
"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
    68
"すし"=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
    69
"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
    70
  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
    71
  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
    72
  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
    73
  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
    74
  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
    75
  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
    76
  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
    77
  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
    78
  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
    79
  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
    80
  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
    81
  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
    82
  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
    83
  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
    84
  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
    85
  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
    86
  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
    87
  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
    88
  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
    89
  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
    90
  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
    91
  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
    92
  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
    93
  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
    94
  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
    95
  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
    96
  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
    97
  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
    98
  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
    99
  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
   100
  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
   101
  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
   102
  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
   103
  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
   104
  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
   105
  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
   106
"ř ž č ルすしか"=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
   107
  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
   108
  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
   109
  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
   110
  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
   111
  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
   112
  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
   113
  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
   114
  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
   115
  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
   116
  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
   117
  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
   118
  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
   119
  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
   120
  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
   121
  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
   122
  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
   123
  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
   124
  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
   125
  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
   126
  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
   127
  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
   128
  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
   129
  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
   130
  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
   131
  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
   132
  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
   133
  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
   134
  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
   135
  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
   136
  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
   137
  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
   138
  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
   139
  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
   140
  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
   141
  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
   142
  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
   143
  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
   144
  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
   145
  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
   146
"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
   147
  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
   148
  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
   149
  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
   150
" č ルすしか"=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
   151
  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
   152
  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
   153
  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
   154
  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
   155
[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
   156
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
   157
[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
   158
"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
   159
"しかき    "="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
   160
" ř ž č ル.          "="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
   161
"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
   162
"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
   163
"す    "=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
   164
"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
   165
"き"=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
   166
"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
   167
"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
   168
"すし"=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
   169
"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
   170
  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
   171
  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
   172
  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
   173
  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
   174
  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
   175
  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
   176
  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
   177
  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
   178
  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
   179
  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
   180
  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
   181
  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
   182
  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
   183
  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
   184
  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
   185
  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
   186
  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
   187
  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
   188
  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
   189
  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
   190
  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
   191
  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
   192
  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
   193
  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
   194
  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
   195
  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
   196
  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
   197
  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
   198
  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
   199
  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
   200
  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
   201
  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
   202
  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
   203
  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
   204
  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
   205
  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
   206
"ř ž č ルすしか"=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
   207
  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
   208
  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
   209
  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
   210
  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
   211
  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
   212
  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
   213
  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
   214
  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
   215
  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
   216
  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
   217
  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
   218
  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
   219
  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
   220
  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
   221
  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
   222
  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
   223
  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
   224
  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
   225
  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
   226
  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
   227
  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
   228
  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
   229
  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
   230
  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
   231
  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
   232
  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
   233
  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
   234
  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
   235
  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
   236
  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
   237
  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
   238
  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
   239
  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
   240
  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
   241
  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
   242
  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
   243
  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
   244
  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
   245
  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
   246
"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
   247
  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
   248
  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
   249
  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
   250
" č ルすしか"=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
   251
  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
   252
  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
   253
  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
   254
  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
   255
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
   256
[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
   257
"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
   258
"か"=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
   259
"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
   260
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
   261
[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
   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\ ルすしか\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
   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\ ルすしか\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
   266
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
   267
[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
   268
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
   269
[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
   270
"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
   271
"しかき    "="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
   272
" ř ž č ル.          "="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
   273
"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
   274
"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
   275
"す    "=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
   276
"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
   277
"き"=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
   278
"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
   279
"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
   280
"すし"=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
   281
"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
   282
  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
   283
  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
   284
  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
   285
  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
   286
  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
   287
  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
   288
  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
   289
  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
   290
  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
   291
  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
   292
  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
   293
  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
   294
  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
   295
  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
   296
  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
   297
  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
   298
  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
   299
  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
   300
  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
   301
  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
   302
  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
   303
  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
   304
  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
   305
  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
   306
  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
   307
  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
   308
  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
   309
  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
   310
  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
   311
  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
   312
  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
   313
  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
   314
  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
   315
  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
   316
  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
   317
  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
   318
"ř ž č ルすしか"=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
   319
  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
   320
  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
   321
  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
   322
  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
   323
  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
   324
  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
   325
  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
   326
  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
   327
  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
   328
  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
   329
  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
   330
  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
   331
  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
   332
  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
   333
  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
   334
  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
   335
  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
   336
  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
   337
  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
   338
  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
   339
  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
   340
  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
   341
  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
   342
  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
   343
  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
   344
  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
   345
  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
   346
  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
   347
  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
   348
  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
   349
  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
   350
  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
   351
  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
   352
  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
   353
  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
   354
  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
   355
  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
   356
  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
   357
  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
   358
"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
   359
  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
   360
  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
   361
  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
   362
" č ルすしか"=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
   363
  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
   364
  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
   365
  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
   366
  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
   367
[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
   368
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
[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
   370
@=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
   371
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
   372
[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
   373
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
[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
   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
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   377
    "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
   378
    "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
   379
! !
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   380
344
21c39da58029 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   381
!Win32OperatingSystemTest methodsFor:'release'!
21c39da58029 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   382
1566
2ca58098256d Issue #109: Added tests for registry key creation / deletion
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1500
diff changeset
   383
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
   384
    | 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
   385
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
   386
    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
   387
    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
   388
    
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
   389
    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
   390
    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
   391
    "/ 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
   392
    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
   393
    "/ 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
   394
    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
   395
    
9d76442a61bb Issue #250: Tests for 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
    "/ 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
   397
    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
   398
        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
   399
        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
   400
        
9d76442a61bb Issue #250: Tests for 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
    "/ 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
   402
    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
   403
9d76442a61bb Issue #250: Tests for 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
    "/ 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
   405
9d76442a61bb Issue #250: Tests for 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
    " 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
   407
      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
   408
      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
   409
      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
   410
9d76442a61bb Issue #250: Tests for 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
    "/ 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
   412
    " 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
   413
       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
   414
       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
   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
    "/ 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
   417
    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
   418
       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
   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
    
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   421
    "/ 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
   422
    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
   423
     
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   424
    [   "/ 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
   425
        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
   426
    ] 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
   427
    
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
   428
    "/ 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
   429
    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
   430
    "/ 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
   431
    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
   432
2ca58098256d Issue #109: Added tests for registry key creation / deletion
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1500
diff changeset
   433
    "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
   434
    "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
   435
!
9d76442a61bb Issue #250: Tests for 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
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
   438
    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
   439
    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
   440
    
9d76442a61bb Issue #250: Tests for 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
    "/ 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
   442
    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
   443
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   444
    "/ 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
   445
    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
   446
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   447
    "Created: / 16-11-2018 / 11:29:12 / svestkap"
344
21c39da58029 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   448
! !
21c39da58029 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   449
2604
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   450
!Win32OperatingSystemTest methodsFor:'test-creatingProcess'!
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   451
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   452
testCorrectExec
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   453
    "Testing correctly executed cmd with arguments as string"
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   454
    | createProcessArgumentsLimit cmdInterpreterPath commandLineArguments atDir handle |
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   455
    
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   456
    "CreateProcess supports 32767 characters/bytes including all variables and values
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   457
     so take a good average for its arguments 4096"
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   458
    createProcessArgumentsLimit:= 4096.
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   459
    
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   460
    cmdInterpreterPath := OperatingSystem pathOfCommand: 'cmd'.
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   461
    self assert: cmdInterpreterPath size < createProcessArgumentsLimit. "/
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   462
    
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   463
    "/ cmd.exe - /C Carries out the command specified by string and then terminates
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   464
    commandLineArguments := '/C cd'.      
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   465
    self assert: commandLineArguments size = 5.
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   466
    
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   467
    atDir := Filename currentDirectory pathName.
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   468
    self assert: atDir size < createProcessArgumentsLimit.
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   469
    
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   470
    self shouldnt: [
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   471
         handle := OperatingSystem exec: cmdInterpreterPath withArguments: commandLineArguments
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   472
                     environment:nil
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   473
                 fileDescriptors:nil
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   474
                            fork:true
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   475
                         newPgrp:false
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   476
                     inDirectory: atDir.
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   477
    ] raise: Exception.
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   478
    
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   479
    self assert: handle notNil.
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   480
    self assert: (handle isKindOf: Win32OperatingSystem::Win32ProcessHandle).
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   481
    self assert: (OperatingSystem isProcessIdPresent: handle pid)
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   482
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   483
    "Created: / 21-10-2021 / 12:24:18 / svestkap"
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   484
!
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   485
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   486
testCorrectExec2
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   487
    "Testing correctly executed cmd with arguments as array"
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   488
    | createProcessArgumentsLimit cmdInterpreterPath commandLineArguments atDir handle |
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   489
    
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   490
    "CreateProcess supports 32767 characters/bytes including all variables and values
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   491
     so take a good average for its arguments 4096"
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   492
    createProcessArgumentsLimit:= 4096.          
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   493
    
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   494
    cmdInterpreterPath := OperatingSystem pathOfCommand: 'cmd'.
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   495
    self assert: cmdInterpreterPath size < createProcessArgumentsLimit.
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   496
    
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   497
    commandLineArguments := Array new: 2.
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   498
    commandLineArguments at: 1 put: '/C'. "/Carries out the command specified by string and then terminates
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   499
    commandLineArguments at: 2 put: 'cd'.
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   500
    self assert: commandLineArguments size = 2.
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   501
    
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   502
    atDir := Filename currentDirectory pathName.
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   503
    self assert: atDir size < createProcessArgumentsLimit.      
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   504
    
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   505
    self shouldnt: [
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   506
         handle := OperatingSystem exec: cmdInterpreterPath withArguments: commandLineArguments
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   507
                     environment:nil
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   508
                 fileDescriptors:nil
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   509
                            fork:true
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   510
                         newPgrp:false
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   511
                     inDirectory: Filename currentDirectory pathName.
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   512
    ] raise: Exception.
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   513
    
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   514
    self assert: handle notNil.
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   515
    self assert: (handle isKindOf: Win32OperatingSystem::Win32ProcessHandle).
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   516
    self assert: (OperatingSystem isProcessIdPresent: handle pid)
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   517
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   518
    "Created: / 21-10-2021 / 12:24:31 / svestkap"
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   519
!
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   520
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   521
testExecCreatedProcessError
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   522
    "Testing created process exception is proceedable"
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   523
    | commandLine savedException |
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   524
      
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   525
    commandLine := '..'.
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   526
    self assert: commandLine size = 2.
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   527
        
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   528
    self should: [
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   529
         OperatingSystem exec: 'cd' withArguments: commandLine
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   530
                  environment:nil
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   531
              fileDescriptors:nil
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   532
                         fork:true
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   533
                      newPgrp:false
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   534
                  inDirectory: Filename currentDirectory pathName
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   535
    ] raise: Exception
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   536
    suchThat: [ :ex | 
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   537
        savedException := ex.
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   538
        ex description includesString: 'File does not exist - CreateProcessW() has failed (File not found)'
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   539
    ].
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   540
    "/ the error is NOT proceedable
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   541
    self deny: savedException willProceed
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   542
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   543
    "Created: / 21-10-2021 / 12:16:45 / svestkap"
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   544
    "Modified: / 26-11-2021 / 09:51:15 / Patrik Svestka <patrik.svestka@gmail.com>"
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   545
!
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   546
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   547
testExecCreatedProcessError2
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   548
    "Testing if created process exception proceeds with nil"
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   549
    | commandLine handle |
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   550
      
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   551
    commandLine := '..'.
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   552
    self assert: commandLine size = 2.
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   553
    
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   554
    handle := Win32OperatingSystem::Win32ProcessHandle new.
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   555
    self assert: handle notNil.
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   556
    self assert: (handle isKindOf: Win32OperatingSystem::Win32ProcessHandle).
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   557
    self assert: handle pid isNil.       
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   558
    
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   559
    Exception handle: [ :ex |
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   560
        ex proceed
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   561
    ] do: [ 
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   562
        handle := OperatingSystem exec: 'cd' withArguments: commandLine
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   563
                           environment:nil
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   564
                       fileDescriptors:nil
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   565
                                  fork:true
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   566
                               newPgrp:false
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   567
                           inDirectory: Filename currentDirectory pathName
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   568
    ].
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   569
    "/ after exception has occured, continue to see if handle is nil    
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   570
    self assert: handle isNil.
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   571
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   572
    "Created: / 21-10-2021 / 12:54:07 / svestkap"
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   573
!
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   574
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   575
testExecWithTooLongCommandLine
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   576
    "Creating process with too long command line - should raise an exception"
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   577
    | beyondCreateProcessArgumentsLimit commandLine savedException |
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   578
    
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   579
    beyondCreateProcessArgumentsLimit := 4096.    
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   580
    commandLine := RandomGenerator new nextCharacters: beyondCreateProcessArgumentsLimit.
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   581
    self assert: commandLine size = beyondCreateProcessArgumentsLimit.
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   582
    
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   583
    self should: [
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   584
        OperatingSystem exec: '' withArguments: commandLine
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   585
                 environment:nil
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   586
             fileDescriptors:nil
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   587
                        fork:true
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   588
                     newPgrp:false
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   589
                 inDirectory: Filename currentDirectory pathName
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   590
    ] raise: Exception
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   591
    suchThat: [ :ex | 
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   592
        savedException := ex.
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   593
        ex description includesString: 'Invalid Arguments - commandLineUni16 exceeded size limit (4096 characters) (Invalid parameter)'.
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   594
    ].
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   595
    "/ the exception is NOT proceedable
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   596
    self deny: savedException willProceed
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   597
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   598
    "Created: / 21-10-2021 / 12:16:53 / svestkap"
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   599
    "Modified (comment): / 26-11-2021 / 09:49:21 / Patrik Svestka <patrik.svestka@gmail.com>"
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   600
!
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   601
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   602
testExecWithTooLongCommandLine2
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   603
    "Testing if the exception is proceedable and if it returns nil"
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   604
    | beyondCreateProcessArgumentsLimit commandLine handle |
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   605
    
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   606
    beyondCreateProcessArgumentsLimit := 4097.         
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   607
    "/ created random String size 4097
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   608
    commandLine := RandomGenerator new nextCharacters: beyondCreateProcessArgumentsLimit.
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   609
    self assert: commandLine size = beyondCreateProcessArgumentsLimit.
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   610
    
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   611
    handle := Win32OperatingSystem::Win32ProcessHandle new.
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   612
    self assert: handle notNil.
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   613
    self assert: (handle isKindOf: Win32OperatingSystem::Win32ProcessHandle).
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   614
    self assert: handle pid isNil.
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   615
    
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   616
    Exception handle: [ :ex | 
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   617
        ex proceed
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   618
    ] do: [ 
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   619
         handle := OperatingSystem exec: '' withArguments: commandLine
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   620
                     environment:nil
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   621
                 fileDescriptors:nil
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   622
                            fork:true
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   623
                         newPgrp:false
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   624
                     inDirectory: Filename currentDirectory pathName
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   625
    ]. 
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   626
    "/ after exception has occured, continue to see if handle is nil    
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   627
    self assert: handle isNil.
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   628
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   629
    "Created: / 21-10-2021 / 12:17:02 / svestkap"
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   630
!
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   631
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   632
testExecWithTooLongCommandPath
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   633
    "Creating process with too long command path - should raise an exception"
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   634
    | beyondCreateProcessArgumentsLimit commandPath savedException |
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   635
    
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   636
    beyondCreateProcessArgumentsLimit := 4096.
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   637
    commandPath := RandomGenerator new nextCharacters: beyondCreateProcessArgumentsLimit.
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   638
    self assert: commandPath size = beyondCreateProcessArgumentsLimit.
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   639
    
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   640
    self should: [
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   641
        OperatingSystem exec: commandPath withArguments: ''
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   642
                 environment:nil
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   643
             fileDescriptors:nil
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   644
                        fork:true
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   645
                     newPgrp:false
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   646
                 inDirectory: Filename currentDirectory pathName
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   647
    ] raise: Exception
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   648
    suchThat: [ :ex | 
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   649
        savedException := ex.
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   650
        ex description includesString: 'Invalid Arguments - commandPathUni16 exceeded size limit (4096 characters) (Invalid parameter)'.
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   651
    ].
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   652
    "/ the error is NOT proceedable
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   653
    self deny: savedException willProceed
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   654
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   655
    "Created: / 21-10-2021 / 12:18:26 / svestkap"
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   656
    "Modified (comment): / 26-11-2021 / 09:49:30 / Patrik Svestka <patrik.svestka@gmail.com>"
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   657
!
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   658
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   659
testExecWithTooLongCommandPath2
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   660
    "Testing if the exception is proceedable and if it returns nil"
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   661
    | beyondCreateProcessArgumentsLimit commandPath handle |
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   662
    
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   663
    beyondCreateProcessArgumentsLimit := 4097.
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   664
    "/ created random String size 4097
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   665
    commandPath := RandomGenerator new nextCharacters: beyondCreateProcessArgumentsLimit.
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   666
    self assert: commandPath size = beyondCreateProcessArgumentsLimit.
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   667
    
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   668
    handle := Win32OperatingSystem::Win32ProcessHandle new.
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   669
    self assert: handle notNil.
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   670
    self assert: (handle isKindOf: Win32OperatingSystem::Win32ProcessHandle).
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   671
    self assert: handle pid isNil.
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   672
    
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   673
    Exception handle: [ :ex | 
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   674
        ex proceed
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   675
    ] do: [ 
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   676
         handle := OperatingSystem exec: commandPath withArguments: ''
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   677
                     environment:nil
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   678
                 fileDescriptors:nil
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   679
                            fork:true
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   680
                         newPgrp:false
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   681
                     inDirectory: Filename currentDirectory pathName
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   682
    ]. 
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   683
    "/ after exception has occured, continue to see if handle is nil    
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   684
    self assert: handle isNil.
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   685
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   686
    "Created: / 21-10-2021 / 12:19:37 / svestkap"
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   687
!
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   688
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   689
testExecWithTooLongDirName
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   690
    "Creating process with too long command path - should raise an exception"
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   691
    | beyondCreateProcessArgumentsLimit dirName savedException |
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   692
    
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   693
    beyondCreateProcessArgumentsLimit := 4096.
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   694
    dirName := RandomGenerator new nextCharacters: beyondCreateProcessArgumentsLimit.
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   695
    self assert: dirName size = beyondCreateProcessArgumentsLimit.
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   696
    
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   697
    self should: [
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   698
        OperatingSystem exec: '' withArguments: ''
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   699
                 environment:nil
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   700
             fileDescriptors:nil
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   701
                        fork:true
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   702
                     newPgrp:false
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   703
                 inDirectory: dirName
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   704
    ] raise: Exception
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   705
    suchThat: [ :ex | 
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   706
        savedException := ex.
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   707
        ex description includesString: 'Invalid Arguments - dirNameUni16 exceeded size limit (4096 characters) (Invalid parameter)'.
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   708
    ].
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   709
    "/ the exception is NOT proceedable
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   710
    self deny: savedException willProceed
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   711
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   712
    "Created: / 21-10-2021 / 12:22:38 / svestkap"
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   713
    "Modified (comment): / 26-11-2021 / 09:49:38 / Patrik Svestka <patrik.svestka@gmail.com>"
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   714
!
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   715
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   716
testExecWithTooLongDirName2
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   717
    "Testing if the exception is proceedable and if it returns nil"
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   718
    | beyondCreateProcessArgumentsLimit dirName handle |
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   719
    
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   720
    beyondCreateProcessArgumentsLimit := 4097.
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   721
    dirName := RandomGenerator new nextCharacters: beyondCreateProcessArgumentsLimit.
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   722
    self assert: dirName size = beyondCreateProcessArgumentsLimit.
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   723
    
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   724
    handle := Win32OperatingSystem::Win32ProcessHandle new.
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   725
    self assert: handle notNil.
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   726
    self assert: (handle isKindOf: Win32OperatingSystem::Win32ProcessHandle).
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   727
    self assert: handle pid isNil.
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   728
    
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   729
    Exception handle: [ :ex | 
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   730
        ex proceed
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   731
    ] do: [ 
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   732
         handle := OperatingSystem exec: '' withArguments: ''
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   733
                     environment:nil
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   734
                 fileDescriptors:nil
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   735
                            fork:true
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   736
                         newPgrp:false
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   737
                     inDirectory: dirName
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   738
    ]. 
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   739
    "/ after exception has occured, continue to see if handle is nil    
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   740
    self assert: handle isNil.
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   741
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   742
    "Created: / 21-10-2021 / 12:21:54 / svestkap"
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   743
! !
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   744
344
21c39da58029 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   745
!Win32OperatingSystemTest methodsFor:'tests'!
21c39da58029 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   746
21c39da58029 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   747
testMutex
21c39da58029 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   748
    |handle alreadyExists lastErrorCode handleAndLastErrorCode|
21c39da58029 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   749
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
   750
    handleAndLastErrorCode := Win32OperatingSystem createMutexNamed: UUID new printString.
344
21c39da58029 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   751
    handle := handleAndLastErrorCode first.
21c39da58029 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   752
    handle isNil ifTrue:[^ self].
21c39da58029 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   753
    lastErrorCode := handleAndLastErrorCode second.
21c39da58029 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   754
    self assert: lastErrorCode == 0.
21c39da58029 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   755
    alreadyExists := (lastErrorCode == 5 "ERROR_ACCESS_DENIED" or:[ lastErrorCode == 183 "ERROR_ALREADY_EXISTS"]).
21c39da58029 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   756
    alreadyExists ifTrue:[
1566
2ca58098256d Issue #109: Added tests for registry key creation / deletion
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1500
diff changeset
   757
        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
   758
        ^ self.
344
21c39da58029 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   759
    ].
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
   760
    [
f53c1ec52418 `Win32OperatingSystemTest`: use generated mutex name to allow tests to run in parallel
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1974
diff changeset
   761
        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
   762
        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
   763
        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
   764
        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
   765
    ] 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
   766
        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
   767
        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
   768
    ].
f53c1ec52418 `Win32OperatingSystemTest`: use generated mutex name to allow tests to run in parallel
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1974
diff changeset
   769
344
21c39da58029 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   770
21c39da58029 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   771
    "
21c39da58029 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   772
     self new testMutex
21c39da58029 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   773
    "
1566
2ca58098256d Issue #109: Added tests for registry key creation / deletion
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1500
diff changeset
   774
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
   775
    "Modified: / 28-06-2018 / 09:14:35 / jv"
1352
e0d857144dbf #FEATURE
Claus Gittinger <cg@exept.de>
parents: 1161
diff changeset
   776
!
e0d857144dbf #FEATURE
Claus Gittinger <cg@exept.de>
parents: 1161
diff changeset
   777
e0d857144dbf #FEATURE
Claus Gittinger <cg@exept.de>
parents: 1161
diff changeset
   778
testRegistry
e0d857144dbf #FEATURE
Claus Gittinger <cg@exept.de>
parents: 1161
diff changeset
   779
    |k hasContentType|
e0d857144dbf #FEATURE
Claus Gittinger <cg@exept.de>
parents: 1161
diff changeset
   780
e0d857144dbf #FEATURE
Claus Gittinger <cg@exept.de>
parents: 1161
diff changeset
   781
    k := OperatingSystem registryEntry key:'HKEY_CLASSES_ROOT\MIME\Database\'.
e0d857144dbf #FEATURE
Claus Gittinger <cg@exept.de>
parents: 1161
diff changeset
   782
    self assert:(k notNil).
e0d857144dbf #FEATURE
Claus Gittinger <cg@exept.de>
parents: 1161
diff changeset
   783
e0d857144dbf #FEATURE
Claus Gittinger <cg@exept.de>
parents: 1161
diff changeset
   784
    hasContentType := false.
1447
2351db93aa5b package changes
Claus Gittinger <cg@exept.de>
parents: 1392
diff changeset
   785
    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
   786
        "/ Transcript showCR:nm.
2ca58098256d Issue #109: Added tests for registry key creation / deletion
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1500
diff changeset
   787
        nm = 'Content Type' ifTrue:[hasContentType := true].
1352
e0d857144dbf #FEATURE
Claus Gittinger <cg@exept.de>
parents: 1161
diff changeset
   788
    ].
e0d857144dbf #FEATURE
Claus Gittinger <cg@exept.de>
parents: 1161
diff changeset
   789
    self assert:hasContentType.
e0d857144dbf #FEATURE
Claus Gittinger <cg@exept.de>
parents: 1161
diff changeset
   790
e0d857144dbf #FEATURE
Claus Gittinger <cg@exept.de>
parents: 1161
diff changeset
   791
    "/ k subKeysDo:[:k | Transcript showCR:k].
e0d857144dbf #FEATURE
Claus Gittinger <cg@exept.de>
parents: 1161
diff changeset
   792
e0d857144dbf #FEATURE
Claus Gittinger <cg@exept.de>
parents: 1161
diff changeset
   793
    "
e0d857144dbf #FEATURE
Claus Gittinger <cg@exept.de>
parents: 1161
diff changeset
   794
     self new testRegistry
e0d857144dbf #FEATURE
Claus Gittinger <cg@exept.de>
parents: 1161
diff changeset
   795
    "
1566
2ca58098256d Issue #109: Added tests for registry key creation / deletion
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1500
diff changeset
   796
2ca58098256d Issue #109: Added tests for registry key creation / deletion
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1500
diff changeset
   797
    "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
   798
!
2ca58098256d Issue #109: Added tests for registry key creation / deletion
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1500
diff changeset
   799
2ca58098256d Issue #109: Added tests for registry key creation / deletion
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1500
diff changeset
   800
testRegistry02a
2ca58098256d Issue #109: Added tests for registry key creation / deletion
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1500
diff changeset
   801
    | root key |
2ca58098256d Issue #109: Added tests for registry key creation / deletion
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1500
diff changeset
   802
2ca58098256d Issue #109: Added tests for registry key creation / deletion
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1500
diff changeset
   803
    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
   804
    root deleteSubKeyNamed: testSelector.
2ca58098256d Issue #109: Added tests for registry key creation / deletion
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1500
diff changeset
   805
2ca58098256d Issue #109: Added tests for registry key creation / deletion
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1500
diff changeset
   806
    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
   807
    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
   808
2ca58098256d Issue #109: Added tests for registry key creation / deletion
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1500
diff changeset
   809
    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
   810
    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
   811
    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
   812
2ca58098256d Issue #109: Added tests for registry key creation / deletion
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1500
diff changeset
   813
    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
   814
    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
   815
    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
   816
2ca58098256d Issue #109: Added tests for registry key creation / deletion
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1500
diff changeset
   817
    "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
   818
    "Modified: / 05-01-2017 / 21:45:20 / jv"
344
21c39da58029 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   819
! !
21c39da58029 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   820
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
   821
!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
   822
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   823
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
   824
    "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
   825
    | 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
   826
    
823598772842 Issue #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
    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
   828
    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
   829
    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
   830
    
823598772842 Issue #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
    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
   832
    "/ 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
   833
    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
   834
    "/ 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
   835
    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
   836
    
823598772842 Issue #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
    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
   838
    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
   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
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   841
     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
   842
     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
   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
823598772842 Issue #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
    "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
   846
    "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
   847
!
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   848
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   849
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
   850
    "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
   851
    | 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
   852
823598772842 Issue #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
    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
   854
    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
   855
    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
   856
823598772842 Issue #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
    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
   858
    "/ 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
   859
    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
   860
    "/ 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
   861
    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
   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
    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
   864
    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
   865
823598772842 Issue #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
     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
   868
     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
   869
    "
823598772842 Issue #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
    "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
   872
    "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
   873
!
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   874
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   875
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
   876
    "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
   877
    | 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
   878
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
   879
    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
   880
    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
   881
    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
   882
        
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
   883
    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
   884
    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
   885
    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
   886
    
823598772842 Issue #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
    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
   888
    "/ 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
   889
    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
   890
    "/ 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
   891
    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
   892
    
823598772842 Issue #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
    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
   894
    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
   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
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   897
     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
   898
     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
   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
823598772842 Issue #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
    "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
   902
    "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
   903
!
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   904
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   905
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
   906
    "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
   907
    | 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
   908
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
   909
    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
   910
    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
   911
    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
   912
                                                                   
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
   913
    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
   914
    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
   915
    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
   916
823598772842 Issue #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: 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
   918
    "/ 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
   919
    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
   920
    "/ 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
   921
    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
   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
    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
   924
    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
   925
823598772842 Issue #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
     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
   928
     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
   929
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   930
823598772842 Issue #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
    "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
   932
    "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
   933
!
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   934
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   935
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
   936
    "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
   937
    | 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
   938
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
   939
    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
   940
    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
   941
    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
   942
 
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
   943
    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
   944
    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
   945
    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
   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
    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
   948
    "/ 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
   949
    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
   950
    "/ 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
   951
    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
   952
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   953
    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
   954
    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
   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
    "
823598772842 Issue #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
     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
   958
     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
   959
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   960
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   961
    "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
   962
    "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
   963
!
823598772842 Issue #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
823598772842 Issue #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
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
   966
    "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
   967
    | 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
   968
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
   969
    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
   970
    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
   971
    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
   972
 
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
   973
    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
   974
    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
   975
    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
   976
    
823598772842 Issue #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 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
   978
    "/ 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
   979
    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
   980
    "/ 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
   981
    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
   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
    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
   984
    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
   985
823598772842 Issue #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
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   987
     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
   988
     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
   989
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   990
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   991
    "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
   992
    "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
   993
! !
823598772842 Issue #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
823598772842 Issue #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
!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
   996
823598772842 Issue #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
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
   998
    "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
   999
    | 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
  1000
       
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
  1001
    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
  1002
    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
  1003
    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
  1004
    
823598772842 Issue #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
    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
  1006
    "/ 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
  1007
    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
  1008
823598772842 Issue #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
    "/ 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
  1010
    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
  1011
    
823598772842 Issue #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
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1013
     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
  1014
     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
  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
823598772842 Issue #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
    "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
  1018
    "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
  1019
!
823598772842 Issue #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
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
  1022
    "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
  1023
    | 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
  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
    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
  1026
    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
  1027
    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
  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
    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
  1030
    "/ 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
  1031
    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
  1032
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1033
    "/ 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
  1034
    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
  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
    "
823598772842 Issue #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
     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
  1038
     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
  1039
    "
823598772842 Issue #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
823598772842 Issue #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
    "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
  1042
    "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
  1043
!
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1044
823598772842 Issue #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
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
  1046
    "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
  1047
    | 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
  1048
     
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1049
    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
  1050
    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
  1051
    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
  1052
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1053
    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
  1054
    "/ 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
  1055
    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
  1056
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1057
    "/ 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
  1058
    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
  1059
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1060
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1061
     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
  1062
     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
  1063
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1064
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1065
    "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
  1066
    "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
  1067
!
823598772842 Issue #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
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
  1070
    "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
  1071
    | 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
  1072
     
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1073
    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
  1074
    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
  1075
    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
  1076
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1077
    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
  1078
    "/ 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
  1079
    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
  1080
823598772842 Issue #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
    "/ 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
  1082
    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
  1083
    
823598772842 Issue #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:#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
  1086
     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
  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 / 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
  1090
    "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
  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
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
  1093
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
  1094
    "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
  1095
    | 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
  1096
     
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1097
    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
  1098
    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
  1099
    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
  1100
    
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1101
    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
  1102
    "/ 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
  1103
    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
  1104
         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
  1105
         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
  1106
         
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1107
    "
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1108
     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
  1109
     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
  1110
    "
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1111
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1112
    "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
  1113
!
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1114
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
  1115
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
  1116
    "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
  1117
    | 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
  1118
   
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  1119
    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
  1120
    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
  1121
    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
  1122
        
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
  1123
    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
  1124
    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
  1125
    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
  1126
    
823598772842 Issue #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: 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
  1128
    "/ 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
  1129
    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
  1130
823598772842 Issue #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
    "/ 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
  1132
    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
  1133
    
823598772842 Issue #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
    "
823598772842 Issue #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
     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
  1136
     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
  1137
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1138
823598772842 Issue #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
    "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
  1140
    "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
  1141
!
823598772842 Issue #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
823598772842 Issue #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
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
  1144
    "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
  1145
    | 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
  1146
   
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  1147
    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
  1148
    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
  1149
    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
  1150
                                                                     
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
  1151
    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
  1152
    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
  1153
    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
  1154
    
823598772842 Issue #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: 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
  1156
    "/ 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
  1157
    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
  1158
823598772842 Issue #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
    "/ 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
  1160
    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
  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
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1163
     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
  1164
     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
  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
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1167
    "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
  1168
    "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
  1169
!
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1170
823598772842 Issue #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
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
  1172
    "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
  1173
    | 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
  1174
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  1175
    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
  1176
    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
  1177
    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
  1178
                                                                    
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
  1179
    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
  1180
    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
  1181
    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
  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 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
  1184
    "/ 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
  1185
    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
  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
    "/ 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
  1188
    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
  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
     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
  1192
     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
  1193
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1194
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1195
    "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
  1196
    "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
  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
823598772842 Issue #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
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
  1200
    "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
  1201
    | 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
  1202
   
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  1203
    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
  1204
    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
  1205
    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
  1206
                                                                    
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
  1207
    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
  1208
    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
  1209
    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
  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
    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
  1212
    "/ 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
  1213
    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
  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
    "/ 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
  1216
    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
  1217
    
823598772842 Issue #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
    "
823598772842 Issue #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
     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
  1220
     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
  1221
    "
823598772842 Issue #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
    "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
  1224
    "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
  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
823598772842 Issue #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
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
  1228
    "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
  1229
    | 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
  1230
   
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  1231
    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
  1232
    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
  1233
    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
  1234
                                                                       
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
    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
  1236
    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
  1237
    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
  1238
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1239
    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
  1240
    "/ 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
  1241
    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
  1242
    "/ 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
  1243
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1244
    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
  1245
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1246
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1247
     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
  1248
     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
  1249
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1250
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1251
    "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
  1252
    "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
  1253
!
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1254
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1255
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
  1256
    "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
  1257
    | 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
  1258
   
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  1259
    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
  1260
    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
  1261
    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
  1262
                                                                   
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
  1263
    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
  1264
    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
  1265
    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
  1266
    
823598772842 Issue #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
    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
  1268
    "/ 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
  1269
    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
  1270
    "/ 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
  1271
823598772842 Issue #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 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
  1273
    
823598772842 Issue #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
     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
  1276
     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
  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
823598772842 Issue #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
    "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
  1280
    "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
  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
823598772842 Issue #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
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
  1284
    "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
  1285
    | 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
  1286
       
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
  1287
    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
  1288
    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
  1289
    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
  1290
    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
  1291
    
823598772842 Issue #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
    "/ 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
  1293
    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
  1294
    "/ 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
  1295
    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
  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
    "
823598772842 Issue #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 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
  1299
     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
  1300
    "
823598772842 Issue #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
823598772842 Issue #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
    "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
  1303
    "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
  1304
!
823598772842 Issue #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
823598772842 Issue #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
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
  1307
    "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
  1308
    | 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
  1309
   
823598772842 Issue #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
    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
  1311
    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
  1312
    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
  1313
    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
  1314
    
823598772842 Issue #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
    "/ 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
  1316
    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
  1317
    "/ 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
  1318
    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
  1319
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1320
    "
823598772842 Issue #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
     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
  1322
     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
  1323
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1324
823598772842 Issue #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
    "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
  1326
    "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
  1327
! !
823598772842 Issue #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
!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
  1330
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
  1331
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
  1332
    "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
  1333
    | 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
  1334
823598772842 Issue #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
    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
  1336
    
823598772842 Issue #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
    "/ 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
  1338
    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
  1339
    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
  1340
 
823598772842 Issue #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
    "
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
  1342
     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
  1343
     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
  1344
    "
823598772842 Issue #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
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
  1346
    "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
  1347
    "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
  1348
!
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1349
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1350
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
  1351
    "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
  1352
    | 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
  1353
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1354
    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
  1355
    
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1356
    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
  1357
         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
  1358
         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
  1359
 
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1360
    "
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1361
     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
  1362
     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
  1363
    "
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1364
677b483367cf Issue #250: and #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
    "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
  1366
    "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
  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
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
  1370
    "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
  1371
     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
  1372
    | 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
  1373
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  1374
    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
  1375
    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
  1376
    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
  1377
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  1378
    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
  1379
    "/ 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
  1380
    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
  1381
    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
  1382
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
  1383
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1384
     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
  1385
     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
  1386
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1387
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1388
    "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
  1389
    "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
  1390
!
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1391
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1392
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
  1393
    "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
  1394
     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
  1395
    | 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
  1396
    
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  1397
    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
  1398
    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
  1399
    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
  1400
                                                                   
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  1401
    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
  1402
    "/ 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
  1403
    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
  1404
    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
  1405
 
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1406
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1407
     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
  1408
     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
  1409
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1410
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1411
    "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
  1412
    "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
  1413
!
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1414
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1415
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
  1416
    "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
  1417
    | 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
  1418
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
  1419
    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
  1420
    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
  1421
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1422
    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
  1423
    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
  1424
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1425
    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
  1426
    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
  1427
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1428
    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
  1429
    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
  1430
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1431
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1432
     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
  1433
     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
  1434
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1435
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1436
    "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
  1437
    "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
  1438
!
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1439
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1440
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
  1441
    "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
  1442
    | 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
  1443
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
  1444
    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
  1445
    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
  1446
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1447
    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
  1448
    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
  1449
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1450
    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
  1451
    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
  1452
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1453
    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
  1454
    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
  1455
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1456
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1457
     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
  1458
     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
  1459
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1460
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1461
    "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
  1462
    "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
  1463
!
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1464
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1465
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
  1466
    "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
  1467
    | 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
  1468
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
  1469
    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
  1470
    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
  1471
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1472
    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
  1473
    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
  1474
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1475
    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
  1476
    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
  1477
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1478
    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
  1479
    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
  1480
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1481
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1482
     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
  1483
     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
  1484
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1485
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1486
    "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
  1487
    "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
  1488
!
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1489
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1490
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
  1491
    "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
  1492
    | 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
  1493
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
  1494
    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
  1495
    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
  1496
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1497
    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
  1498
    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
  1499
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1500
    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
  1501
    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
  1502
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1503
    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
  1504
    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
  1505
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1506
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1507
     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
  1508
     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
  1509
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1510
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1511
    "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
  1512
    "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
  1513
!
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1514
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
  1515
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
  1516
    "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
  1517
    | 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
  1518
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1519
    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
  1520
    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
  1521
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1522
    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
  1523
    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
  1524
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1525
    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
  1526
    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
  1527
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1528
    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
  1529
    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
  1530
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1531
    "
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
  1532
     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
  1533
     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
  1534
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1535
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
  1536
    "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
  1537
    "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
  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
677b483367cf Issue #250: and #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
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
  1541
    "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
  1542
    | 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
  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
    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
  1545
    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
  1546
677b483367cf Issue #250: and #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
    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
  1548
    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
  1549
    
677b483367cf Issue #250: and #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
    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
  1551
         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
  1552
         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
  1553
         
677b483367cf Issue #250: and #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
     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
  1556
     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
  1557
    "
677b483367cf Issue #250: and #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
    "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
  1560
    "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
  1561
!
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1562
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1563
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
  1564
    "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
  1565
    | 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
  1566
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1567
    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
  1568
    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
  1569
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1570
    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
  1571
    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
  1572
    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
  1573
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1574
    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
  1575
    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
  1576
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1577
    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
  1578
    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
  1579
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1580
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1581
     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
  1582
     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
  1583
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1584
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1585
    "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
  1586
    "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
  1587
!
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1588
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1589
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
  1590
    "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
  1591
    | 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
  1592
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1593
    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
  1594
    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
  1595
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1596
    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
  1597
    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
  1598
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1599
    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
  1600
    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
  1601
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1602
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1603
     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
  1604
     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
  1605
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1606
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1607
    "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
  1608
    "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
  1609
!
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1610
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
  1611
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
  1612
    "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
  1613
    | 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
  1614
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1615
    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
  1616
    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
  1617
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1618
    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
  1619
        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
  1620
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1621
    "
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
  1622
     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
  1623
     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
  1624
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1625
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
  1626
    "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
  1627
! !
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1628
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1629
!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
  1630
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1631
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
  1632
    "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
  1633
    | 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
  1634
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  1635
    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
  1636
    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
  1637
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1638
    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
  1639
        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
  1640
    ].        
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1641
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1642
    "/ 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
  1643
    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
  1644
        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
  1645
    ].    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1646
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1647
    "/ 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
  1648
    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
  1649
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1650
    "/ 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
  1651
    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
  1652
        | 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
  1653
        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
  1654
        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
  1655
        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
  1656
    ].
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1657
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1658
    "/ 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
  1659
    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
  1660
    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
  1661
    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
  1662
 
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1663
    "
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
  1664
     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
  1665
     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
  1666
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1667
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1668
    "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
  1669
    "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
  1670
! !
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1671
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
  1672
!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
  1673
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
  1674
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
  1675
    "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
  1676
     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
  1677
    | 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
  1678
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  1679
    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
  1680
    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
  1681
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  1682
    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
  1683
    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
  1684
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  1685
    "
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
  1686
     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
  1687
     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
  1688
    "
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  1689
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
  1690
    "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
  1691
    "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
  1692
!
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  1693
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
  1694
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
  1695
    "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
  1696
     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
  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
    
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
  1699
    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
  1700
    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
  1701
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
  1702
    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
  1703
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  1704
    "
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
  1705
     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
  1706
     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
  1707
    "
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  1708
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
  1709
    "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
  1710
    "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
  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
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
  1714
    "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
  1715
    | 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
  1716
 
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1717
    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
  1718
    
677b483367cf Issue #250: and #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
    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
  1720
         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
  1721
         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
  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
    "
677b483367cf Issue #250: and #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 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
  1725
     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
  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
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1728
    "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
  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
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
  1732
    "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
  1733
    | 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
 
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1735
    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
  1736
    
677b483367cf Issue #250: and #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
    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
  1738
         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
  1739
         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
  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
    "
677b483367cf Issue #250: and #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 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
  1743
     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
  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
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1746
    "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
  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
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
  1750
    "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
  1751
     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
  1752
       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
  1753
    | 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
  1754
677b483367cf Issue #250: and #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
    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
  1756
        (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
  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
    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
  1759
677b483367cf Issue #250: and #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 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
  1761
    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
  1762
       
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
  1763
    "/ 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
  1764
    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
  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
     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
  1768
     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
  1769
    "
677b483367cf Issue #250: and #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
    "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
  1772
    "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
  1773
!
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  1774
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
  1775
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
  1776
    "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
  1777
    | 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
  1778
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  1779
    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
  1780
        (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
  1781
    
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
  1782
    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
  1783
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
  1784
    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
  1785
    "
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
  1786
     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
  1787
     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
  1788
    "
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  1789
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
  1790
    "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
  1791
    "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
  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
677b483367cf Issue #250: and #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
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
  1795
    "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
  1796
    | 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
  1797
677b483367cf Issue #250: and #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
    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
  1799
        (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
  1800
677b483367cf Issue #250: and #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
    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
  1802
         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
  1803
         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
  1804
         
677b483367cf Issue #250: and #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
    "
677b483367cf Issue #250: and #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
     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
  1807
     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
  1808
    "
677b483367cf Issue #250: and #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
677b483367cf Issue #250: and #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
    "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
  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
677b483367cf Issue #250: and #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
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
  1814
    "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
  1815
    | 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
  1816
677b483367cf Issue #250: and #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
    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
  1818
        (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
  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 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
  1821
         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
  1822
         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
  1823
         
677b483367cf Issue #250: and #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
    "
677b483367cf Issue #250: and #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
     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
  1826
     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
  1827
    "
677b483367cf Issue #250: and #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
677b483367cf Issue #250: and #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
    "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
  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
677b483367cf Issue #250: and #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
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
  1833
    "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
  1834
     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
  1835
       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
  1836
    | 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
  1837
677b483367cf Issue #250: and #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
    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
  1839
        (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
  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
    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
  1842
677b483367cf Issue #250: and #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 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
  1844
    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
  1845
    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
  1846
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1847
    "/ 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
  1848
    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
  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
    "
677b483367cf Issue #250: and #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
     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
  1852
     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
  1853
    "
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1854
677b483367cf Issue #250: and #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
    "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
  1856
    "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
  1857
!
677b483367cf Issue #250: and #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
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
  1860
    "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
  1861
    | 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
  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
    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
  1864
            (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
  1865
            |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
  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
    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
  1868
    
677b483367cf Issue #250: and #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
    "
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1870
     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
  1871
     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
  1872
    "
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1873
677b483367cf Issue #250: and #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
    "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
  1875
    "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
  1876
!
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  1877
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
  1878
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
  1879
    "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
  1880
     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
  1881
     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
  1882
       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
  1883
    | 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
  1884
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  1885
    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
  1886
    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
  1887
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  1888
    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
  1889
    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
  1890
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  1891
    "
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  1892
     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
  1893
     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
  1894
    "
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  1895
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
  1896
    "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
  1897
    "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
  1898
!
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  1899
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
  1900
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
  1901
    "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
  1902
    | 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
  1903
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
  1904
    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
  1905
    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
  1906
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
  1907
    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
  1908
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  1909
    "
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
  1910
     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
  1911
     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
  1912
    "
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  1913
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
  1914
    "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
  1915
    "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
  1916
!
677b483367cf Issue #250: and #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
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
  1919
    "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
  1920
    | 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
  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
    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
  1923
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1924
    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
  1925
         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
  1926
         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
  1927
                                                                                     
677b483367cf Issue #250: and #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
    "
677b483367cf Issue #250: and #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
     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
  1930
     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
  1931
    "
677b483367cf Issue #250: and #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
677b483367cf Issue #250: and #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
    "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
  1934
!
677b483367cf Issue #250: and #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
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
  1937
    "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
  1938
    | 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
  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
    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
  1941
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1942
    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
  1943
         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
  1944
         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
  1945
                                                                                     
677b483367cf Issue #250: and #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
    "
677b483367cf Issue #250: and #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
     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
  1948
     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
  1949
    "
677b483367cf Issue #250: and #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
677b483367cf Issue #250: and #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
    "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
  1952
!
677b483367cf Issue #250: and #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
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
  1955
    "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
  1956
    | 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
  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
    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
  1959
     
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1960
    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
  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
    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
  1963
677b483367cf Issue #250: and #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
    "
677b483367cf Issue #250: and #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
     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
  1966
     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
  1967
    "
677b483367cf Issue #250: and #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
677b483367cf Issue #250: and #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
    "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
  1970
    "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
  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
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
  1974
    "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
  1975
    | 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
  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
    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
  1978
     
677b483367cf Issue #250: and #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
    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
  1980
    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
  1981
    
677b483367cf Issue #250: and #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
    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
  1983
    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
  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
    "
677b483367cf Issue #250: and #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 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
  1987
     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
  1988
    "
677b483367cf Issue #250: and #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
    "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
  1991
    "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
  1992
!
677b483367cf Issue #250: and #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
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
  1995
    "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
  1996
    | 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
  1997
        
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  1998
    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
  1999
    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
  2000
        
677b483367cf Issue #250: and #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
    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
  2002
677b483367cf Issue #250: and #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
    "
677b483367cf Issue #250: and #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
     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
  2005
     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
  2006
    "
677b483367cf Issue #250: and #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
    "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
  2009
    "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
  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
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
  2013
    "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
  2014
    | 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
  2015
            
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  2016
    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
  2017
    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
  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
    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
  2020
677b483367cf Issue #250: and #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
    "
677b483367cf Issue #250: and #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
     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
  2023
     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
  2024
    "
677b483367cf Issue #250: and #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
677b483367cf Issue #250: and #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
    "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
  2027
    "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
  2028
!
677b483367cf Issue #250: and #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
677b483367cf Issue #250: and #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
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
  2031
    "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
  2032
    | 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
  2033
    
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  2034
    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
  2035
    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
  2036
        
677b483367cf Issue #250: and #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
    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
  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
    "
677b483367cf Issue #250: and #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
     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
  2041
     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
  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
677b483367cf Issue #250: and #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
    "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
  2045
    "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
  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
677b483367cf Issue #250: and #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
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
  2049
    "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
  2050
    | 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
  2051
    
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  2052
    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
  2053
    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
  2054
        
677b483367cf Issue #250: and #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 = '''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
  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:#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
  2059
     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
  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: / 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
  2063
    "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
  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
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
  2067
    "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
  2068
    | 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
  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
    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
  2071
     
677b483367cf Issue #250: and #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
    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
  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
    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
  2075
                              '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
  2076
                              '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
  2077
                              '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
  2078
677b483367cf Issue #250: and #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
     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
  2081
     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
  2082
    "
677b483367cf Issue #250: and #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
    "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
  2085
    "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
  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
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
  2089
    "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
  2090
    | 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
  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
    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
  2093
     
677b483367cf Issue #250: and #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
    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
  2095
        
677b483367cf Issue #250: and #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
    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
  2097
                              '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
  2098
                              '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
  2099
                              '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
  2100
                              '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
  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
    "
677b483367cf Issue #250: and #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 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
  2104
     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
  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
677b483367cf Issue #250: and #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
    "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
  2108
    "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
  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
677b483367cf Issue #250: and #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
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
  2112
    "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
  2113
    | 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
  2114
        
677b483367cf Issue #250: and #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
    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
  2116
     
677b483367cf Issue #250: and #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
    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
  2118
    
677b483367cf Issue #250: and #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
    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
  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
    "
677b483367cf Issue #250: and #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 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
  2123
     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
  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
677b483367cf Issue #250: and #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
    "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
  2127
    "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
  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
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2130
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
  2131
    "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
  2132
     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
  2133
    | 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
  2134
    
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  2135
    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
  2136
    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
  2137
        
677b483367cf Issue #250: and #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
    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
  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
    "
677b483367cf Issue #250: and #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
     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
  2142
     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
  2143
    "
677b483367cf Issue #250: and #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
677b483367cf Issue #250: and #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
    "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
  2146
    "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
  2147
!
677b483367cf Issue #250: and #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
677b483367cf Issue #250: and #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
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
  2150
    "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
  2151
    | 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
  2152
    
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  2153
    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
  2154
    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
  2155
        
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2156
    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
  2157
677b483367cf Issue #250: and #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
    "
677b483367cf Issue #250: and #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
     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
  2160
     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
  2161
    "
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2162
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2163
    "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
  2164
    "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
  2165
!
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2166
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2167
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
  2168
    "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
  2169
    | 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
  2170
        
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  2171
    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
  2172
    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
  2173
    
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  2174
    "/ 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
  2175
    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
  2176
        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
  2177
    ].
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  2178
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  2179
    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
  2180
    
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
  2181
    "
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2182
     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
  2183
     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
  2184
    "
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2185
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2186
    "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
  2187
    "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
  2188
!
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2189
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2190
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
  2191
    "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
  2192
    | 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
  2193
    
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  2194
    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
  2195
    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
  2196
    
677b483367cf Issue #250: and #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
    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
  2198
    
677b483367cf Issue #250: and #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
    "
677b483367cf Issue #250: and #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
     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
  2201
     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
  2202
    "
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2203
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2204
    "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
  2205
    "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
  2206
!
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2207
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2208
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
  2209
    "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
  2210
    | 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
  2211
    
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  2212
    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
  2213
    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
  2214
        
677b483367cf Issue #250: and #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 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
  2216
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2217
    "
677b483367cf Issue #250: and #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
     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
  2219
     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
  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
    "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
  2223
    "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
  2224
!
677b483367cf Issue #250: and #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
677b483367cf Issue #250: and #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
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
  2227
    "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
  2228
    | 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
  2229
    
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  2230
    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
  2231
    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
  2232
        
677b483367cf Issue #250: and #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
    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
  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
    "
677b483367cf Issue #250: and #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 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
  2237
     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
  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
677b483367cf Issue #250: and #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
    "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
  2241
    "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
  2242
!
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2243
677b483367cf Issue #250: and #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
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
  2245
    "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
  2246
    | 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
  2247
    
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  2248
    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
  2249
    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
  2250
    
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2251
    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
  2252
    
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2253
    "
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2254
     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
  2255
     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
  2256
    "
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2257
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2258
    "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
  2259
    "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
  2260
!
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2261
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2262
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
  2263
    "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
  2264
    | 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
  2265
        
677b483367cf Issue #250: and #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
    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
  2267
    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
  2268
         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
  2269
         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
  2270
677b483367cf Issue #250: and #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
    "
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2272
     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
  2273
     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
  2274
    "
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2275
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2276
    "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
  2277
    "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
  2278
!
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2279
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2280
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
  2281
    "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
  2282
    | 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
  2283
    
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2284
    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
  2285
    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
  2286
         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
  2287
         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
  2288
    
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2289
    "
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2290
     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
  2291
     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
  2292
    "
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2293
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2294
    "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
  2295
!
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2296
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2297
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
  2298
    "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
  2299
    | 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
  2300
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2301
    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
  2302
    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
  2303
    
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2304
    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
  2305
    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
  2306
    
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2307
    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
  2308
    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
  2309
    
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2310
    "
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2311
     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
  2312
     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
  2313
    "
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2314
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2315
    "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
  2316
!
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2317
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2318
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
  2319
    "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
  2320
    | 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
  2321
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2322
    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
  2323
    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
  2324
                                                         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
  2325
    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
  2326
    
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2327
    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
  2328
    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
  2329
    
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2330
    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
  2331
    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
  2332
    
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2333
    "
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2334
     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
  2335
     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
  2336
    "
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2337
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2338
    "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
  2339
    "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
  2340
!
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2341
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2342
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
  2343
    "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
  2344
    | 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
  2345
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2346
    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
  2347
    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
  2348
    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
  2349
    
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2350
    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
  2351
    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
  2352
    
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2353
    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
  2354
    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
  2355
    
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2356
    "
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2357
     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
  2358
     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
  2359
    "
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2360
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2361
    "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
  2362
    "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
  2363
!
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2364
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2365
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
  2366
    "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
  2367
    | 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
  2368
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2369
    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
  2370
    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
  2371
    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
  2372
    
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2373
    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
  2374
    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
  2375
    
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2376
    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
  2377
    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
  2378
    
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2379
    "
677b483367cf Issue #250: and #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
     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
  2381
     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
  2382
    "
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2383
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2384
    "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
  2385
!
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2386
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2387
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
  2388
    "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
  2389
    | 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
  2390
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2391
    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
  2392
    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
  2393
    
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2394
    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
  2395
    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
  2396
    
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2397
    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
  2398
    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
  2399
    
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2400
    "
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2401
     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
  2402
     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
  2403
    "
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2404
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2405
    "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
  2406
    "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
  2407
!
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2408
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2409
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
  2410
    "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
  2411
    | 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
  2412
    
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2413
    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
  2414
    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
  2415
    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
  2416
    
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2417
    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
  2418
    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
  2419
    
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2420
    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
  2421
    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
  2422
    
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2423
    "
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2424
     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
  2425
     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
  2426
    "
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2427
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2428
    "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
  2429
    "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
  2430
!
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2431
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2432
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
  2433
    "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
  2434
    | 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
  2435
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2436
    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
  2437
    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
  2438
    
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2439
    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
  2440
    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
  2441
    
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2442
    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
  2443
    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
  2444
    
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2445
    "
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2446
     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
  2447
     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
  2448
    "
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2449
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2450
    "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
  2451
    "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
  2452
! !
9d76442a61bb Issue #250: Tests for 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
9d76442a61bb Issue #250: Tests for 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
!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
  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
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
  2457
    "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
  2458
     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
  2459
    | 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
  2460
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2461
    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
  2462
    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
  2463
        (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
  2464
    
9d76442a61bb Issue #250: Tests for 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
    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
  2466
        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
  2467
    ].     
9d76442a61bb Issue #250: Tests for 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
    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
  2470
    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
  2471
    "/ 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
  2472
    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
  2473
    
9d76442a61bb Issue #250: Tests for 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 := 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
  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
    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
  2477
    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
  2478
    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
  2479
    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
  2480
    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
  2481
9d76442a61bb Issue #250: Tests for 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
    "
9d76442a61bb Issue #250: Tests for 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
     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
  2484
     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
  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
    "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
  2488
    "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
  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
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
  2491
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
  2492
    "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
  2493
     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
  2494
       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
  2495
    | 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
  2496
    
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
  2497
    "/ 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
  2498
    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
  2499
    "/ 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
  2500
    "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
  2501
     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
  2502
    [ 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
  2503
        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
  2504
    ].
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
  2505
    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
  2506
    
9d76442a61bb Issue #250: Tests for 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
    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
  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 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
  2510
    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
  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
    "
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
  2513
     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
  2514
     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
  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
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
  2517
    "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
  2518
    "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
  2519
!
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2520
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2521
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
  2522
    "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
  2523
     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
  2524
       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
  2525
    | 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
  2526
    
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2527
    "/ 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
  2528
    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
  2529
    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
  2530
         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
  2531
         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
  2532
    
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2533
    "
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2534
     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
  2535
     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
  2536
    "
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2537
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2538
    "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
  2539
    "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
  2540
!
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2541
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2542
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
  2543
    "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
  2544
     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
  2545
    | 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
  2546
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2547
    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
  2548
    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
  2549
        (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
  2550
    
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
  2551
    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
  2552
        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
  2553
    ].     
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2554
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2555
    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
  2556
    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
  2557
    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
  2558
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2559
    "
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2560
     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
  2561
     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
  2562
    "
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2563
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2564
    "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
  2565
    "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
  2566
!
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2567
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2568
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
  2569
    "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
  2570
     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
  2571
    | 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
  2572
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2573
    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
  2574
    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
  2575
        (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
  2576
    
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
  2577
    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
  2578
        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
  2579
    ].     
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2580
    
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2581
    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
  2582
    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
  2583
    
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2584
    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
  2585
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2586
    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
  2587
    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
  2588
    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
  2589
    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
  2590
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2591
    "
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2592
     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
  2593
     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
  2594
    "
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2595
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2596
    "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
  2597
    "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
  2598
!
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2599
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2600
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
  2601
    "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
  2602
     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
  2603
    | 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
  2604
    
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2605
    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
  2606
        (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
  2607
    
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2608
    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
  2609
    
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2610
    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
  2611
    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
  2612
    
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2613
    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
  2614
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2615
    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
  2616
    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
  2617
    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
  2618
    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
  2619
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2620
    "
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2621
     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
  2622
     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
  2623
    "
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2624
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2625
    "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
  2626
    "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
  2627
!
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2628
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2629
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
  2630
    "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
  2631
     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
  2632
    | 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
  2633
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2634
    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
  2635
    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
  2636
        (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
  2637
    
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2638
    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
  2639
        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
  2640
    ].     
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2641
    
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2642
    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
  2643
    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
  2644
    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
  2645
    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
  2646
    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
  2647
    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
  2648
        = '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
  2649
    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
  2650
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2651
    "  
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2652
     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
  2653
     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
  2654
    "
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2655
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2656
    "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
  2657
    "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
  2658
!
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2659
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2660
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
  2661
    "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
  2662
    | 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
  2663
    
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2664
    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
  2665
    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
  2666
     
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2667
    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
  2668
        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
  2669
    ].
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2670
    
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2671
    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
  2672
    
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2673
    "
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2674
     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
  2675
     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
  2676
    "
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2677
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2678
    "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
  2679
    "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
  2680
!
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2681
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2682
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
  2683
    "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
  2684
    | 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
  2685
    
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2686
    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
  2687
    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
  2688
     
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2689
    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
  2690
        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
  2691
    ].
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2692
    
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2693
    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
  2694
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2695
    "
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2696
     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
  2697
     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
  2698
    "
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2699
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2700
    "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
  2701
    "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
  2702
!
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2703
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2704
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
  2705
    "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
  2706
     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
  2707
    | 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
  2708
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2709
    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
  2710
    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
  2711
        (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
  2712
    
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2713
    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
  2714
        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
  2715
    ].     
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2716
    
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2717
    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
  2718
    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
  2719
    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
  2720
    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
  2721
    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
  2722
    
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2723
    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
  2724
    
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2725
    "/ 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
  2726
    "/ 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
  2727
    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
  2728
    "
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2729
     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
  2730
     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
  2731
    "
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2732
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2733
    "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
  2734
    "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
  2735
!
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2736
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2737
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
  2738
    "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
  2739
     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
  2740
    | 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
  2741
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2742
    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
  2743
        (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
  2744
    
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2745
    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
  2746
    
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2747
    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
  2748
    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
  2749
    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
  2750
    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
  2751
    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
  2752
    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
  2753
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2754
    "  
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2755
     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
  2756
     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
  2757
    "
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2758
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2759
    "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
  2760
    "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
  2761
!
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2762
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2763
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
  2764
    "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
  2765
     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
  2766
    | 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
  2767
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2768
    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
  2769
    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
  2770
        (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
  2771
    
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2772
    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
  2773
        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
  2774
    ].     
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2775
    
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2776
    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
  2777
    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
  2778
    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
  2779
    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
  2780
    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
  2781
    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
  2782
        = '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
  2783
    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
  2784
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2785
    "  
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2786
     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
  2787
     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
  2788
    "
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2789
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2790
    "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
  2791
    "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
  2792
!
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2793
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2794
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
  2795
    "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
  2796
    | 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
  2797
    
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2798
    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
  2799
    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
  2800
     
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2801
    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
  2802
        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
  2803
    ].
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2804
    
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2805
    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
  2806
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2807
    "
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2808
     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
  2809
     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
  2810
    "
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2811
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2812
    "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
  2813
    "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
  2814
! !
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2815
2214
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2816
!Win32OperatingSystemTest methodsFor:'tests-unicodeRename'!
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2817
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2818
testRenameSubKey_01
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2819
    "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
  2820
    | readData testingRegistryEntryPath |   
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2821
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2822
    testingRegistryEntryPath := Win32OperatingSystem registryEntry key: registryPath.
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2823
    
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2824
    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
  2825
    readData := testingRegistryEntryPath subKeyNamed: 'RenamedSubKey'.
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2826
    
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2827
    self assert: readData notEmptyOrNil.
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2828
    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
  2829
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2830
    "
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2831
     self run:#testRenameSubKey_01
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2832
     self new testRenameSubKey_01
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2833
    "
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2834
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2835
    "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
  2836
!
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2837
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2838
testRenameSubKey_02
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2839
    "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
  2840
    | readData testingRegistryEntryPath |   
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2841
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2842
    testingRegistryEntryPath := Win32OperatingSystem registryEntry key: registryPath.
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2843
    
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2844
    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
  2845
    readData := testingRegistryEntryPath subKeyNamed: 'すしか_'.
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2846
    
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2847
    self assert: readData notEmptyOrNil.
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2848
    self assert: readData path = (registryPath, '\', 'すしか_').
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2849
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2850
    testingRegistryEntryPath := Win32OperatingSystem registryEntry key: (registryPath, '\', 'すしか_').
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2851
    readData := testingRegistryEntryPath subKeyNamed: 'bobr'.
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2852
    
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2853
    self assert: readData notEmptyOrNil.
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2854
    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
  2855
    
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2856
    "
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2857
     self run:#testRenameSubKey_02
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2858
     self new testRenameSubKey_02
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2859
    "
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2860
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2861
    "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
  2862
!
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2863
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2864
testRenameSubKey_03
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2865
    "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
  2866
    | readData testingRegistryEntryPath |   
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2867
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2868
    testingRegistryEntryPath := Win32OperatingSystem registryEntry key: registryPath.
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2869
    
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2870
    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
  2871
    readData := testingRegistryEntryPath subKeyNamed: 'すしか_'.
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2872
    
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2873
    self assert: readData isEmptyOrNil
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2874
    
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2875
    "
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2876
     self run:#testRenameSubKey_03
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2877
     self new testRenameSubKey_03
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2878
    "
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2879
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2880
    "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
  2881
! !
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2882
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
  2883
!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
  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
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
  2886
    "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
  2887
     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
  2888
    | 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
  2889
    
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
  2890
    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
  2891
    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
  2892
    
823598772842 Issue #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
    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
  2894
    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
  2895
    
823598772842 Issue #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 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
  2897
    
823598772842 Issue #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 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
  2899
    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
  2900
    
823598772842 Issue #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
     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
  2903
     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
  2904
    "
823598772842 Issue #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
    "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
  2907
    "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
  2908
!
823598772842 Issue #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
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
  2911
    "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
  2912
     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
  2913
    | 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
  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
    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
  2916
    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
  2917
  
823598772842 Issue #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
    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
  2919
    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
  2920
    
823598772842 Issue #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
    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
  2922
    
823598772842 Issue #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
    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
  2924
    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
  2925
    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
  2926
    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
  2927
    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
  2928
    
823598772842 Issue #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
    
823598772842 Issue #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
    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
  2931
    
823598772842 Issue #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
    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
  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
    "
823598772842 Issue #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
     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
  2936
     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
  2937
    "
823598772842 Issue #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
    "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
  2940
    "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
  2941
    "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
  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
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
  2945
    "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
  2946
     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
  2947
    | 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
  2948
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2949
    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
  2950
    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
  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
    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
  2953
    
823598772842 Issue #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
    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
  2955
    
823598772842 Issue #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
     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
  2958
     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
  2959
    "
823598772842 Issue #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
    "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
  2962
    "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
  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
823598772842 Issue #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
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
  2966
    "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
  2967
     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
  2968
    | 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
  2969
823598772842 Issue #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
    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
  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
    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
  2973
    "/ 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
  2974
    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
  2975
    
823598772842 Issue #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
    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
  2977
    
823598772842 Issue #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
    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
  2979
    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
  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 = #[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
  2982
    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
  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
    "
823598772842 Issue #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 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
  2986
     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
  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
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2989
    "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
  2990
    "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
  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
823598772842 Issue #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
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
  2994
    "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
  2995
     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
  2996
    | 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
  2997
823598772842 Issue #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 := 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
  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
    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
  3001
    "/ 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
  3002
    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
  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
    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
  3005
    
823598772842 Issue #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
    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
  3007
    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
  3008
    
823598772842 Issue #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 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
  3010
    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
  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
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3013
     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
  3014
     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
  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
823598772842 Issue #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
    "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
  3018
    "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
  3019
!
823598772842 Issue #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
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
  3022
    "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
  3023
     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
  3024
    | 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
  3025
823598772842 Issue #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
    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
  3027
       
823598772842 Issue #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
    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
  3029
    "/ 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
  3030
    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
  3031
    
823598772842 Issue #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
    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
  3033
    
823598772842 Issue #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
    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
  3035
    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
  3036
    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
  3037
    
823598772842 Issue #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
    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
  3039
    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
  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 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
  3042
    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
  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
     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
  3046
     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
  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
    "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
  3050
    "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
  3051
!
823598772842 Issue #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
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
  3054
    "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
  3055
     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
  3056
    | 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
  3057
823598772842 Issue #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
    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
  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
    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
  3061
    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
  3062
    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
  3063
    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
  3064
    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
  3065
    
823598772842 Issue #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
    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
  3067
    "/ 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
  3068
    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
  3069
    "/ 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
  3070
    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
  3071
    
823598772842 Issue #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
    "/ 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
  3073
    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
  3074
    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
  3075
    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
  3076
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3077
    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
  3078
    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
  3079
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3080
    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
  3081
    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
  3082
823598772842 Issue #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
     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
  3085
     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
  3086
    "
823598772842 Issue #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
823598772842 Issue #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
    "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
  3089
    "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
  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
823598772842 Issue #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
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
  3093
    "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
  3094
    | 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
  3095
  
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
  3096
    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
  3097
    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
  3098
    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
  3099
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
  3100
    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
  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
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3103
     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
  3104
     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
  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
823598772842 Issue #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
    "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
  3108
    "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
  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
823598772842 Issue #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
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
  3112
    "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
  3113
    | 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
  3114
823598772842 Issue #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
    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
  3116
    "/ 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
  3117
    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
  3118
    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
  3119
823598772842 Issue #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
    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
  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
    "
823598772842 Issue #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
     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
  3124
     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
  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
823598772842 Issue #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
    "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
  3128
    "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
  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
823598772842 Issue #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
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
  3132
    "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
  3133
     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
  3134
    | 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
  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
    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
  3137
    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
  3138
    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
  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
    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
  3141
823598772842 Issue #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
    "
823598772842 Issue #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
     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
  3144
     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
  3145
    "
823598772842 Issue #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
823598772842 Issue #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
    "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
  3148
    "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
  3149
!
823598772842 Issue #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
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
  3152
    "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
  3153
     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
  3154
    | 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
  3155
       
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
  3156
    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
  3157
    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
  3158
    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
  3159
823598772842 Issue #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
    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
  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
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3163
     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
  3164
     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
  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
823598772842 Issue #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
    "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
  3168
    "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
  3169
!
823598772842 Issue #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
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
  3172
    "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
  3173
    | 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
  3174
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
  3175
    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
  3176
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
  3177
    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
  3178
        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
  3179
823598772842 Issue #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
     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
  3182
     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
  3183
    "
823598772842 Issue #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
    "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
  3186
    "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
  3187
!
823598772842 Issue #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
823598772842 Issue #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
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
  3190
    "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
  3191
     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
  3192
823598772842 Issue #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 |
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  3194
     
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
  3195
    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
  3196
    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
  3197
    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
  3198
823598772842 Issue #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 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
  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
     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
  3203
     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
  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
    "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
  3207
    "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
  3208
!
823598772842 Issue #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
823598772842 Issue #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
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
  3211
    "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
  3212
    | 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
  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
    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
  3215
    
823598772842 Issue #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
    "/ 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
  3217
    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
  3218
    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
  3219
        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
  3220
        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
  3221
    ] 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
  3222
        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
  3223
        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
  3224
    ].  
823598772842 Issue #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
    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
  3226
    "/ 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
  3227
    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
  3228
    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
  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
    "/ 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
  3231
    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
  3232
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3233
    "/ 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
  3234
    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
  3235
    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
  3236
    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
  3237
    
823598772842 Issue #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
    "/ 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
  3239
    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
  3240
    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
  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:#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
  3244
     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
  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: / 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
  3248
    "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
  3249
!
823598772842 Issue #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
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
  3252
    "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
  3253
     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
  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
    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
  3258
    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
  3259
    
823598772842 Issue #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
    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
  3261
823598772842 Issue #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
    "
823598772842 Issue #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 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
  3264
     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
  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
823598772842 Issue #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
    "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
  3268
    "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
  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
823598772842 Issue #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
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
  3272
    "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
  3273
     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
  3274
    | 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
  3275
823598772842 Issue #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
    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
  3277
    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
  3278
    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
  3279
    
823598772842 Issue #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
    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
  3281
823598772842 Issue #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 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
  3284
     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
  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
823598772842 Issue #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
    "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
  3288
    "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
  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
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3291
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
  3292
    "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
  3293
     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
  3294
    | 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
  3295
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3296
    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
  3297
    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
  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
    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
  3300
    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
  3301
    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
  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
    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
  3304
    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
  3305
823598772842 Issue #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 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
  3308
     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
  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
823598772842 Issue #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
    "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
  3312
    "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
  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
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3315
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
  3316
    "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
  3317
     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
  3318
    | 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
  3319
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3320
    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
  3321
    "/ 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
  3322
    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
  3323
    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
  3324
    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
  3325
    "/ 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
  3326
    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
  3327
    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
  3328
    
823598772842 Issue #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
    "/ 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
  3330
    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
  3331
    "/ 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
  3332
    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
  3333
    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
  3334
    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
  3335
    "/ 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
  3336
    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
  3337
    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
  3338
823598772842 Issue #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
     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
  3341
     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
  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
    "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
  3345
    "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
  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
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
  3349
    "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
  3350
    | 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
  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
    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
  3353
    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
  3354
    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
  3355
823598772842 Issue #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
    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
  3357
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3358
    "
823598772842 Issue #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
     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
  3360
     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
  3361
    "
823598772842 Issue #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
    "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
  3364
    "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
  3365
!
823598772842 Issue #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
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
  3368
    "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
  3369
     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
  3370
     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
  3371
    | 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
  3372
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3373
    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
  3374
    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
  3375
    
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  3376
    "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
  3377
     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
  3378
     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
  3379
    "/ 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
  3380
    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
  3381
                       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
  3382
    ].
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3383
    
823598772842 Issue #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
    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
  3385
    "/ 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
  3386
    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
  3387
    "/ 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
  3388
    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
  3389
        
823598772842 Issue #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
    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
  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
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3393
     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
  3394
     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
  3395
    "
823598772842 Issue #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
    "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
  3398
    "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
  3399
!
823598772842 Issue #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
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
  3402
    "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
  3403
    | 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
  3404
823598772842 Issue #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
    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
  3406
    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
  3407
    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
  3408
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3409
    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
  3410
    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
  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
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3413
     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
  3414
     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
  3415
    "
823598772842 Issue #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
    "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
  3418
    "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
  3419
!
823598772842 Issue #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
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
  3422
    "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
  3423
    | 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
  3424
823598772842 Issue #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
    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
  3426
    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
  3427
    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
  3428
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3429
    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
  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
     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
  3433
     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
  3434
    "
823598772842 Issue #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
823598772842 Issue #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
    "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
  3437
    "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
  3438
!
823598772842 Issue #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
823598772842 Issue #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
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
  3441
    "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
  3442
    | 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
  3443
823598772842 Issue #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
    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
  3445
    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
  3446
    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
  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
    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
  3449
    
823598772842 Issue #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
    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
  3451
    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
  3452
    
823598772842 Issue #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
    "/ (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
  3454
    "/ ((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
  3455
    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
  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
     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
  3458
     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
  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
823598772842 Issue #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
    "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
  3462
    "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
  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
823598772842 Issue #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
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
  3466
    "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
  3467
     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
  3468
    | 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
  3469
823598772842 Issue #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
    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
  3471
    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
  3472
    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
  3473
    
823598772842 Issue #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
    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
  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
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3477
     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
  3478
     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
  3479
    "
823598772842 Issue #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
    "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
  3482
    "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
  3483
!
823598772842 Issue #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
823598772842 Issue #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
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
  3486
    "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
  3487
     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
  3488
    | 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
  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
    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
  3491
    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
  3492
    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
  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
    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
  3495
823598772842 Issue #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
     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
  3498
     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
  3499
    "
823598772842 Issue #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
    "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
  3502
    "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
  3503
!
823598772842 Issue #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
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
  3506
    "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
  3507
     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
  3508
    | 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
  3509
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3510
    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
  3511
    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
  3512
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3513
    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
  3514
    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
  3515
    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
  3516
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3517
    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
  3518
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3519
    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
  3520
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3521
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3522
     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
  3523
     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
  3524
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3525
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3526
    "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
  3527
    "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
  3528
!
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3529
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3530
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
  3531
    "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
  3532
     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
  3533
    | 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
  3534
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3535
    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
  3536
    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
  3537
    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
  3538
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3539
    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
  3540
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3541
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3542
     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
  3543
     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
  3544
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3545
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3546
    "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
  3547
    "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
  3548
    "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
  3549
!
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3550
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3551
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
  3552
    "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
  3553
    | 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
  3554
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3555
    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
  3556
    "/ 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
  3557
    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
  3558
    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
  3559
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3560
    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
  3561
    "/ 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
  3562
    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
  3563
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3564
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3565
     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
  3566
     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
  3567
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3568
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3569
    "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
  3570
    "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
  3571
    "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
  3572
!
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3573
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3574
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
  3575
    "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
  3576
    | 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
  3577
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3578
    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
  3579
    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
  3580
    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
  3581
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3582
    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
  3583
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3584
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3585
     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
  3586
     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
  3587
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3588
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3589
    "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
  3590
    "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
  3591
!
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3592
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3593
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
  3594
    "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
  3595
     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
  3596
    | 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
  3597
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3598
    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
  3599
    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
  3600
    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
  3601
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3602
    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
  3603
    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
  3604
    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
  3605
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3606
    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
  3607
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3608
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3609
     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
  3610
     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
  3611
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3612
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3613
    "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
  3614
    "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
  3615
!
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3616
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3617
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
  3618
    "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
  3619
     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
  3620
     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
  3621
    | 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
  3622
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3623
    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
  3624
    "/ 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
  3625
    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
  3626
    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
  3627
    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
  3628
    "/ 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
  3629
    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
  3630
    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
  3631
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3632
    "/ 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
  3633
    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
  3634
        
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3635
    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
  3636
    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
  3637
    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
  3638
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3639
    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
  3640
    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
  3641
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3642
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3643
     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
  3644
     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
  3645
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3646
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3647
    "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
  3648
    "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
  3649
!
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3650
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3651
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
  3652
    "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
  3653
     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
  3654
    | 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
  3655
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3656
    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
  3657
    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
  3658
    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
  3659
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3660
    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
  3661
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3662
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3663
     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
  3664
     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
  3665
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3666
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3667
    "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
  3668
    "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
  3669
!
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3670
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3671
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
  3672
    "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
  3673
     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
  3674
    | 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
  3675
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3676
    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
  3677
    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
  3678
    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
  3679
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3680
    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
  3681
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
  3682
    "
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
  3683
     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
  3684
     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
  3685
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3686
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3687
    "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
  3688
    "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
  3689
!
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3690
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3691
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
  3692
    "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
  3693
     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
  3694
    | 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
  3695
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3696
    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
  3697
    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
  3698
    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
  3699
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3700
    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
  3701
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
  3702
    "
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
  3703
     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
  3704
     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
  3705
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3706
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3707
    "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
  3708
    "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
  3709
!
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3710
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3711
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
  3712
    "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
  3713
     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
  3714
    | 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
  3715
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3716
    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
  3717
    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
  3718
    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
  3719
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3720
    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
  3721
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
  3722
    "
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
  3723
     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
  3724
     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
  3725
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3726
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3727
    "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
  3728
    "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
  3729
!
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3730
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3731
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
  3732
    "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
  3733
     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
  3734
    | 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
  3735
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3736
    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
  3737
    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
  3738
    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
  3739
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3740
    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
  3741
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
  3742
    "
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
  3743
     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
  3744
     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
  3745
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3746
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3747
    "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
  3748
    "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
  3749
!
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3750
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3751
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
  3752
    "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
  3753
     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
  3754
    | 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
  3755
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3756
    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
  3757
    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
  3758
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3759
    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
  3760
    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
  3761
    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
  3762
   
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3763
    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
  3764
    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
  3765
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
  3766
    "
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
  3767
     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
  3768
     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
  3769
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3770
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3771
    "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
  3772
    "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
  3773
!
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3774
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3775
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
  3776
    "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
  3777
     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
  3778
    | 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
  3779
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3780
    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
  3781
    "/ 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
  3782
    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
  3783
    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
  3784
    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
  3785
   
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3786
    "/ 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
  3787
    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
  3788
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3789
    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
  3790
    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
  3791
    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
  3792
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3793
    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
  3794
    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
  3795
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3796
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3797
     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
  3798
     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
  3799
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3800
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3801
    "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
  3802
    "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
  3803
! !
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3804
344
21c39da58029 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3805
!Win32OperatingSystemTest class methodsFor:'documentation'!
21c39da58029 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3806
21c39da58029 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3807
version
21c39da58029 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3808
    ^ '$Header$'
1566
2ca58098256d Issue #109: Added tests for registry key creation / deletion
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1500
diff changeset
  3809
!
2ca58098256d Issue #109: Added tests for registry key creation / deletion
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1500
diff changeset
  3810
2ca58098256d Issue #109: Added tests for registry key creation / deletion
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1500
diff changeset
  3811
version_HG
2ca58098256d Issue #109: Added tests for registry key creation / deletion
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1500
diff changeset
  3812
2ca58098256d Issue #109: Added tests for registry key creation / deletion
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1500
diff changeset
  3813
    ^ '$Changeset: <not expanded> $'
344
21c39da58029 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3814
! !
1161
3d9b4eaddcf3 category changes
Claus Gittinger <cg@exept.de>
parents: 675
diff changeset
  3815