Skip to content

Commit acdeeb5

Browse files
committed
Turns out that the output changes were actually correct, the later test scenario was just affected by incorrect Composer version detection when the test were being run in non-interactive mode
1 parent f5ddc94 commit acdeeb5

File tree

41 files changed

+144
-15
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+144
-15
lines changed

bin/test

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ source ${script_root}/lib/output.sh
1212
run_tests() {
1313
local scenario_root=${1}
1414
local copy_target=${2}
15-
local composer_version=$(composer --version|sed 's/Composer version \(.*\)/\1/g'|cut -d ' ' -f1)
15+
local composer_version=$(composer --version|sed 's/Composer version \(.*\)/\1/g'|cut -d ' ' -f2)
1616

1717
local scenario_label=$(cat ${scenario_root}/.label)
1818

@@ -69,7 +69,7 @@ EOF
6969
if [ "${line:0:1}" == "@" ] ; then
7070
local command=$(_trim_string ${line:1}|cut -d' ' -f1)
7171
local args=$(_trim_string ${line:1}|cut -d' ' -f2-)
72-
72+
7373
local php_script=
7474

7575
if [ "${command}" == "queue_update" ] ; then
@@ -90,7 +90,7 @@ EOF
9090
return isset(\$item['name']) ? \$item['name'] : '';
9191
}, \$packagesConfig);
9292
\$index = array_search('${target}', \$names, true);
93-
93+
9494
if (\$index !== false) {
9595
\$packagesConfig[\$index]['version'] = '0.0.0';
9696
\$packagesConfig[\$index]['version_normalized'] = '0.0.0';
@@ -277,7 +277,7 @@ assert_scenario_output() {
277277
local patches_owner=${1}
278278
local scenario_root=${2}
279279
local output_file=${3}
280-
local composer_version=$(composer --version 2>/dev/null|sed 's/Composer version \(.*\)/\1/g'|cut -d ' ' -f1)
280+
local composer_version=$(composer --version 2>/dev/null|sed 's/Composer version \(.*\)/\1/g'|cut -d ' ' -f2)
281281
local composer_major=${composer_version%%.*}
282282

283283
local expected_output_file="${scenario_root}/.output"

test/scenarios/addition-direct/.output

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
Scanning packages for orphan patches
22
Validation completed successfully
33
Processing patches configuration
4+
- Installing vaimo/composer-patches-target1 (1.0.0): Mirroring from modules/composer-patches-target1
45
- Applying patches for vaimo/composer-patches-target1 (1)
56
~ {{PATCHES-OWNER}}: patches/0_initial-change.patch [NEW]
67
Change: value8 => valueC
78

89
Writing patch info to install file
910
Processing patches configuration
11+
- Installing vaimo/composer-patches-target1 (1.0.0): Mirroring from modules/composer-patches-target1
1012
- Applying patches for vaimo/composer-patches-target1 (2)
1113
~ {{PATCHES-OWNER}}: patches/1_second-change.patch [NEW]
1214
Change: valueC => valueX

test/scenarios/apply-failure-corrupt-content/.output

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
Processing patches configuration
2+
- Installing vaimo/composer-patches-target1 (1.0.0): Mirroring from modules/composer-patches-target1
23
- Applying patches for vaimo/composer-patches-target1 (1)
34
~ {{PATCHES-OWNER}}: patches/single-package-single-file-no-version.patch [NEW]
45
Change: value8 => valueC

test/scenarios/apply-failure-simple/.output

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
Processing patches configuration
2+
- Installing vaimo/composer-patches-target1 (1.0.0): Mirroring from modules/composer-patches-target1
23
- Applying patches for vaimo/composer-patches-target1 (1)
34
~ {{PATCHES-OWNER}}: patches/single-package-single-file-no-version.patch [NEW]
45
Change: value8 => valueC

test/scenarios/apply-real-package-success/.output

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
Scanning packages for orphan patches
22
Validation completed successfully
33
Processing patches configuration
4+
- Installing vaimo/topological-sort (1.0.0): Extracting archive
45
- Applying patches for vaimo/topological-sort (1)
56
~ {{PATCHES-OWNER}}: patches/first-change.patch [NEW]
67
Change: Dependency => The cool thing

test/scenarios/apply-single-success/.output

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
Scanning packages for orphan patches
22
Validation completed successfully
33
Processing patches configuration
4+
- Installing vaimo/composer-patches-target1 (1.0.0): Mirroring from modules/composer-patches-target1
45
- Applying patches for vaimo/composer-patches-target1 (1)
56
~ {{PATCHES-OWNER}}: patches/first-change.patch [NEW]
67
Change: value8 => valueX

test/scenarios/content-change/.output

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
Scanning packages for orphan patches
22
Validation completed successfully
33
Processing patches configuration
4+
- Installing vaimo/composer-patches-target1 (1.0.0): Mirroring from modules/composer-patches-target1
45
- Applying patches for vaimo/composer-patches-target1 (2)
56
~ {{PATCHES-OWNER}}: patches/0_initial-change.patch [NEW]
67
Change: value8 => valueC
@@ -9,6 +10,7 @@ Processing patches configuration
910

1011
Writing patch info to install file
1112
Processing patches configuration
13+
- Installing vaimo/composer-patches-target1 (1.0.0): Mirroring from modules/composer-patches-target1
1214
- Applying patches for vaimo/composer-patches-target1 (2)
1315
~ {{PATCHES-OWNER}}: patches/1_second-change.patch [CHANGED]
1416
Change: valueC => valueX

test/scenarios/default-command-apply/.output

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
Scanning packages for orphan patches
22
Validation completed successfully
33
Processing patches configuration
4+
- Installing vaimo/composer-patches-target2 (1.2.0): Mirroring from modules/composer-patches-target2
5+
- Installing vaimo/composer-patches-target3 (1.2.3): Mirroring from modules/composer-patches-target3
46
- Applying patches for vaimo/composer-patches-sandbox (1)
57
~ {{PATCHES-OWNER}}: patches/multiple-packages-single-file.patch [NEW]
68
Change: value17 => valueB; value5 => valueA
79

10+
- Installing vaimo/composer-patches-target1 (1.0.0): Mirroring from modules/composer-patches-target1
811
- Applying patches for vaimo/composer-patches-target1 (2)
912
~ {{PATCHES-OWNER}}: patches/single-package-single-file-no-version.patch [NEW]
1013
Change: value8 => valueC

test/scenarios/default-command-redo/.output

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
Scanning packages for orphan patches
22
Validation completed successfully
33
Processing patches configuration
4+
- Installing vaimo/composer-patches-target2 (1.2.0): Mirroring from modules/composer-patches-target2
5+
- Installing vaimo/composer-patches-target3 (1.2.3): Mirroring from modules/composer-patches-target3
46
- Applying patches for vaimo/composer-patches-sandbox (1)
57
~ {{PATCHES-OWNER}}: patches/multiple-packages-single-file.patch [MATCH]
68
Change: value17 => valueB; value5 => valueA
79

10+
- Installing vaimo/composer-patches-target1 (1.0.0): Mirroring from modules/composer-patches-target1
811
- Applying patches for vaimo/composer-patches-target1 (2)
912
~ {{PATCHES-OWNER}}: patches/single-package-single-file-no-version.patch [MATCH]
1013
Change: value8 => valueC

test/scenarios/default-event-install-partial-reapply/.output-v2

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
Scanning packages for orphan patches
22
Validation completed successfully
33
Processing patches configuration
4+
- Installing vaimo/composer-patches-target2 (1.2.0): Mirroring from modules/composer-patches-target2
5+
- Installing vaimo/composer-patches-target3 (1.2.3): Mirroring from modules/composer-patches-target3
46
- Applying patches for vaimo/composer-patches-sandbox (1)
57
~ {{PATCHES-OWNER}}: patches/multiple-packages-single-file.patch [NEW]
68
Change: value17 => valueB; value5 => valueA
79

10+
- Installing vaimo/composer-patches-target1 (1.0.0): Mirroring from modules/composer-patches-target1
811
- Applying patches for vaimo/composer-patches-target1 (2)
912
~ {{PATCHES-OWNER}}: patches/single-package-single-file-no-version.patch [NEW]
1013
Change: value8 => valueC
@@ -15,6 +18,8 @@ Writing patch info to install file
1518
Package operations: 0 installs, 1 update, 0 removals
1619
- Upgrading vaimo/composer-patches-target2 (0.0.0 => 1.2.0): Mirroring from modules/composer-patches-target2
1720
Processing patches configuration
21+
- Installing vaimo/composer-patches-target2 (1.2.0): Mirroring from modules/composer-patches-target2
22+
- Installing vaimo/composer-patches-target3 (1.2.3): Mirroring from modules/composer-patches-target3
1823
- Applying patches for vaimo/composer-patches-sandbox (1)
1924
~ {{PATCHES-OWNER}}: patches/multiple-packages-single-file.patch [NEW]
2025
Change: value17 => valueB; value5 => valueA
@@ -23,6 +28,7 @@ Writing patch info to install file
2328
Package operations: 0 installs, 1 update, 0 removals
2429
- Upgrading vaimo/composer-patches-target1 (0.0.0 => 1.0.0): Mirroring from modules/composer-patches-target1
2530
Processing patches configuration
31+
- Installing vaimo/composer-patches-target1 (1.0.0): Mirroring from modules/composer-patches-target1
2632
- Applying patches for vaimo/composer-patches-target1 (2)
2733
~ {{PATCHES-OWNER}}: patches/single-package-single-file-no-version.patch [NEW]
2834
Change: value8 => valueC
@@ -33,6 +39,8 @@ Writing patch info to install file
3339
Package operations: 1 install, 0 updates, 0 removals
3440
- Installing vaimo/composer-patches-target2 (1.2.0): Mirroring from modules/composer-patches-target2
3541
Processing patches configuration
42+
- Installing vaimo/composer-patches-target2 (1.2.0): Mirroring from modules/composer-patches-target2
43+
- Installing vaimo/composer-patches-target3 (1.2.3): Mirroring from modules/composer-patches-target3
3644
- Applying patches for vaimo/composer-patches-sandbox (1)
3745
~ {{PATCHES-OWNER}}: patches/multiple-packages-single-file.patch [NEW]
3846
Change: value17 => valueB; value5 => valueA
@@ -41,10 +49,11 @@ Writing patch info to install file
4149
Package operations: 1 install, 0 updates, 0 removals
4250
- Installing vaimo/composer-patches-target1 (1.0.0): Mirroring from modules/composer-patches-target1
4351
Processing patches configuration
52+
- Installing vaimo/composer-patches-target1 (1.0.0): Mirroring from modules/composer-patches-target1
4453
- Applying patches for vaimo/composer-patches-target1 (2)
4554
~ {{PATCHES-OWNER}}: patches/single-package-single-file-no-version.patch [NEW]
4655
Change: value8 => valueC
4756
~ {{PATCHES-OWNER}}: patches/single-package-single-file-wildcard-version.patch [NEW]
4857
Change: value17 => valueX
4958

50-
Writing patch info to install file
59+
Writing patch info to install file

0 commit comments

Comments
 (0)