File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed
test/Liip/RMT/Tests/Functional Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -130,13 +130,13 @@ protected function validateRootElements($config)
130130 }
131131 }
132132
133- if ($ config ['version-generator ' ] == 'simple '
133+ if ($ config ['version-generator ' ] == 'simple '
134134 && isset ($ config ['vcs ' ]) && $ config ['vcs ' ] == 'hg '
135135 && (! isset ($ config ['version-persister ' ]['tag-prefix ' ]) || strlen (trim ($ config ['version-persister ' ]['tag-prefix ' ])) == 0 ))
136136 {
137137 exec ('hg version ' , $ result );
138138 preg_match ('/version (\d+)\.\d+\.\d+/ ' , reset ($ result ), $ matches );
139- if (intval ($ matches [1 ]) >= 3 ) {
139+ if (intval ($ matches [1 ]) >= 3 ) {
140140 throw new Exception ("Simple generator is not compatible with mercurial > 3. " );
141141 }
142142
Original file line number Diff line number Diff line change @@ -27,7 +27,11 @@ public function testNoSimpleGenerator()
2727 $ this ->initHg ();
2828 $ this ->createConfig ('simple ' , 'vcs-tag ' , array ('vcs ' => 'hg ' ));
2929 exec ('./RMT release -n --confirm-first ' , $ result , $ code );
30- $ this ->assertEquals ($ code , 1 );
30+
31+ exec ('hg version ' , $ result );
32+ preg_match ('/version (\d+)\.\d+\.\d+/ ' , reset ($ result ), $ matches );
33+ $ expected = $ matches [1 ]) >= 3 ? 1 : 0 ;
34+ $ this ->assertEquals ($ code , $ expected );
3135 }
3236
3337 public function testInitialVersion ()
You can’t perform that action at this time.
0 commit comments