#!/bin/bash . ../init.sh || exit 1 set -e mktmpdir test() { local num=$1 exp=$2 ret=0 shift 2 eval "$@" > list || ret=$? if ! diff -u ${as}/list${num}.good list ; then tfail "output does not match" fi if [[ ${exp} -ne ${ret} ]] ; then tfail "exit code (${ret}) does not match expected (${exp})" fi tend $? "$*" } # We output dates, so make sure it matches our logs. export LC_TIME="C" # simple sync check test 01 0 "qlop -s -f ${as}/sync.log" # check all merged pkgs test 02 0 "qlop -mv -f ${as}/sync.log" # check all unmerged pkgs test 03 0 "qlop -uv -f ${as}/sync.log" # verify atom parsing works (and not partial strings) test 04 0 "qlop -mv gcc -f ${as}/sync.log" # verify atom version parsing works test 05 0 "qlop -mv '