From 55c6402be4297d644de774b1fef70b88f91a73e9 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Fri, 27 May 2016 18:10:39 +0200 Subject: prevent C++ locale number formatting in text APIs Setting the C++ locale via std::locale::global(std::locale("")); which would otherwise default to the default C locale (aka: unaffected by setlocale) effects the formatting of numeric types in IO streams, which for output for humans is perfectly sensible, but breaks our many text interfaces used and parsed by us and others without expecting the numbers to be formatted. Closes: #825396 (cherry picked from commit b58e2c7c56b1416a343e81f9f80cb1f02c128e25) --- test/integration/test-apt-download-progress | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'test/integration/test-apt-download-progress') diff --git a/test/integration/test-apt-download-progress b/test/integration/test-apt-download-progress index b48e7ebb3..7ac044a57 100755 --- a/test/integration/test-apt-download-progress +++ b/test/integration/test-apt-download-progress @@ -11,13 +11,9 @@ setupenvironment changetohttpswebserver assertprogress() { - T="$1" - testsuccess grep "dlstatus:1:0:Retrieving file 1 of 1" "$T" - if ! grep -E -q "dlstatus:1:(0\..*|([1-9](\..*)?)|[1-9][0-9](\..*)?):Retrieving file 1 of 1" "$T"; then - cat "$T" - msgfail "Failed to detect download progress" - fi - testsuccess grep "dlstatus:1:100:Retrieving file 1 of 1" "$T" + testsuccess grep "dlstatus:1:0.0000:Retrieving file 1 of 1" "$1" + testsuccess grep -E "dlstatus:1:[1-9][0-9]{0,1}\.[0-9]{1,4}:Retrieving file 1 of 1" "$1" + testsuccess grep "dlstatus:1:100.0000:Retrieving file 1 of 1" "$1" } # we need to ensure the file is reasonable big so that apt has a chance to -- cgit v1.2.3