]> git.saurik.com Git - apt.git/blobdiff - test/integration/test-apt-download-progress
Make directory paths configurable
[apt.git] / test / integration / test-apt-download-progress
index b48e7ebb3748dabfbe445a22369df9bb64be5fc8..7ac044a57a497a8a6d684a79288364404985c71e 100755 (executable)
@@ -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