From 463ad40aa0ee4e73d4ff75c2602e4558a2328892 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Mon, 3 Aug 2020 04:30:44 +0000 Subject: [PATCH] tests: Tolerate 3-digit exponents in output for chart tick format. This makes the test pass on mingw. --- tests/math/chart-geometry.at | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/math/chart-geometry.at b/tests/math/chart-geometry.at index c14d89e92d..91f74872a6 100644 --- a/tests/math/chart-geometry.at +++ b/tests/math/chart-geometry.at @@ -21,7 +21,9 @@ AT_CHECK([chart-get-scale-test], [0], [ignore]) AT_CLEANUP AT_SETUP([Chart Ticks Format]) -AT_CHECK([chart-get-ticks-format-test], [0], [dnl +# The 'sed' below converts, e.g. 1.5e-005 into 1.5e-05, to make the output +# format uniform for comparison. (mingw always outputs 3-digit exponents.) +AT_CHECK([chart-get-ticks-format-test | sed 's/e\([[-+]]\)0\([[0-9]][[0-9]]\)/e\1\2/g'], [0], [dnl lower: 1000, interval: 10, nticks: 10, fs: %.0lf, scale: 1, ex: 1030, ex 2: 1040 lower: 10000, interval: 10, nticks: 10, fs: %.0lf, scale: 1, ex: 10030, ex 2: 10040 lower: 100000, interval: 10, nticks: 10, fs: %.0lf, scale: 1, ex: 100030, ex 2: 100040 -- 2.30.2