From 4153b5784c56afccab3875f4b37a30ecaaf04635 Mon Sep 17 00:00:00 2001 From: Jim Derry Date: Wed, 30 Jun 2021 09:41:19 -0400 Subject: [PATCH] Commonize versioning. Eliminate the redundant test case version file from the recently re-merged regression testing suite. Regression tests are now automatically versioned the same as the current tidy source version. --- regression_testing/cases/_version.txt | 1 - regression_testing/test.rb | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) delete mode 100644 regression_testing/cases/_version.txt diff --git a/regression_testing/cases/_version.txt b/regression_testing/cases/_version.txt deleted file mode 100644 index ee5f1ab..0000000 --- a/regression_testing/cases/_version.txt +++ /dev/null @@ -1 +0,0 @@ -5.7.49 diff --git a/regression_testing/test.rb b/regression_testing/test.rb index 83c6123..c295a37 100755 --- a/regression_testing/test.rb +++ b/regression_testing/test.rb @@ -32,6 +32,7 @@ module TidyRegressionTestModule ########################################################### DIR_TEST_SETS = File.expand_path('cases') EXE_TIDY = File.expand_path(File.join('..', 'build', 'cmake', 'tidy')) + VERSION_FILE = File.join(File.expand_path('..', File.dirname(__FILE__)), 'version.txt') ########################################################### @@ -851,7 +852,7 @@ module TidyRegressionTestModule def print_report_footer( total_tested, total_passed ) tidy_version = %x( #{self.tidy_path} --version ) tidy_version = tidy_version[/^.*(\d+\.\d+\.\d+).*/,1] - cases_version = File.open(File.join(DIR_TEST_SETS, '_version.txt')).first.chomp + cases_version = File.open(VERSION_FILE).first.chomp puts puts "Note that no valid cases were found." if total_tested < 1