RegressionTests__Win32OperatingSystemTest.st
author "Patrik Svestka <patrik.svestka@gmail.com>"
Fri, 16 Dec 2022 10:44:49 +0100
branchjv
changeset 2608 b77fda6a2e98
parent 2607 ddf2eb8b3f1d
parent 2606 ca1a3083168c
permissions -rwxr-xr-x
Merge - commit more robust tests - commit fixes random test fails when creating a process
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
2606
ca1a3083168c Fix random test fails of when creating process
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2604
diff changeset
     7
 COPYRIGHT (c) 2021-2022 Patrik Svestka
2607
ddf2eb8b3f1d Fix Windows tests for long paths in `exec:environment:...`
Jan Vrany <jan.vrany@labware.com>
parents: 2604
diff changeset
     8
 COPYRIGHT (c) 2022 Jan Vrany
1974
f2eaf05205d6 Copyright updates
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1566
diff changeset
     9
              All Rights Reserved
f2eaf05205d6 Copyright updates
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1566
diff changeset
    10
f2eaf05205d6 Copyright updates
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1566
diff changeset
    11
 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
    12
 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
    13
 inclusion of the above copyright notice.   This software may not
f2eaf05205d6 Copyright updates
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1566
diff changeset
    14
 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
    15
 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
    16
 hereby transferred.
f2eaf05205d6 Copyright updates
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1566
diff changeset
    17
"
1447
2351db93aa5b package changes
Claus Gittinger <cg@exept.de>
parents: 1392
diff changeset
    18
"{ Package: 'stx:goodies/regression' }"
344
21c39da58029 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    19
21c39da58029 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    20
"{ NameSpace: RegressionTests }"
21c39da58029 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    21
21c39da58029 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    22
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
    23
	instanceVariableNames:'registryPath windowsDetailsRegistryPath'
675
f98a0bb2f639 changed: #testMutex
Stefan Vogel <sv@exept.de>
parents: 355
diff changeset
    24
	classVariableNames:''
f98a0bb2f639 changed: #testMutex
Stefan Vogel <sv@exept.de>
parents: 355
diff changeset
    25
	poolDictionaries:''
1161
3d9b4eaddcf3 category changes
Claus Gittinger <cg@exept.de>
parents: 675
diff changeset
    26
	category:'tests-Regression-RuntimeSystem'
344
21c39da58029 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    27
!
21c39da58029 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    28
1974
f2eaf05205d6 Copyright updates
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1566
diff changeset
    29
!Win32OperatingSystemTest class methodsFor:'documentation'!
f2eaf05205d6 Copyright updates
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1566
diff changeset
    30
f2eaf05205d6 Copyright updates
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1566
diff changeset
    31
copyright
f2eaf05205d6 Copyright updates
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1566
diff changeset
    32
"
f2eaf05205d6 Copyright updates
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1566
diff changeset
    33
 COPYRIGHT (c) Claus Gittinger / eXept Software AG
f2eaf05205d6 Copyright updates
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1566
diff changeset
    34
 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
    35
 COPYRIGHT (c) 2021 svestkap
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
    36
 COPYRIGHT (c) 2021 Patrik Svestka
1974
f2eaf05205d6 Copyright updates
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1566
diff changeset
    37
              All Rights Reserved
f2eaf05205d6 Copyright updates
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1566
diff changeset
    38
f2eaf05205d6 Copyright updates
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1566
diff changeset
    39
 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
    40
 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
    41
 inclusion of the above copyright notice.   This software may not
f2eaf05205d6 Copyright updates
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1566
diff changeset
    42
 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
    43
 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
    44
 hereby transferred.
f2eaf05205d6 Copyright updates
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1566
diff changeset
    45
"
f2eaf05205d6 Copyright updates
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1566
diff changeset
    46
! !
344
21c39da58029 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    47
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
    48
!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
    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
    50
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
    51
9d76442a61bb Issue #250: Tests for 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
^  '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
    53
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
    54
