From acc7c9b1b1520f8ce3283de7f3d25b0582ee9098 Mon Sep 17 00:00:00 2001 From: Subramanya Sastry Date: Thu, 7 Oct 2021 15:22:17 -0500 Subject: [PATCH] Tweak Tidy handling in editTests.php * Tidy is always enabled, so enable/disable tidy checks not needed * +tidy parsertest options are gone. So, tweak how output sections are switched around. Bug: T198214 Change-Id: I735a9dc2979bcc165423bfdc3ffca12c5602e2c1 --- tests/parser/editTests.php | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/tests/parser/editTests.php b/tests/parser/editTests.php index 1d94d348071..57c96aeaec7 100644 --- a/tests/parser/editTests.php +++ b/tests/parser/editTests.php @@ -212,14 +212,6 @@ class ParserEditTests extends Maintenance { '[U]pdate source file, copy actual to expected', '[I]gnore' ]; - if ( strpos( $testInfo['options'], ' tidy' ) === false ) { - if ( empty( $testInfo['isSubtest'] ) ) { - $specs[] = "Enable [T]idy"; - } - } else { - $specs[] = 'Disable [T]idy'; - } - if ( !empty( $testInfo['isSubtest'] ) ) { $specs[] = 'Delete [s]ubtest'; } @@ -448,9 +440,9 @@ class ParserEditTests extends Maintenance { protected function switchTidy( $testInfo ) { $resultSection = $testInfo['resultSection']; - if ( in_array( $resultSection, [ 'html/php', 'html/*', 'html', 'result' ] ) ) { - $newSection = 'html+tidy'; - } elseif ( in_array( $resultSection, [ 'html/php+tidy', 'html+tidy' ] ) ) { + if ( in_array( $resultSection, [ 'html/php' ] ) ) { + $newSection = 'html/php'; + } elseif ( in_array( $resultSection, [ 'html/*', 'html', 'result' ] ) ) { $newSection = 'html'; } else { print "Unrecognised result section name \"$resultSection\""; -- 2.11.4.GIT