From: Gerd von Egidy Date: Thu, 17 Dec 2015 10:53:00 +0000 (+0100) Subject: make unittest compatible with old versions of du that don't offer the --output option X-Git-Tag: v2.9~28 X-Git-Url: http://developer.intra2net.com/git/?a=commitdiff_plain;h=8194e9a6653bd39c80347a7b47d9d50e068d9d5e;p=libi2ncommon make unittest compatible with old versions of du that don't offer the --output option --- diff --git a/test/test_filefunc.cpp b/test/test_filefunc.cpp index e1d68fd..65fa92d 100644 --- a/test/test_filefunc.cpp +++ b/test/test_filefunc.cpp @@ -600,7 +600,7 @@ BOOST_AUTO_TEST_CASE(FreeDiskSpace1) int retries = 5; while (retries > 0) { - string dfstr=capture_exec("df -B 1 --output=avail /tmp | tail -n 1"); + string dfstr=capture_exec("df -B 1 /tmp | tail -n 1 | sed -e \"s/[^ ]* *[^ ]* [^ ]* *\\([^ ]*\\).*/\\1/\""); dfout=-1; string_to(dfstr,dfout);