[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
    55
@="しか 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
    56
"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
    57
"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
    58
"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
    59
"しかき    "="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
    60
" ř ž č ル.          "="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
    61
"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
    62
"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
    63
"す    "=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
    64
"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
    65
"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
    66
"き"=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
    67
"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
    68
"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
    69
"すし"=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
    70
"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
    71
  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
    72
  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
    73
  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
    74
  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
    75
  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
    76
  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
    77
  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
    78
  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
    79
  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
    80
  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
    81
  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
    82
  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
    83
  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
    84
  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
    85
  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
    86
  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
    87
  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
    88
  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
    89
  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
    90
  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
    91
  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
    92
  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
    93
  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
    94
  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
    95
  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
    96
  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
    97
  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
    98
  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
    99
  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
   100
  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
   101
  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
   102
  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
   103
  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
   104
  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
   105
  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
   106
  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
   107
"ř ž č ルすしか"=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
   108
  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
   109
  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
   110
  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
   111
  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
   112
  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
   113
  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
   114
  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
   115
  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
   116
  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
   117
  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
   118
  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
   119
  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
   120
  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
   121
  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
   122
  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
   123
  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
   124
  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
   125
  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
   126
  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
   127
  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
   128
  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
   129
  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
   130
  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
   131
  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
   132
  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
   133
  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
   134
  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
   135
  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
   136
  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
   137
  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
   138
  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
   139
  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
   140
  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
   141
  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
   142
  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
   143
  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
   144
  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
   145
  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
   146
  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
   147
"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
   148
  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
   149
  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
   150
  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
   151
" č ルすしか"=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
   152
  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
   153
  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
   154
  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
   155
  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
   156
[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
   157
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
   158
[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
   159
"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
   160
"しかき    "="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
   161
" ř ž č ル.          "="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
   162
"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
   163
"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
   164
"す    "=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
   165
"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
   166
"き"=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
   167
"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
   168
"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
   169
"すし"=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
   170
"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
   171
  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
   172
  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
   173
  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
   174
  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
   175
  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
   176
  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
   177
  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
   178
  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
   179
  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
   180
  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
   181
  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
   182
  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
   183
  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
   184
  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
   185
  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
   186
  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
   187
  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
   188
  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
   189
  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
   190
  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
   191
  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
   192
  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
   193
  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
   194
  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
   195
  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
   196
  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
   197
  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
   198
  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
   199
  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
   200
  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
   201
  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
   202
  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
   203
  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
   204
  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
   205
  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
   206
  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
   207
"ř ž č ルすしか"=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
   208
  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
   209
  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
   210
  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
   211
  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
   212
  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
   213
  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
   214
  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
   215
  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
   216
  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
   217
  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
   218
  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
   219
  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
   220
  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
   221
  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
   222
  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
   223
  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
   224
  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
   225
  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
   226
  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
   227
  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
   228
  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
   229
  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
   230
  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
   231
  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
   232
  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
   233
  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
   234
  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
   235
  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
   236
  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
   237
  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
   238
  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
   239
  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
   240
  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
   241
  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
   242
  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
   243
  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
   244
  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
   245
  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
   246
  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
   247
"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
   248
  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
   249
  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
   250
  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
   251
" č ルすしか"=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
   252
  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
   253
  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
   254
  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
   255
  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
   256
2593
773015856b61 Replacing the hardcoded registry path in order for the registry tests to run correctly in parallel, duh! Fixed tests that relied on the fixed size of the hardcoded path.
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2592
diff changeset
   257
[HKEY_CURRENT_USER\Software\%1\ ルすしか\256_chars_max_long|arsdfasdfjljljasdf;jl;jljsfasdfasdfljaslkdfjkasdfljalsd;jfa;lsdjflkasjdflkajsdflkjasdflkjsadlfjasldfjlsadjflksdjflksadjflkajsdflkjasdlfjalskdjflkasdjflkasdfkj;sdaf;kljkkjkklkjjjjkas|1asdfjsldfjlasdlfjlasdjfljasdlfjalsdjflajdfsdsasdfa|end]
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
   258
"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
   259
"か"=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
   260
"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
   261
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
   262
[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
   263
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
[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
   265
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
[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
   267
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
[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
   269
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
   270
[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
   271
"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
   272
"しかき    "="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
   273
" ř ž č ル.          "="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
   274
"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
   275
"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
   276
"す    "=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
   277
"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
   278
"き"=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
   279
"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
   280
"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
   281
"すし"=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
   282
"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
   283
  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
   284
  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
   285
  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
   286
  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
   287
  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
   288
  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
   289
  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
   290
  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
   291
  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
   292
  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
   293
  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
   294
  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
   295
  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
   296
  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
   297
  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
   298
  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
   299
  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
   300
  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
   301
  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
   302
  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
   303
  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
   304
  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
   305
  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
   306
  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
   307
  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
   308
  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
   309
  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
   310
  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
   311
  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
   312
  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
   313
  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
   314
  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
   315
  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
   316
  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
   317
  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
   318
  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
   319
"ř ž č ルすしか"=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
   320
  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
   321
  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
   322
  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
   323
  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
   324
  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
   325
  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
   326
  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
   327
  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
   328
  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
   329
  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
   330
  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
   331
  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
   332
  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
   333
  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
   334
  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
   335
  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
   336
  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
   337
  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
   338
  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
   339
  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
   340
  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
   341
  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
   342
  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
   343
  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
   344
  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
   345
  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
   346
  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
   347
  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
   348
  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
   349
  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
   350
  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
   351
  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
   352
  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
   353
  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
   354
  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
   355
  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
   356
  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
   357
  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
   358
  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
   359
"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
   360
  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
   361
  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
   362
  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
   363
" č ルすしか"=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
   364
  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
   365
  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
   366
  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
   367
  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
   368
[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
   369
773015856b61 Replacing the hardcoded registry path in order for the registry tests to run correctly in parallel, duh! Fixed tests that relied on the fixed size of the hardcoded path.
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2592
diff changeset
   370
[HKEY_CURRENT_USER\Software\%1\ ルすしか_testing_delete\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
   371
@=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
   372
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
   373
[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
   374
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
   375
[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
   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
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   378
    "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
   379
    "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
   380
! !
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   381
344
21c39da58029 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   382
!Win32OperatingSystemTest methodsFor:'release'!
21c39da58029 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   383
1566
2ca58098256d Issue #109: Added tests for registry key creation / deletion
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1500
diff changeset
   384
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
   385
    | 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
   386
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
   387
    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
   388
    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
   389
    
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
   390
    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
   391
    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
   392
    "/ 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
   393
    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
   394
    "/ 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
   395
    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
   396
    
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   397
    "/ 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
   398
    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
   399
        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
   400
        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
   401
        
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   402
    "/ 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
   403
    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
   404
9d76442a61bb Issue #250: Tests for 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
    "/ 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
   406
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   407
    " 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
   408
      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
   409
      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
   410
      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
   411
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   412
    "/ 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
   413
    " 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
   414
       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
   415
       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
   416
    
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   417
    "/ 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
   418
    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
   419
       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
   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
    
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   422
    "/ 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
   423
    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
   424
     
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   425
    [   "/ 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
   426
        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
   427
    ] 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
   428
    
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
    "/ 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
   430
    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
   431
    "/ 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
   432
    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
   433
2ca58098256d Issue #109: Added tests for registry key creation / deletion
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1500
diff changeset
   434
    "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
   435
    "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
   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
9d76442a61bb Issue #250: Tests for 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
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
   439
    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
   440
    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
   441
    
9d76442a61bb Issue #250: Tests for 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
    "/ 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
   443
    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
   444
9d76442a61bb Issue #250: Tests for 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
    "/ 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
   446
    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
   447
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
   448
    "Created: / 16-11-2018 / 11:29:12 / svestkap"
344
21c39da58029 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   449
! !
21c39da58029 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   450
2604
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   451
!Win32OperatingSystemTest methodsFor:'test-creatingProcess'!
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   452
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   453
testCorrectExec
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   454
    "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
   455
    | createProcessArgumentsLimit cmdInterpreterPath commandLineArguments atDir handle |
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   456
    
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   457
    "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
   458
     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
   459
    createProcessArgumentsLimit:= 4096.
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   460
    
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   461
    cmdInterpreterPath := OperatingSystem pathOfCommand: 'cmd'.
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   462
    self assert: cmdInterpreterPath size < createProcessArgumentsLimit. "/
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   463
    
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   464
    "/ 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
   465
    commandLineArguments := '/C cd'.      
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   466
    self assert: commandLineArguments size = 5.
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   467
    
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   468
    atDir := Filename currentDirectory pathName.
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   469
    self assert: atDir size < createProcessArgumentsLimit.
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   470
    
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   471
    self shouldnt: [
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   472
         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
   473
                     environment:nil
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   474
                 fileDescriptors:nil
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   475
                            fork:true
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   476
                         newPgrp:false
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   477
                     inDirectory: atDir.
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   478
    ] raise: Exception.
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   479
    
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   480
    self assert: handle notNil.
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   481
    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
   482
    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
   483
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   484
    "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
   485
!
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   486
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   487
testCorrectExec2
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   488
    "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
   489
    | createProcessArgumentsLimit cmdInterpreterPath commandLineArguments atDir handle |
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   490
    
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   491
    "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
   492
     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
   493
    createProcessArgumentsLimit:= 4096.          
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   494
    
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   495
    cmdInterpreterPath := OperatingSystem pathOfCommand: 'cmd'.
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   496
    self assert: cmdInterpreterPath size < createProcessArgumentsLimit.
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   497
    
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   498
    commandLineArguments := Array new: 2.
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   499
    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
   500
    commandLineArguments at: 2 put: 'cd'.
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   501
    self assert: commandLineArguments size = 2.
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   502
    
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   503
    atDir := Filename currentDirectory pathName.
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   504
    self assert: atDir size < createProcessArgumentsLimit.      
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   505
    
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   506
    self shouldnt: [
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   507
         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
   508
                     environment:nil
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   509
                 fileDescriptors:nil
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   510
                            fork:true
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   511
                         newPgrp:false
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   512
                     inDirectory: Filename currentDirectory pathName.
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   513
    ] raise: Exception.
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   514
    
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   515
    self assert: handle notNil.
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   516
    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
   517
    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
   518
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   519
    "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
   520
!
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   521
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   522
testExecCreatedProcessError
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   523
    "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
   524
    | commandLine savedException |
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   525
      
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   526
    commandLine := '..'.
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   527
    self assert: commandLine size = 2.
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   528
        
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   529
    self should: [
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   530
         OperatingSystem exec: 'cd' withArguments: commandLine
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   531
                  environment:nil
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   532
              fileDescriptors:nil
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   533
                         fork:true
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   534
                      newPgrp:false
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   535
                  inDirectory: Filename currentDirectory pathName
2607
ddf2eb8b3f1d Fix Windows tests for long paths in `exec:environment:...`
Jan Vrany <jan.vrany@labware.com>
parents: 2604
diff changeset
   536
    ] raise: OsError
2604
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   537
    suchThat: [ :ex | 
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   538
        savedException := ex.
2607
ddf2eb8b3f1d Fix Windows tests for long paths in `exec:environment:...`
Jan Vrany <jan.vrany@labware.com>
parents: 2604
diff changeset
   539
        ex errorSymbol == #'ERROR_FILE_NOT_FOUND'
2604
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   540
    ].
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   541
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   542
    "Created: / 21-10-2021 / 12:16:45 / svestkap"
2607
ddf2eb8b3f1d Fix Windows tests for long paths in `exec:environment:...`
Jan Vrany <jan.vrany@labware.com>
parents: 2604
diff changeset
   543
    "Modified: / 25-08-2022 / 11:21:04 / jv"
2604
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   544
!
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
testExecCreatedProcessError2
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   547
    "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
   548
    | commandLine handle |
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   549
      
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   550
    commandLine := '..'.
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   551
    self assert: commandLine size = 2.
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   552
    
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   553
    handle := Win32OperatingSystem::Win32ProcessHandle new.
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   554
    self assert: handle notNil.
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   555
    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
   556
    self assert: handle pid isNil.       
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   557
    
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   558
    Exception handle: [ :ex |
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   559
        ex proceed
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   560
    ] do: [ 
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   561
        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
   562
                           environment:nil
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   563
                       fileDescriptors:nil
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   564
                                  fork:true
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   565
                               newPgrp:false
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   566
                           inDirectory: Filename currentDirectory pathName
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   567
    ].
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   568
    "/ 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
   569
    self assert: handle isNil.
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   570
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   571
    "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
   572
!
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
testExecWithTooLongCommandLine
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   575
    "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
   576
    | beyondCreateProcessArgumentsLimit commandLine savedException |
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   577
    
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   578
    beyondCreateProcessArgumentsLimit := 4096.    
2606
ca1a3083168c Fix random test fails of when creating process
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2604
diff changeset
   579
    commandLine := RandomGenerator new nextLettersOrDigits: beyondCreateProcessArgumentsLimit.
2604
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   580
    self assert: commandLine size = beyondCreateProcessArgumentsLimit.
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   581
    
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   582
    self should: [
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   583
        OperatingSystem exec: '' withArguments: commandLine
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   584
                 environment:nil
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   585
             fileDescriptors:nil
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   586
                        fork:true
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   587
                     newPgrp:false
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   588
                 inDirectory: Filename currentDirectory pathName
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   589
    ] raise: Exception
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   590
    suchThat: [ :ex | 
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   591
        savedException := ex.
2607
ddf2eb8b3f1d Fix Windows tests for long paths in `exec:environment:...`
Jan Vrany <jan.vrany@labware.com>
parents: 2604
diff changeset
   592
        ex errorSymbol == #'ERROR_INVALID_PARAMETER'
2604
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   593
    ].
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
    "Created: / 21-10-2021 / 12:16:53 / svestkap"
2607
ddf2eb8b3f1d Fix Windows tests for long paths in `exec:environment:...`
Jan Vrany <jan.vrany@labware.com>
parents: 2604
diff changeset
   596
    "Modified: / 25-08-2022 / 11:22:06 / jv"
2604
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
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   599
testExecWithTooLongCommandLine2
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   600
    "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
   601
    | beyondCreateProcessArgumentsLimit commandLine handle |
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   602
    
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   603
    beyondCreateProcessArgumentsLimit := 4097.         
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   604
    "/ created random String size 4097
2606
ca1a3083168c Fix random test fails of when creating process
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2604
diff changeset
   605
    commandLine := RandomGenerator new nextLettersOrDigits: beyondCreateProcessArgumentsLimit.
2604
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   606
    self assert: commandLine size = beyondCreateProcessArgumentsLimit.
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   607
    
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   608
    handle := Win32OperatingSystem::Win32ProcessHandle new.
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   609
    self assert: handle notNil.
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   610
    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
   611
    self assert: handle pid isNil.
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   612
    
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   613
    Exception handle: [ :ex | 
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   614
        ex proceed
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   615
    ] do: [ 
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   616
         handle := OperatingSystem exec: '' withArguments: commandLine
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   617
                     environment:nil
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   618
                 fileDescriptors:nil
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   619
                            fork:true
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   620
                         newPgrp:false
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   621
                     inDirectory: Filename currentDirectory pathName
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   622
    ]. 
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   623
    "/ 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
   624
    self assert: handle isNil.
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
    "Created: / 21-10-2021 / 12:17:02 / svestkap"
2606
ca1a3083168c Fix random test fails of when creating process
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2604
diff changeset
   627
    "Modified: / 20-05-2022 / 13:58:16 / Patrik Svestka <patrik.svestka@gmail.com>"
2604
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
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   630
testExecWithTooLongCommandPath
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   631
    "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
   632
    | beyondCreateProcessArgumentsLimit commandPath savedException |
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   633
    
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   634
    beyondCreateProcessArgumentsLimit := 4096.
2606
ca1a3083168c Fix random test fails of when creating process
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2604
diff changeset
   635
    commandPath := RandomGenerator new nextLettersOrDigits: beyondCreateProcessArgumentsLimit.
2604
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   636
    self assert: commandPath size = beyondCreateProcessArgumentsLimit.
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   637
    
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   638
    self should: [
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   639
        OperatingSystem exec: commandPath withArguments: ''
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   640
                 environment:nil
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   641
             fileDescriptors:nil
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   642
                        fork:true
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   643
                     newPgrp:false
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   644
                 inDirectory: Filename currentDirectory pathName
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   645
    ] raise: Exception
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   646
    suchThat: [ :ex | 
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   647
        savedException := ex.
2607
ddf2eb8b3f1d Fix Windows tests for long paths in `exec:environment:...`
Jan Vrany <jan.vrany@labware.com>
parents: 2604
diff changeset
   648
        ex errorSymbol == #'ERROR_INVALID_PARAMETER'
2604
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   649
    ].
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   650
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   651
    "Created: / 21-10-2021 / 12:18:26 / svestkap"
2607
ddf2eb8b3f1d Fix Windows tests for long paths in `exec:environment:...`
Jan Vrany <jan.vrany@labware.com>
parents: 2604
diff changeset
   652
    "Modified: / 25-08-2022 / 11:22:56 / jv"
2604
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   653
!
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
testExecWithTooLongCommandPath2
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   656
    "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
   657
    | beyondCreateProcessArgumentsLimit commandPath handle |
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
    beyondCreateProcessArgumentsLimit := 4097.
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   660
    "/ created random String size 4097
2606
ca1a3083168c Fix random test fails of when creating process
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2604
diff changeset
   661
    commandPath := RandomGenerator new nextLettersOrDigits: beyondCreateProcessArgumentsLimit.
2604
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   662
    self assert: commandPath size = beyondCreateProcessArgumentsLimit.
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   663
    
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   664
    handle := Win32OperatingSystem::Win32ProcessHandle new.
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   665
    self assert: handle notNil.
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   666
    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
   667
    self assert: handle pid isNil.
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   668
    
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   669
    Exception handle: [ :ex | 
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   670
        ex proceed
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   671
    ] do: [ 
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   672
         handle := OperatingSystem exec: commandPath withArguments: ''
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   673
                     environment:nil
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   674
                 fileDescriptors:nil
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   675
                            fork:true
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   676
                         newPgrp:false
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   677
                     inDirectory: Filename currentDirectory pathName
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   678
    ]. 
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   679
    "/ 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
   680
    self assert: handle isNil.
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   681
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   682
    "Created: / 21-10-2021 / 12:19:37 / svestkap"
2606
ca1a3083168c Fix random test fails of when creating process
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2604
diff changeset
   683
    "Modified: / 20-05-2022 / 13:58:03 / Patrik Svestka <patrik.svestka@gmail.com>"
2604
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   684
!
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
testExecWithTooLongDirName
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   687
    "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
   688
    | beyondCreateProcessArgumentsLimit dirName savedException |
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   689
    
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   690
    beyondCreateProcessArgumentsLimit := 4096.
2606
ca1a3083168c Fix random test fails of when creating process
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2604
diff changeset
   691
    dirName := RandomGenerator new nextLettersOrDigits: beyondCreateProcessArgumentsLimit.
2604
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   692
    self assert: dirName size = beyondCreateProcessArgumentsLimit.
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   693
    
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   694
    self should: [
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   695
        OperatingSystem exec: '' withArguments: ''
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   696
                 environment:nil
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   697
             fileDescriptors:nil
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   698
                        fork:true
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   699
                     newPgrp:false
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   700
                 inDirectory: dirName
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   701
    ] raise: Exception
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   702
    suchThat: [ :ex | 
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   703
        savedException := ex.
2607
ddf2eb8b3f1d Fix Windows tests for long paths in `exec:environment:...`
Jan Vrany <jan.vrany@labware.com>
parents: 2604
diff changeset
   704
        ex errorSymbol == #'ERROR_INVALID_PARAMETER'
2604
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   705
    ].
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   706
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   707
    "Created: / 21-10-2021 / 12:22:38 / svestkap"
2607
ddf2eb8b3f1d Fix Windows tests for long paths in `exec:environment:...`
Jan Vrany <jan.vrany@labware.com>
parents: 2604
diff changeset
   708
    "Modified: / 25-08-2022 / 11:23:15 / jv"
2604
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   709
!
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   710
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   711
testExecWithTooLongDirName2
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   712
    "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
   713
    | beyondCreateProcessArgumentsLimit dirName handle |
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
    beyondCreateProcessArgumentsLimit := 4097.
2606
ca1a3083168c Fix random test fails of when creating process
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2604
diff changeset
   716
    dirName := RandomGenerator new nextLettersOrDigits: beyondCreateProcessArgumentsLimit.
2604
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   717
    self assert: dirName size = beyondCreateProcessArgumentsLimit.
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   718
    
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   719
    handle := Win32OperatingSystem::Win32ProcessHandle new.
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   720
    self assert: handle notNil.
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   721
    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
   722
    self assert: handle pid isNil.
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
    Exception handle: [ :ex | 
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   725
        ex proceed
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   726
    ] do: [ 
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   727
         handle := OperatingSystem exec: '' withArguments: ''
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   728
                     environment:nil
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   729
                 fileDescriptors:nil
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   730
                            fork:true
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   731
                         newPgrp:false
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   732
                     inDirectory: dirName
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   733
    ]. 
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   734
    "/ 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
   735
    self assert: handle isNil.
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   736
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   737
    "Created: / 21-10-2021 / 12:21:54 / svestkap"
2606
ca1a3083168c Fix random test fails of when creating process
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2604
diff changeset
   738
    "Modified: / 20-05-2022 / 13:35:31 / Patrik Svestka <patrik.svestka@gmail.com>"
2604
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   739
! !
d6d5dfaa3e00 Adding tests for creating processes on MS Windows
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2593
diff changeset
   740
344
21c39da58029 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   741
!Win32OperatingSystemTest methodsFor:'tests'!
21c39da58029 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   742
21c39da58029 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   743
testMutex
21c39da58029 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   744
    |handle alreadyExists lastErrorCode handleAndLastErrorCode|
21c39da58029 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   745
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
   746
    handleAndLastErrorCode := Win32OperatingSystem createMutexNamed: UUID new printString.
344
21c39da58029 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   747
    handle := handleAndLastErrorCode first.
21c39da58029 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   748
    handle isNil ifTrue:[^ self].
21c39da58029 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   749
    lastErrorCode := handleAndLastErrorCode second.
21c39da58029 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   750
    self assert: lastErrorCode == 0.
21c39da58029 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   751
    alreadyExists := (lastErrorCode == 5 "ERROR_ACCESS_DENIED" or:[ lastErrorCode == 183 "ERROR_ALREADY_EXISTS"]).
21c39da58029 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   752
    alreadyExists ifTrue:[
1566
2ca58098256d Issue #109: Added tests for registry key creation / deletion
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1500
diff changeset
   753
        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
   754
        ^ self.
344
21c39da58029 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   755
    ].
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
   756
    [
f53c1ec52418 `Win32OperatingSystemTest`: use generated mutex name to allow tests to run in parallel
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1974
diff changeset
   757
        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
   758
        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
   759
        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
   760
        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
   761
    ] 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
   762
        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
   763
        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
   764
    ].
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
344
21c39da58029 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   766
21c39da58029 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   767
    "
21c39da58029 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   768
     self new testMutex
21c39da58029 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   769
    "
1566
2ca58098256d Issue #109: Added tests for registry key creation / deletion
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1500
diff changeset
   770
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
   771
    "Modified: / 28-06-2018 / 09:14:35 / jv"
1352
e0d857144dbf #FEATURE
Claus Gittinger <cg@exept.de>
parents: 1161
diff changeset
   772
!
e0d857144dbf #FEATURE
Claus Gittinger <cg@exept.de>
parents: 1161
diff changeset
   773
e0d857144dbf #FEATURE
Claus Gittinger <cg@exept.de>
parents: 1161
diff changeset
   774
testRegistry
e0d857144dbf #FEATURE
Claus Gittinger <cg@exept.de>
parents: 1161
diff changeset
   775
    |k hasContentType|
e0d857144dbf #FEATURE
Claus Gittinger <cg@exept.de>
parents: 1161
diff changeset
   776
e0d857144dbf #FEATURE
Claus Gittinger <cg@exept.de>
parents: 1161
diff changeset
   777
    k := OperatingSystem registryEntry key:'HKEY_CLASSES_ROOT\MIME\Database\'.
e0d857144dbf #FEATURE
Claus Gittinger <cg@exept.de>
parents: 1161
diff changeset
   778
    self assert:(k notNil).
e0d857144dbf #FEATURE
Claus Gittinger <cg@exept.de>
parents: 1161
diff changeset
   779
e0d857144dbf #FEATURE
Claus Gittinger <cg@exept.de>
parents: 1161
diff changeset
   780
    hasContentType := false.
1447
2351db93aa5b package changes
Claus Gittinger <cg@exept.de>
parents: 1392
diff changeset
   781
    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
   782
        "/ Transcript showCR:nm.
2ca58098256d Issue #109: Added tests for registry key creation / deletion
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1500
diff changeset
   783
        nm = 'Content Type' ifTrue:[hasContentType := true].
1352
e0d857144dbf #FEATURE
Claus Gittinger <cg@exept.de>
parents: 1161
diff changeset
   784
    ].
e0d857144dbf #FEATURE
Claus Gittinger <cg@exept.de>
parents: 1161
diff changeset
   785
    self assert:hasContentType.
e0d857144dbf #FEATURE
Claus Gittinger <cg@exept.de>
parents: 1161
diff changeset
   786
e0d857144dbf #FEATURE
Claus Gittinger <cg@exept.de>
parents: 1161
diff changeset
   787
    "/ k subKeysDo:[:k | Transcript showCR:k].
e0d857144dbf #FEATURE
Claus Gittinger <cg@exept.de>
parents: 1161
diff changeset
   788
e0d857144dbf #FEATURE
Claus Gittinger <cg@exept.de>
parents: 1161
diff changeset
   789
    "
e0d857144dbf #FEATURE
Claus Gittinger <cg@exept.de>
parents: 1161
diff changeset
   790
     self new testRegistry
e0d857144dbf #FEATURE
Claus Gittinger <cg@exept.de>
parents: 1161
diff changeset
   791
    "
1566
2ca58098256d Issue #109: Added tests for registry key creation / deletion
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1500
diff changeset
   792
2ca58098256d Issue #109: Added tests for registry key creation / deletion
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1500
diff changeset
   793
    "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
   794
!
2ca58098256d Issue #109: Added tests for registry key creation / deletion
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1500
diff changeset
   795
2ca58098256d Issue #109: Added tests for registry key creation / deletion
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1500
diff changeset
   796
testRegistry02a
2ca58098256d Issue #109: Added tests for registry key creation / deletion
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1500
diff changeset
   797
    | root key |
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
    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
   800
    root deleteSubKeyNamed: testSelector.
2ca58098256d Issue #109: Added tests for registry key creation / deletion
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1500
diff changeset
   801
2ca58098256d Issue #109: Added tests for registry key creation / deletion
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1500
diff changeset
   802
    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
   803
    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
   804
2ca58098256d Issue #109: Added tests for registry key creation / deletion
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1500
diff changeset
   805
    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
   806
    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
   807
    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
   808
2ca58098256d Issue #109: Added tests for registry key creation / deletion
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1500
diff changeset
   809
    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
   810
    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
   811
    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
   812
2ca58098256d Issue #109: Added tests for registry key creation / deletion
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1500
diff changeset
   813
    "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
   814
    "Modified: / 05-01-2017 / 21:45:20 / jv"
344
21c39da58029 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   815
! !
21c39da58029 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   816
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   817
!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
   818
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   819
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
   820
    "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
   821
    | 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
   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
    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
   824
    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
   825
    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
   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
    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
   828
    "/ 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
   829
    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
   830
    "/ 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
   831
    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
   832
    
823598772842 Issue #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
    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
   834
    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
   835
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   836
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   837
     self 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
   838
     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
   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
    "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
   842
    "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
   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
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
   846
    "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
   847
    | 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
   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
    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
   850
    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
   851
    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
   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
    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
   854
    "/ 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
   855
    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
   856
    "/ 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
   857
    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
   858
823598772842 Issue #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
    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
   860
    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
   861
823598772842 Issue #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
     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
   864
     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
   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
    "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
   868
    "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
   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
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
   872
    "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
   873
    | 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
   874
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
   875
    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
   876
    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
   877
    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
   878
        
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   879
    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
   880
    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
   881
    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
   882
    
823598772842 Issue #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
    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
   884
    "/ 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
   885
    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
   886
    "/ 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
   887
    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
   888
    
823598772842 Issue #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
    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
   890
    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
   891
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   892
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   893
     self 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
   894
     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
   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
    "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
   898
    "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
   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
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
   902
    "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
   903
    | 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
   904
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
   905
    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
   906
    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
   907
    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
   908
                                                                   
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   909
    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
   910
    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
   911
    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
   912
823598772842 Issue #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
    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
   914
    "/ 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
   915
    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
   916
    "/ 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
   917
    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
   918
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   919
    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
   920
    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
   921
823598772842 Issue #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
     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
   924
     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
   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
    "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
   928
    "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
   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
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
   932
    "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
   933
    | 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
   934
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
   935
    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
   936
    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
   937
    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
   938
 
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   939
    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
   940
    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
   941
    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
   942
    
823598772842 Issue #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
    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
   944
    "/ 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
   945
    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
   946
    "/ 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
   947
    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
   948
    
823598772842 Issue #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
    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
   950
    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
   951
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   952
    "
823598772842 Issue #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
     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
   954
     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
   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
    "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
   958
    "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
   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
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
   962
    "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
   963
    | 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
   964
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
   965
    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
   966
    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
   967
    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
   968
 
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   969
    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
   970
    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
   971
    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
   972
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   973
    self assert: 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
   974
    "/ 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
   975
    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
   976
    "/ 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
   977
    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
   978
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   979
    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
   980
    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
   981
823598772842 Issue #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
     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
   984
     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
   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
    "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
   988
    "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
   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
!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
   992
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
   993
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
   994
    "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
   995
    | 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
   996
       
2085
823598772842 Issue #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
    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
   998
    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
   999
    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
  1000
    
823598772842 Issue #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
    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
  1002
    "/ 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
  1003
    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
  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
    "/ 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
  1006
    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
  1007
    
823598772842 Issue #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
     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
  1010
     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
  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
    "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
  1014
    "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
  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
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
  1018
    "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
  1019
    | 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
  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
    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
  1022
    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
  1023
    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
  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
    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
  1026
    "/ 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
  1027
    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
  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
    "/ 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
  1030
    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
  1031
    
823598772842 Issue #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
     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
  1034
     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
  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
    "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
  1038
    "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
  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
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
  1042
    "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
  1043
    | 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
  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
    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
  1046
    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
  1047
    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
  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
    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
  1050
    "/ 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
  1051
    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
  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
    "/ 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
  1054
    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
  1055
    
823598772842 Issue #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
     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
  1058
     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
  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
    "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
  1062
    "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
  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
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
  1066
    "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
  1067
    | 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
  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
    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
  1070
    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
  1071
    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
  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
    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
  1074
    "/ 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
  1075
    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
  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
    "/ 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
  1078
    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
  1079
    
823598772842 Issue #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
     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
  1082
     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
  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
    "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
  1086
    "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
  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
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
  1089
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
  1090
    "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
  1091
    | 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
  1092
     
677b483367cf Issue #250: and #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
    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
  1094
    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
  1095
    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
  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
    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
  1098
    "/ 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
  1099
    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
  1100
         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
  1101
         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
  1102
         
677b483367cf Issue #250: and #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
    "
677b483367cf Issue #250: and #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
     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
  1105
     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
  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
    "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
  1109
!
677b483367cf Issue #250: and #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
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1111
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
  1112
    "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
  1113
    | 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
  1114
   
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  1115
    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
  1116
    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
  1117
    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
  1118
        
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1119
    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
  1120
    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
  1121
    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
  1122
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1123
    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
  1124
    "/ 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
  1125
    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
  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
    "/ 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
  1128
    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
  1129
    
823598772842 Issue #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
     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
  1132
     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
  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
    "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
  1136
    "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
  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
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
  1140
    "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
  1141
    | 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
  1142
   
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  1143
    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
  1144
    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
  1145
    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
  1146
                                                                     
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1147
    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
  1148
    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
  1149
    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
  1150
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1151
    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
  1152
    "/ 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
  1153
    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
  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
    "/ 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
  1156
    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
  1157
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1158
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1159
     self 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
  1160
     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
  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
    "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
  1164
    "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
  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
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
  1168
    "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
  1169
    | 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
  1170
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  1171
    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
  1172
    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
  1173
    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
  1174
                                                                    
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1175
    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
  1176
    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
  1177
    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
  1178
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1179
    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
  1180
    "/ 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
  1181
    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
  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
    "/ 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
  1184
    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
  1185
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1186
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1187
     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
  1188
     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
  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
    "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
  1192
    "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
  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
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
  1196
    "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
  1197
    | 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
  1198
   
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  1199
    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
  1200
    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
  1201
    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
  1202
                                                                    
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1203
    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
  1204
    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
  1205
    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
  1206
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1207
    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
  1208
    "/ 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
  1209
    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
  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
    "/ 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
  1212
    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
  1213
    
823598772842 Issue #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
     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
  1216
     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
  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
    "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
  1220
    "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
  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
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
  1224
    "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
  1225
    | 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
  1226
   
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  1227
    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
  1228
    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
  1229
    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
  1230
                                                                       
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1231
    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
  1232
    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
  1233
    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
  1234
    
823598772842 Issue #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
    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
  1236
    "/ 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
  1237
    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
  1238
    "/ 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
  1239
823598772842 Issue #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
    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
  1241
    
823598772842 Issue #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
    "
823598772842 Issue #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
     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
  1244
     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
  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
    "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
  1248
    "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
  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
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
  1252
    "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
  1253
    | 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
  1254
   
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  1255
    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
  1256
    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
  1257
    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
  1258
                                                                   
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1259
    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
  1260
    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
  1261
    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
  1262
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1263
    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
  1264
    "/ 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
  1265
    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
  1266
    "/ 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
  1267
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1268
    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
  1269
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1270
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1271
     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
  1272
     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
  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
    "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
  1276
    "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
  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
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
  1280
    "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
  1281
    | 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
  1282
       
2085
823598772842 Issue #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
    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
  1284
    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
  1285
    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
  1286
    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
  1287
    
823598772842 Issue #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
    "/ 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
  1289
    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
  1290
    "/ 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
  1291
    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
  1292
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1293
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1294
     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
  1295
     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
  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
    "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
  1299
    "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
  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
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
  1303
    "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
  1304
    | 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
  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
    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
  1307
    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
  1308
    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
  1309
    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
  1310
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1311
    "/ 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
  1312
    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
  1313
    "/ 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
  1314
    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
  1315
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1316
    "
823598772842 Issue #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
     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
  1318
     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
  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
    "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
  1322
    "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
  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
!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
  1326
2086
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1327
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
  1328
    "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
  1329
    | 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
  1330
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1331
    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
  1332
    
823598772842 Issue #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
    "/ 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
  1334
    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
  1335
    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
  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
    "
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
  1338
     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
  1339
     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
  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
    "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
  1343
    "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
  1344
!
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1345
677b483367cf Issue #250: and #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
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
  1347
    "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
  1348
    | 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
  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
    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
  1351
    
677b483367cf Issue #250: and #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
    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
  1353
         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
  1354
         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
  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
    "
677b483367cf Issue #250: and #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
     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
  1358
     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
  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
    "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
  1362
    "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
  1363
!
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1364
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1365
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
  1366
    "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
  1367
     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
  1368
    | 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
  1369
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  1370
    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
  1371
    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
  1372
    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
  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
    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
  1375
    "/ 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
  1376
    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
  1377
    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
  1378
2085
823598772842 Issue #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
    "
823598772842 Issue #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
     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
  1381
     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
  1382
    "
823598772842 Issue #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
    "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
  1385
    "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
  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
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
  1389
    "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
  1390
     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
  1391
    | 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
  1392
    
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  1393
    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
  1394
    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
  1395
    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
  1396
                                                                   
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  1397
    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
  1398
    "/ 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
  1399
    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
  1400
    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
  1401
 
823598772842 Issue #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
    "
823598772842 Issue #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
     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
  1404
     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
  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
    "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
  1408
    "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
  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
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
  1412
    "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
  1413
    | 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
  1414
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
  1415
    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
  1416
    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
  1417
823598772842 Issue #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
    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
  1419
    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
  1420
823598772842 Issue #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
    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
  1422
    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
  1423
823598772842 Issue #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
    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
  1425
    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
  1426
823598772842 Issue #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
     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
  1429
     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
  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
    "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
  1433
    "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
  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
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
  1437
    "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
  1438
    | 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
  1439
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
  1440
    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
  1441
    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
  1442
823598772842 Issue #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
    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
  1444
    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
  1445
    
823598772842 Issue #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
    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
  1447
    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
  1448
    
823598772842 Issue #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
    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
  1450
    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
  1451
823598772842 Issue #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
     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
  1454
     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
  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
    "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
  1458
    "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
  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
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
  1462
    "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
  1463
    | 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
  1464
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
  1465
    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
  1466
    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
  1467
823598772842 Issue #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
    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
  1469
    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
  1470
    
823598772842 Issue #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
    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
  1472
    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
  1473
    
823598772842 Issue #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
    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
  1475
    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
  1476
823598772842 Issue #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
     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
  1479
     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
  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
    "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
  1483
    "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
  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
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
  1487
    "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
  1488
    | 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
  1489
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
  1490
    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
  1491
    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
  1492
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1493
    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
  1494
    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
  1495
    
823598772842 Issue #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
    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
  1497
    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
  1498
    
823598772842 Issue #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
    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
  1500
    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
  1501
823598772842 Issue #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
     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
  1504
     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
  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
    "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
  1508
    "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
  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
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
  1511
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
  1512
    "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
  1513
    | 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
  1514
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1515
    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
  1516
    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
  1517
823598772842 Issue #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
    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
  1519
    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
  1520
    
823598772842 Issue #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
    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
  1522
    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
  1523
    
823598772842 Issue #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
    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
  1525
    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
  1526
823598772842 Issue #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
    "
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
  1528
     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
  1529
     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
  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
    "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
  1533
    "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
  1534
!
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1535
677b483367cf Issue #250: and #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
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
  1537
    "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
  1538
    | 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
  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
    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
  1541
    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
  1542
677b483367cf Issue #250: and #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
    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
  1544
    self assert: readData notEmptyOrNil.
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1545
    
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1546
    self 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
  1547
         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
  1548
         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
  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
    "
677b483367cf Issue #250: and #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
     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
  1552
     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
  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
    "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
  1556
    "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
  1557
!
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1558
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1559
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
  1560
    "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
  1561
    | 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
  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
    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
  1564
    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
  1565
823598772842 Issue #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
    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
  1567
    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
  1568
    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
  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
    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
  1571
    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
  1572
    
823598772842 Issue #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
    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
  1574
    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
  1575
823598772842 Issue #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
     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
  1578
     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
  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
    "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
  1582
    "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
  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
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
  1586
    "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
  1587
    | 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
  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
    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
  1590
    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
  1591
823598772842 Issue #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
    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
  1593
    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
  1594
    
823598772842 Issue #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
    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
  1596
    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
  1597
823598772842 Issue #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
     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
  1600
     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
  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
    "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
  1604
    "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
  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
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
  1607
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
  1608
    "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
  1609
    | 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
  1610
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1611
    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
  1612
    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
  1613
    
823598772842 Issue #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
    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
  1615
        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
  1616
823598772842 Issue #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
    "
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
  1618
     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
  1619
     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
  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
    "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
  1623
! !
823598772842 Issue #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
!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
  1626
823598772842 Issue #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
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
  1628
    "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
  1629
    | 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
  1630
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  1631
    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
  1632
    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
  1633
823598772842 Issue #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
    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
  1635
        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
  1636
    ].        
823598772842 Issue #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
    "/ 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
  1639
    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
  1640
        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
  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
    
823598772842 Issue #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
    "/ 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
  1644
    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
  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
    "/ 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
  1647
    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
  1648
        | 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
  1649
        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
  1650
        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
  1651
        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
  1652
    ].
823598772842 Issue #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
    
823598772842 Issue #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
    "/ 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
  1655
    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
  1656
    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
  1657
    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
  1658
 
823598772842 Issue #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
    "
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
  1660
     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
  1661
     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
  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
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  1664
    "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
  1665
    "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
  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
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
  1668
!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
  1669
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
  1670
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
  1671
    "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
  1672
     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
  1673
    | 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
  1674
9d76442a61bb Issue #250: Tests for 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
    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
  1676
    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
  1677
9d76442a61bb Issue #250: Tests for 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
    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
  1679
    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
  1680
9d76442a61bb Issue #250: Tests for 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
    "
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
  1682
     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
  1683
     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
  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
    "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
  1687
    "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
  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
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
  1691
    "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
  1692
     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
  1693
    | 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
  1694
    
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
  1695
    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
  1696
    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
  1697
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
  1698
    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
  1699
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  1700
    "
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
  1701
     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
  1702
     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
  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
    "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
  1706
    "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
  1707
!
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1708
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1709
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
  1710
    "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
  1711
    | 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
  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
    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
  1714
    
677b483367cf Issue #250: and #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
    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
  1716
         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
  1717
         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
  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
    "
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1720
     self 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
  1721
     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
  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
    "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
  1725
!
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1726
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1727
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
  1728
    "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
  1729
    | 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
  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
    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
  1732
    
677b483367cf Issue #250: and #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
    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
  1734
         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
  1735
         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
  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
    "
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1738
     self 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
  1739
     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
  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
    "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
  1743
!
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1744
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1745
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
  1746
    "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
  1747
     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
  1748
       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
  1749
    | 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
  1750
677b483367cf Issue #250: and #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
    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
  1752
        (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
  1753
    
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1754
    readData := testingRegistryPath 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
  1755
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1756
    self assert: readData 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
  1757
    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
  1758
       
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
  1759
    "/ 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
  1760
    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
  1761
    
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1762
    "
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1763
     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
  1764
     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
  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
    "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
  1768
    "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
  1769
!
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  1770
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
  1771
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
  1772
    "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
  1773
    | 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
  1774
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  1775
    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
  1776
        (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
  1777
    
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
  1778
    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
  1779
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
  1780
    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
  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
     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
  1783
     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
  1784
    "
9d76442a61bb Issue #250: Tests for 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
    "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
  1787
    "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
  1788
!
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1789
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1790
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
  1791
    "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
  1792
    | 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
  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
    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
  1795
        (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
  1796
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1797
    self 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
  1798
         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
  1799
         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
  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
    "
677b483367cf Issue #250: and #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
     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
  1803
     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
  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
    "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
  1807
!
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1808
677b483367cf Issue #250: and #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
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
  1810
    "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
  1811
    | 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
  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
    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
  1814
        (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
  1815
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1816
    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
  1817
         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
  1818
         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
  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
    "
677b483367cf Issue #250: and #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
     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
  1822
     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
  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
    "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
  1826
!
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1827
677b483367cf Issue #250: and #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
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
  1829
    "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
  1830
     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
  1831
       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
  1832
    | 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
  1833
677b483367cf Issue #250: and #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
    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
  1835
        (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
  1836
    
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1837
    readData := testingRegistryPath 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
  1838
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1839
    self assert: readData 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
  1840
    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
  1841
    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
  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
    "/ 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
  1844
    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
  1845
    
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1846
    "
677b483367cf Issue #250: and #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
     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
  1848
     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
  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
    "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
  1852
    "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
  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
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
  1856
    "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
  1857
    | 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
  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
    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
  1860
            (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
  1861
            |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
  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
    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
  1864
    
677b483367cf Issue #250: and #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
    "
677b483367cf Issue #250: and #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
     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
  1867
     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
  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
    "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
  1871
    "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
  1872
!
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  1873
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
  1874
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
  1875
    "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
  1876
     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
  1877
     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
  1878
       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
  1879
    | 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
  1880
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  1881
    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
  1882
    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
  1883
9d76442a61bb Issue #250: Tests for 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
    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
  1885
    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
  1886
9d76442a61bb Issue #250: Tests for 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 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
  1889
     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
  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
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
  1892
    "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
  1893
    "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
  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
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
  1897
    "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
  1898
    | 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
  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
    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
  1901
    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
  1902
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
  1903
    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
  1904
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  1905
    "
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
  1906
     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
  1907
     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
  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
    "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
  1911
    "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
  1912
!
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1913
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1914
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
  1915
    "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
  1916
    | 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
  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
    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
  1919
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1920
    self 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
  1921
         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
  1922
         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
  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
    "
677b483367cf Issue #250: and #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
     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
  1926
     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
  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
    "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
  1930
!
677b483367cf Issue #250: and #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
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
  1933
    "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
  1934
    | 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
  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
    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
  1937
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1938
    self 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
  1939
         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
  1940
         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
  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
    "
677b483367cf Issue #250: and #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
     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
  1944
     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
  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
    "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
  1948
!
677b483367cf Issue #250: and #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
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
  1951
    "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
  1952
    | 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
  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
    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
  1955
     
677b483367cf Issue #250: and #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 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
  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
    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
  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
    "
677b483367cf Issue #250: and #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
     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
  1962
     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
  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
    "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
  1966
    "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
  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
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
  1970
    "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
  1971
    | 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
  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
    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
  1974
     
677b483367cf Issue #250: and #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
    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
  1976
    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
  1977
    
677b483367cf Issue #250: and #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
    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
  1979
    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
  1980
    
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1981
    "
677b483367cf Issue #250: and #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 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
  1983
     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
  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
    "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
  1987
    "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
  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
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
  1991
    "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
  1992
    | 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
  1993
        
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  1994
    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
  1995
    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
  1996
        
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  1997
    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
  1998
677b483367cf Issue #250: and #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
    "
677b483367cf Issue #250: and #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
     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
  2001
     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
  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
    "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
  2005
    "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
  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
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
  2009
    "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
  2010
    | 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
  2011
            
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  2012
    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
  2013
    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
  2014
        
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2015
    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
  2016
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2017
    "
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2018
     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
  2019
     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
  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
    "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
  2023
    "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
  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
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
  2027
    "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
  2028
    | 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
  2029
    
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  2030
    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
  2031
    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
  2032
        
677b483367cf Issue #250: and #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
    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
  2034
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2035
    "
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2036
     self 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
  2037
     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
  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
    "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
  2041
    "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
  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
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
  2045
    "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
  2046
    | 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
  2047
    
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  2048
    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
  2049
    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
  2050
        
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2051
    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
  2052
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2053
    "
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2054
     self 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
  2055
     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
  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
    "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
  2059
    "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
  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
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
  2063
    "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
  2064
    | 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
  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
    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
  2067
     
677b483367cf Issue #250: and #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 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
  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
    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
  2071
                              '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
  2072
                              '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
  2073
                              '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
  2074
677b483367cf Issue #250: and #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
    "
677b483367cf Issue #250: and #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
     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
  2077
     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
  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
    "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
  2081
    "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
  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
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
  2085
    "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
  2086
    | 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
  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
    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
  2089
     
677b483367cf Issue #250: and #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 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
  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
    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
  2093
                              '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
  2094
                              '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
  2095
                              '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
  2096
                              '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
  2097
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2098
    "
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2099
     self 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
  2100
     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
  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
    "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
  2104
    "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
  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
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
  2108
    "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
  2109
    | 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
  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
    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
  2112
     
677b483367cf Issue #250: and #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 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
  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
    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
  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
    "
677b483367cf Issue #250: and #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
     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
  2119
     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
  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
    "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
  2123
    "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
  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
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
  2127
    "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
  2128
     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
  2129
    | 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
  2130
    
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  2131
    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
  2132
    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
  2133
        
677b483367cf Issue #250: and #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
    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
  2135
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2136
    "
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2137
     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
  2138
     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
  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
    "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
  2142
    "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
  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
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
  2146
    "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
  2147
    | 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
  2148
    
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  2149
    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
  2150
    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
  2151
        
677b483367cf Issue #250: and #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
    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
  2153
677b483367cf Issue #250: and #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
    "
677b483367cf Issue #250: and #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
     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
  2156
     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
  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
    "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
  2160
    "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
  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
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
  2164
    "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
  2165
    | 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
  2166
        
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  2167
    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
  2168
    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
  2169
    
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  2170
    "/ 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
  2171
    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
  2172
        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
  2173
    ].
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  2174
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  2175
    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
  2176
    
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
  2177
    "
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2178
     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
  2179
     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
  2180
    "
677b483367cf Issue #250: and #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
    "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
  2183
    "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
  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
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
  2187
    "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
  2188
    | 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
  2189
    
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  2190
    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
  2191
    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
  2192
    
677b483367cf Issue #250: and #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
    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
  2194
    
677b483367cf Issue #250: and #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
    "
677b483367cf Issue #250: and #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
     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
  2197
     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
  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
    "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
  2201
    "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
  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
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
  2205
    "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
  2206
    | 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
  2207
    
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  2208
    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
  2209
    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
  2210
        
677b483367cf Issue #250: and #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
    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
  2212
677b483367cf Issue #250: and #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
    "
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2214
     self run:#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
  2215
     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
  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
    "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
  2219
    "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
  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
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
  2223
    "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
  2224
    | 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
  2225
    
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  2226
    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
  2227
    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
  2228
        
677b483367cf Issue #250: and #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
    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
  2230
677b483367cf Issue #250: and #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
    "
677b483367cf Issue #250: and #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
     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
  2233
     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
  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
    "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
  2237
    "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
  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
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
  2241
    "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
  2242
    | 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
  2243
    
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  2244
    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
  2245
    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
  2246
    
677b483367cf Issue #250: and #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
    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
  2248
    
677b483367cf Issue #250: and #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
    "
677b483367cf Issue #250: and #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
     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
  2251
     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
  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
    "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
  2255
    "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
  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
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
  2259
    "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
  2260
    | 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
  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
    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
  2263
    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
  2264
         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
  2265
         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
  2266
677b483367cf Issue #250: and #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
    "
677b483367cf Issue #250: and #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
     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
  2269
     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
  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
    "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
  2273
    "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
  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
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
  2277
    "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
  2278
    | 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
  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
    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
  2281
    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
  2282
         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
  2283
         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
  2284
    
677b483367cf Issue #250: and #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
    "
677b483367cf Issue #250: and #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
     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
  2287
     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
  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
    "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
  2291
!
677b483367cf Issue #250: and #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
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
  2294
    "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
  2295
    | 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
  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
    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
  2298
    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
  2299
    
677b483367cf Issue #250: and #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
    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
  2301
    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
  2302
    
677b483367cf Issue #250: and #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
    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
  2304
    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
  2305
    
677b483367cf Issue #250: and #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 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
  2308
     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
  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
    "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
  2312
!
677b483367cf Issue #250: and #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
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
  2315
    "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
  2316
    | 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
  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
    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
  2319
    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
  2320
                                                         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
  2321
    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
  2322
    
677b483367cf Issue #250: and #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
    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
  2324
    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
  2325
    
677b483367cf Issue #250: and #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
    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
  2327
    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
  2328
    
677b483367cf Issue #250: and #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 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
  2331
     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
  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
    "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
  2335
    "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
  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
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
  2339
    "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
  2340
    | 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
  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
    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
  2343
    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
  2344
    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
  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
    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
  2347
    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
  2348
    
677b483367cf Issue #250: and #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
    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
  2350
    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
  2351
    
677b483367cf Issue #250: and #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 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
  2354
     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
  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
    "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
  2358
    "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
  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
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
  2362
    "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
  2363
    | 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
  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
    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
  2366
    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
  2367
    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
  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
    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
  2370
    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
  2371
    
677b483367cf Issue #250: and #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
    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
  2373
    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
  2374
    
677b483367cf Issue #250: and #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 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
  2377
     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
  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
    "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
  2381
!
677b483367cf Issue #250: and #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
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
  2384
    "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
  2385
    | 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
  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
    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
  2388
    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
  2389
    
677b483367cf Issue #250: and #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
    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
  2391
    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
  2392
    
677b483367cf Issue #250: and #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
    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
  2394
    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
  2395
    
677b483367cf Issue #250: and #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 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
  2398
     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
  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
    "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
  2402
    "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
  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
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
  2406
    "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
  2407
    | 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
  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
    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
  2410
    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
  2411
    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
  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
    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
  2414
    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
  2415
    
677b483367cf Issue #250: and #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
    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
  2417
    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
  2418
    
677b483367cf Issue #250: and #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 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
  2421
     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
  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
    "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
  2425
    "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
  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
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
  2429
    "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
  2430
    | 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
  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
    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
  2433
    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
  2434
    
677b483367cf Issue #250: and #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
    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
  2436
    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
  2437
    
677b483367cf Issue #250: and #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
    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
  2439
    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
  2440
    
677b483367cf Issue #250: and #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 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
  2443
     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
  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
    "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
  2447
    "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
  2448
! !
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2449
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2450
!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
  2451
9d76442a61bb Issue #250: Tests for 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
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
  2453
    "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
  2454
     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
  2455
    | 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
  2456
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2457
    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
  2458
    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
  2459
        (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
  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
    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
  2462
        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
  2463
    ].     
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2464
    
9d76442a61bb Issue #250: Tests for 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
    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
  2466
    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
  2467
    "/ 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
  2468
    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
  2469
    
9d76442a61bb Issue #250: Tests for 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
    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
  2471
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2472
    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
  2473
    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
  2474
    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
  2475
    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
  2476
    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
  2477
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2478
    "
9d76442a61bb Issue #250: Tests for 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 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
  2480
     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
  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
    "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
  2484
    "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
  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
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
  2487
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
  2488
    "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
  2489
     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
  2490
       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
  2491
    | 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
  2492
    
2078
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2493
    "/ 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
  2494
    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
  2495
    "/ 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
  2496
    "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
  2497
     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
  2498
    [ 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
  2499
        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
  2500
    ].
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
  2501
    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
  2502
    
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2503
    readData := 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
  2504
    
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2505
    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
  2506
    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
  2507
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2508
    "
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
  2509
     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
  2510
     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
  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
    "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
  2514
    "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
  2515
!
677b483367cf Issue #250: and #252: complete list of regression tests for Reading, Writing, Creating, Opeing, Deleting windows registry
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2085
diff changeset
  2516
677b483367cf Issue #250: and #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
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
  2518
    "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
  2519
     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
  2520
       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
  2521
    | 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
  2522
    
677b483367cf Issue #250: and #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
    "/ 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
  2524
    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
  2525
    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
  2526
         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
  2527
         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
  2528
    
677b483367cf Issue #250: and #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
    "
677b483367cf Issue #250: and #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
     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
  2531
     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
  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
    "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
  2535
    "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
  2536
!
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2537
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2538
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
  2539
    "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
  2540
     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
  2541
    | 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
  2542
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2543
    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
  2544
    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
  2545
        (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
  2546
    
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
  2547
    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
  2548
        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
  2549
    ].     
9d76442a61bb Issue #250: Tests for 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
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2551
    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
  2552
    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
  2553
    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
  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
    "
9d76442a61bb Issue #250: Tests for 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 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
  2557
     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
  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
    "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
  2561
    "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
  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
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
  2565
    "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
  2566
     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
  2567
    | 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
  2568
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2569
    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
  2570
    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
  2571
        (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
  2572
    
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
  2573
    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
  2574
        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
  2575
    ].     
9d76442a61bb Issue #250: Tests for 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
    
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2577
    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
  2578
    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
  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
    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
  2581
9d76442a61bb Issue #250: Tests for 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
    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
  2584
    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
  2585
    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
  2586
9d76442a61bb Issue #250: Tests for 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
    "
9d76442a61bb Issue #250: Tests for 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 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
  2589
     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
  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
    "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
  2593
    "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
  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
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
  2597
    "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
  2598
     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
  2599
    | 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
  2600
    
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2601
    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
  2602
        (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
  2603
    
9d76442a61bb Issue #250: Tests for 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
    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
  2605
    
9d76442a61bb Issue #250: Tests for 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
    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
  2607
    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
  2608
    
9d76442a61bb Issue #250: Tests for 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
    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
  2610
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2611
    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
  2612
    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
  2613
    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
  2614
    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
  2615
9d76442a61bb Issue #250: Tests for 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
    "
9d76442a61bb Issue #250: Tests for 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 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
  2618
     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
  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
    "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
  2622
    "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
  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
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
  2626
    "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
  2627
     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
  2628
    | 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
  2629
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2630
    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
  2631
    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
  2632
        (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
  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
    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
  2635
        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
  2636
    ].     
9d76442a61bb Issue #250: Tests for 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
    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
  2639
    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
  2640
    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
  2641
    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
  2642
    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
  2643
    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
  2644
        = '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
  2645
    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
  2646
9d76442a61bb Issue #250: Tests for 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
    "  
9d76442a61bb Issue #250: Tests for 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
     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
  2649
     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
  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
    "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
  2653
    "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
  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
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
  2657
    "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
  2658
    | 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
  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
    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
  2661
    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
  2662
     
9d76442a61bb Issue #250: Tests for 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
    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
  2664
        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
  2665
    ].
9d76442a61bb Issue #250: Tests for 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
    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
  2668
    
9d76442a61bb Issue #250: Tests for 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
     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
  2671
     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
  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
    "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
  2675
    "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
  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
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
  2679
    "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
  2680
    | 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
  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
    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
  2683
    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
  2684
     
9d76442a61bb Issue #250: Tests for 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
    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
  2686
        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
  2687
    ].
9d76442a61bb Issue #250: Tests for 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
    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
  2690
9d76442a61bb Issue #250: Tests for 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
     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
  2693
     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
  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
    "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
  2697
    "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
  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
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
  2701
    "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
  2702
     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
  2703
    | 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
  2704
9d76442a61bb Issue #250: Tests for Unicode read: with and without enumeration, remote registry, empty data values, non-string names
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1977
diff changeset
  2705
    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
  2706
    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
  2707
        (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
  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
    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
  2710
        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
  2711
    ].     
9d76442a61bb Issue #250: Tests for 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
    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
  2714
    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
  2715
    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
  2716
    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
  2717
    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
  2718
    
9d76442a61bb Issue #250: Tests for 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
    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
  2720
    
9d76442a61bb Issue #250: Tests for 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
    "/ 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
  2722
    "/ 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
  2723
    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
  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
     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
  2726
     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
  2727
    "
9d76442a61bb Issue #250: Tests for 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
    "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
  2730
    "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
  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
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
  2734
    "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
  2735
     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
  2736
    | 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
  2737
9d76442a61bb Issue #250: Tests for 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
    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
  2739
        (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
  2740
    
9d76442a61bb Issue #250: Tests for 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
    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
  2742
    
9d76442a61bb Issue #250: Tests for 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
    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
  2744
    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
  2745
    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
  2746
    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
  2747
    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
  2748
    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
  2749
9d76442a61bb Issue #250: Tests for 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
    "  
9d76442a61bb Issue #250: Tests for 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 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
  2752
     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
  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
    "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
  2756
    "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
  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
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
  2760
    "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
  2761
     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
  2762
    | 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
  2763
9d76442a61bb Issue #250: Tests for 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
    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
  2765
    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
  2766
        (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
  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
    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
  2769
        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
  2770
    ].     
9d76442a61bb Issue #250: Tests for 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
    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
  2773
    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
  2774
    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
  2775
    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
  2776
    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
  2777
    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
  2778
        = '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
  2779
    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
  2780
9d76442a61bb Issue #250: Tests for 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
    "  
9d76442a61bb Issue #250: Tests for 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
     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
  2783
     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
  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
    "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
  2787
    "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
  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
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
  2791
    "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
  2792
    | 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
  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
    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
  2795
    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
  2796
     
9d76442a61bb Issue #250: Tests for 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
    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
  2798
        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
  2799
    ].
9d76442a61bb Issue #250: Tests for 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
    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
  2802
9d76442a61bb Issue #250: Tests for 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
     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
  2805
     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
  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
    "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
  2809
    "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
  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
2214
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2812
!Win32OperatingSystemTest methodsFor:'tests-unicodeRename'!
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2813
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2814
testRenameSubKey_01
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2815
    "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
  2816
    | readData testingRegistryEntryPath |   
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
    testingRegistryEntryPath := Win32OperatingSystem registryEntry key: registryPath.
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2819
    
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2820
    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
  2821
    readData := testingRegistryEntryPath subKeyNamed: 'RenamedSubKey'.
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2822
    
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2823
    self assert: readData notEmptyOrNil.
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2824
    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
  2825
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 run:#testRenameSubKey_01
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2828
     self new testRenameSubKey_01
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
    "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
  2832
!
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
testRenameSubKey_02
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2835
    "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
  2836
    | readData testingRegistryEntryPath |   
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
    testingRegistryEntryPath := Win32OperatingSystem registryEntry key: registryPath.
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2839
    
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2840
    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
  2841
    readData := testingRegistryEntryPath subKeyNamed: 'すしか_'.
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2842
    
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2843
    self assert: readData notEmptyOrNil.
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2844
    self assert: readData path = (registryPath, '\', 'すしか_').
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2845
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2846
    testingRegistryEntryPath := Win32OperatingSystem registryEntry key: (registryPath, '\', 'すしか_').
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2847
    readData := testingRegistryEntryPath subKeyNamed: 'bobr'.
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2848
    
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2849
    self assert: readData notEmptyOrNil.
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2850
    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
  2851
    
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 run:#testRenameSubKey_02
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2854
     self new testRenameSubKey_02
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
    "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
  2858
!
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
testRenameSubKey_03
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2861
    "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
  2862
    | readData testingRegistryEntryPath |   
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
    testingRegistryEntryPath := Win32OperatingSystem registryEntry key: registryPath.
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2865
    
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2866
    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
  2867
    readData := testingRegistryEntryPath subKeyNamed: 'すしか_'.
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2868
    
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2869
    self assert: readData isEmptyOrNil
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2870
    
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2871
    "
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2872
     self run:#testRenameSubKey_03
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2873
     self new testRenameSubKey_03
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
    "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
  2877
! !
ba58ef8a6214 Issue #269: Tests when renaming registy subKey(s)
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2087
diff changeset
  2878
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2879
!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
  2880
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2881
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
  2882
    "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
  2883
     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
  2884
    | 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
  2885
    
2085
823598772842 Issue #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
    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
  2887
    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
  2888
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2889
    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
  2890
    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
  2891
    
823598772842 Issue #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
    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
  2893
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2894
    readData := testingRegistryPath 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
  2895
    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
  2896
    
823598772842 Issue #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
     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
  2899
     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
  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
    "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
  2903
    "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
  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
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
  2907
    "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
  2908
     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
  2909
    | 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
  2910
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2911
    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
  2912
    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
  2913
  
823598772842 Issue #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
    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
  2915
    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
  2916
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2917
    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
  2918
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2919
    registryType := 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
  2920
    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
  2921
    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
  2922
    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
  2923
    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
  2924
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2925
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2926
    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
  2927
    
823598772842 Issue #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
    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
  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
    "
823598772842 Issue #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
     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
  2932
     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
  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
    "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
  2936
    "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
  2937
    "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
  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
823598772842 Issue #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
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
  2941
    "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
  2942
     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
  2943
    | 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
  2944
823598772842 Issue #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
    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
  2946
    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
  2947
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2948
    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
  2949
    
823598772842 Issue #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
    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
  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
    "
823598772842 Issue #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
     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
  2954
     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
  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
    "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
  2958
    "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
  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
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
  2962
    "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
  2963
     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
  2964
    | 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
  2965
823598772842 Issue #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
    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
  2967
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2968
    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
  2969
    "/ 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
  2970
    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
  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
    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
  2973
    
823598772842 Issue #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
    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
  2975
    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
  2976
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  2977
    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
  2978
    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
  2979
823598772842 Issue #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 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
  2982
     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
  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
    "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
  2986
    "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
  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
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
  2990
    "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
  2991
     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
  2992
    | 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
  2993
823598772842 Issue #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
    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
  2995
    
823598772842 Issue #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
    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
  2997
    "/ 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
  2998
    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
  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
    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
  3001
    
823598772842 Issue #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
    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
  3003
    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
  3004
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3005
    self assert: readData = #[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
  3006
    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
  3007
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3008
    "
823598772842 Issue #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 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
  3010
     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
  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
    "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
  3014
    "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
  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
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
  3018
    "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
  3019
     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
  3020
    | 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
  3021
823598772842 Issue #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
    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
  3023
       
823598772842 Issue #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
    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
  3025
    "/ 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
  3026
    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
  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
    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
  3029
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3030
    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
  3031
    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
  3032
    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
  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
    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
  3035
    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
  3036
    
823598772842 Issue #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
    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
  3038
    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
  3039
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3040
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3041
     self run:#testWriteValueNamedPut_REG_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
  3042
     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
  3043
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3044
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3045
    "Created: / 12-12-2018 / 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
  3046
    "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
  3047
!
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3048
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3049
testWriteValueNamedPut_REG_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
  3050
    "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
  3051
     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
  3052
    | 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
  3053
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3054
    testingRegistryPath := 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
  3055
    
823598772842 Issue #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
    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
  3057
    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
  3058
    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
  3059
    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
  3060
    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
  3061
    
823598772842 Issue #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
    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
  3063
    "/ 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
  3064
    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
  3065
    "/ 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
  3066
    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
  3067
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3068
    "/ 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
  3069
    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
  3070
    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
  3071
    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
  3072
    
823598772842 Issue #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
    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
  3074
    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
  3075
    
823598772842 Issue #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
    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
  3077
    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
  3078
823598772842 Issue #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 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
  3081
     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
  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
    "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
  3085
    "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
  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
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
  3089
    "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
  3090
    | 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
  3091
  
2085
823598772842 Issue #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
    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
  3093
    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
  3094
    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
  3095
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
  3096
    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
  3097
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3098
    "
823598772842 Issue #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
     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
  3100
     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
  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
    "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
  3104
    "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
  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
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
  3108
    "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
  3109
    | 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
  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
    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
  3112
    "/ 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
  3113
    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
  3114
    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
  3115
823598772842 Issue #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
    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
  3117
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3118
    "
823598772842 Issue #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
     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
  3120
     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
  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
    "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
  3124
    "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
  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
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
  3128
    "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
  3129
     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
  3130
    | 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
  3131
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3132
    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
  3133
    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
  3134
    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
  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
    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
  3137
823598772842 Issue #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
    "
823598772842 Issue #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
     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
  3140
     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
  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
    "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
  3144
    "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
  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
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
  3148
    "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
  3149
     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
  3150
    | 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
  3151
       
2085
823598772842 Issue #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
    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
  3153
    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
  3154
    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
  3155
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3156
    self assert: 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
  3157
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3158
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3159
     self 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
  3160
     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
  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
    "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
  3164
    "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
  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
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
  3168
    "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
  3169
    | 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
  3170
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3171
    testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3172
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
  3173
    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
  3174
        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
  3175
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3176
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3177
     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
  3178
     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
  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
    "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
  3182
    "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
  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
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
  3186
    "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
  3187
     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
  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
    | 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
  3190
     
2085
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3191
    testingRegistryPath := Win32OperatingSystem registryEntry key: registryPath.
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3192
    testingRegistryPath valueNamed: '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
  3193
    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
  3194
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3195
    self assert: readData = 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
  3196
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3197
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3198
     self run:#testWriteValueNamedPut_REG_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
  3199
     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
  3200
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3201
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3202
    "Created: / 07-12-2018 / 15: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
  3203
    "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
  3204
!
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3205
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3206
testWriteValueNamedPut_REG_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
  3207
    "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
  3208
    | 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
  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
    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
  3211
    
823598772842 Issue #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
    "/ 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
  3213
    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
  3214
    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
  3215
        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
  3216
        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
  3217
    ] 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
  3218
        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
  3219
        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
  3220
    ].  
823598772842 Issue #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
    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
  3222
    "/ 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
  3223
    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
  3224
    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
  3225
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3226
    "/ 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
  3227
    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
  3228
    
823598772842 Issue #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
    "/ 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
  3230
    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
  3231
    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
  3232
    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
  3233
    
823598772842 Issue #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
    "/ 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
  3235
    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
  3236
    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
  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
    "
823598772842 Issue #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
     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
  3240
     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
  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
    "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
  3244
    "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
  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
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
  3248
    "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
  3249
     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
  3250
    | 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
  3251
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3252
    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
  3253
    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
  3254
    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
  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
    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
  3257
823598772842 Issue #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
    "
823598772842 Issue #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
     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
  3260
     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
  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
    "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
  3264
    "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
  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
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
  3268
    "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
  3269
     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
  3270
    | 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
  3271
823598772842 Issue #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
    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
  3273
    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
  3274
    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
  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
    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
  3277
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3278
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3279
     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
  3280
     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
  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
    "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
  3284
    "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
  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
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
  3288
    "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
  3289
     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
  3290
    | 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
  3291
823598772842 Issue #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
    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
  3293
    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
  3294
    
823598772842 Issue #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
    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
  3296
    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
  3297
    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
  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
    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
  3300
    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
  3301
823598772842 Issue #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
     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
  3304
     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
  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
    "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
  3308
    "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
  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
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
  3312
    "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
  3313
     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
  3314
    | 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
  3315
823598772842 Issue #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
    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
  3317
    "/ 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
  3318
    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
  3319
    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
  3320
    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
  3321
    "/ 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
  3322
    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
  3323
    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
  3324
    
823598772842 Issue #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
    "/ 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
  3326
    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
  3327
    "/ 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
  3328
    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
  3329
    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
  3330
    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
  3331
    "/ 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
  3332
    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
  3333
    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
  3334
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3335
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3336
     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
  3337
     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
  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
    "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
  3341
    "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
  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
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
  3345
    "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
  3346
    | 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
  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
    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
  3349
    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
  3350
    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
  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
    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
  3353
823598772842 Issue #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
    "
823598772842 Issue #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
     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
  3356
     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
  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
    "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
  3360
    "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
  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
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
  3364
    "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
  3365
     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
  3366
     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
  3367
    | 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
  3368
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3369
    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
  3370
    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
  3371
    
2087
43b964e25f8a Issue #250: and #252: Removing the REG_QWORD the x64 architecture limitation
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2086
diff changeset
  3372
    "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
  3373
     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
  3374
     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
  3375
    "/ 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
  3376
    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
  3377
                       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
  3378
    ].
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3379
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3380
    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
  3381
    "/ 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
  3382
    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
  3383
    "/ 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
  3384
    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
  3385
        
823598772842 Issue #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
    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
  3387
    
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3388
    "
823598772842 Issue #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
     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
  3390
     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
  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
    "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
  3394
    "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
  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
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
  3398
    "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
  3399
    | 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
  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
    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
  3402
    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
  3403
    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
  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
    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
  3406
    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
  3407
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3408
    "
823598772842 Issue #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 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
  3410
     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
  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
    "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
  3414
    "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
  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
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
  3418
    "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
  3419
    | 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
  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
    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
  3422
    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
  3423
    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
  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
    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
  3426
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3427
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3428
     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
  3429
     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
  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
    "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
  3433
    "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
  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
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
  3437
    "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
  3438
    | 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
  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
    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
  3441
    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
  3442
    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
  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
    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
  3445
    
823598772842 Issue #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
    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
  3447
    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
  3448
    
823598772842 Issue #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
    "/ (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
  3450
    "/ ((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
  3451
    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
  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
     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
  3454
     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
  3455
    "
823598772842 Issue #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
    "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
  3458
    "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
  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
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
  3462
    "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
  3463
     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
  3464
    | 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
  3465
823598772842 Issue #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
    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
  3467
    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
  3468
    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
  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
    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
  3471
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3472
    "
823598772842 Issue #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
     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
  3474
     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
  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
    "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
  3478
    "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
  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
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
  3482
    "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
  3483
     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
  3484
    | 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
  3485
823598772842 Issue #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
    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
  3487
    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
  3488
    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
  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
    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
  3491
823598772842 Issue #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
    "
823598772842 Issue #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
     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
  3494
     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
  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
    "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
  3498
    "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
  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
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
  3502
    "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
  3503
     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
  3504
    | 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
  3505
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3506
    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
  3507
    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
  3508
    
823598772842 Issue #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
    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
  3510
    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
  3511
    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
  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
    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
  3514
    
823598772842 Issue #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: 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
  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
    "
823598772842 Issue #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
     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
  3519
     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
  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
    "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
  3523
    "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
  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
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
  3527
    "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
  3528
     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
  3529
    | 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
  3530
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3531
    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
  3532
    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
  3533
    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
  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
    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
  3536
823598772842 Issue #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
    "
823598772842 Issue #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
     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
  3539
     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
  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
    "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
  3543
    "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
  3544
    "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
  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
823598772842 Issue #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
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
  3548
    "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
  3549
    | 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
  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
    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
  3552
    "/ 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
  3553
    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
  3554
    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
  3555
823598772842 Issue #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
    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
  3557
    "/ 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
  3558
    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
  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
    "
823598772842 Issue #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
     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
  3562
     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
  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
    "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
  3566
    "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
  3567
    "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
  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
823598772842 Issue #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
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
  3571
    "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
  3572
    | 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
  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
    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
  3575
    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
  3576
    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
  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
    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
  3579
823598772842 Issue #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
    "
823598772842 Issue #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
     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
  3582
     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
  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
    "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
  3586
    "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
  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
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
  3590
    "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
  3591
     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
  3592
    | 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
  3593
823598772842 Issue #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
    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
  3595
    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
  3596
    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
  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
    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
  3599
    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
  3600
    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
  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
    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
  3603
823598772842 Issue #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
    "
823598772842 Issue #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
     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
  3606
     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
  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
    "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
  3610
    "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
  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
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
  3614
    "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
  3615
     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
  3616
     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
  3617
    | 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
  3618
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3619
    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
  3620
    "/ 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
  3621
    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
  3622
    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
  3623
    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
  3624
    "/ 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
  3625
    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
  3626
    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
  3627
    
823598772842 Issue #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
    "/ 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
  3629
    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
  3630
        
823598772842 Issue #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
    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
  3632
    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
  3633
    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
  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
    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
  3636
    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
  3637
823598772842 Issue #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
     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
  3640
     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
  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
    "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
  3644
    "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
  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
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
  3648
    "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
  3649
     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
  3650
    | 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
  3651
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3652
    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
  3653
    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
  3654
    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
  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
    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
  3657
823598772842 Issue #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
    "
823598772842 Issue #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
     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
  3660
     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
  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
    "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
  3664
    "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
  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
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
  3668
    "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
  3669
     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
  3670
    | 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
  3671
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3672
    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
  3673
    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
  3674
    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
  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
    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
  3677
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
  3678
    "
2085
823598772842 Issue #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
     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
  3680
     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
  3681
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3682
823598772842 Issue #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
    "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
  3684
    "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
  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
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
  3688
    "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
  3689
     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
  3690
    | 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
  3691
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3692
    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
  3693
    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
  3694
    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
  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
    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
  3697
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
  3698
    "
2085
823598772842 Issue #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
     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
  3700
     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
  3701
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3702
823598772842 Issue #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
    "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
  3704
    "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
  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
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
  3708
    "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
  3709
     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
  3710
    | 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
  3711
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3712
    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
  3713
    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
  3714
    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
  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
    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
  3717
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
  3718
    "
2085
823598772842 Issue #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
     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
  3720
     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
  3721
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3722
823598772842 Issue #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
    "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
  3724
    "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
  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
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
  3728
    "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
  3729
     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
  3730
    | 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
  3731
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3732
    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
  3733
    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
  3734
    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
  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
    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
  3737
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
  3738
    "
2085
823598772842 Issue #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
     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
  3740
     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
  3741
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3742
823598772842 Issue #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
    "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
  3744
    "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
  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
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
  3748
    "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
  3749
     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
  3750
    | 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
  3751
823598772842 Issue #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
    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
  3753
    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
  3754
    
823598772842 Issue #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
    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
  3756
    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
  3757
    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
  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
    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
  3760
    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
  3761
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
  3762
    "
2085
823598772842 Issue #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
     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
  3764
     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
  3765
    "
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3766
823598772842 Issue #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
    "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
  3768
    "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
  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
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
  3772
    "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
  3773
     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
  3774
    | 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
  3775
823598772842 Issue #252: Smalltak/X is writing Windows Registry only in ASCII but registry is UTF16
Patrik Svestka <patrik.svestka@gmail.com>
parents: 2081
diff changeset
  3776
    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
  3777
    "/ 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
  3778
    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
  3779
    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
  3780
    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
  3781
   
823598772842 Issue #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
    "/ 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
  3783
    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
  3784
    
823598772842 Issue #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
    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
  3786
    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
  3787
    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
  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
    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
  3790
    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
  3791
823598772842 Issue #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
     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
  3794
     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
  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
    "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
  3798
    "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
  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
344
21c39da58029 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3801
!Win32OperatingSystemTest class methodsFor:'documentation'!
21c39da58029 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3802
21c39da58029 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3803
version
21c39da58029 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3804
    ^ '$Header$'
1566
2ca58098256d Issue #109: Added tests for registry key creation / deletion
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1500
diff changeset
  3805
!
2ca58098256d Issue #109: Added tests for registry key creation / deletion
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1500
diff changeset
  3806
2ca58098256d Issue #109: Added tests for registry key creation / deletion
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1500
diff changeset
  3807
version_HG
2ca58098256d Issue #109: Added tests for registry key creation / deletion
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1500
diff changeset
  3808
2ca58098256d Issue #109: Added tests for registry key creation / deletion
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1500
diff changeset
  3809
    ^ '$Changeset: <not expanded> $'
344
21c39da58029 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3810
! !
1161
3d9b4eaddcf3 category changes
Claus Gittinger <cg@exept.de>
parents: 675
diff changeset
  3811