"Fossies" - the Fresh Open Source Software Archive

Member "bup-0.30/t/test-index-clear.sh" (28 Sep 2019, 591 Bytes) of package /linux/privat/bup-0.30.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Bash source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 #!/usr/bin/env bash
    2 . ./wvtest-bup.sh || exit $?
    3 
    4 set -o pipefail
    5 
    6 top="$(WVPASS pwd)" || exit $?
    7 tmpdir="$(WVPASS wvmktempdir)" || exit $?
    8 
    9 export BUP_DIR="$tmpdir/bup"
   10 export GIT_DIR="$tmpdir/bup"
   11 
   12 bup() { "$top/bup" "$@"; }
   13 
   14 
   15 WVPASS bup init
   16 WVPASS cd "$tmpdir"
   17 
   18 
   19 WVSTART "index --clear"
   20 WVPASS mkdir src
   21 WVPASS touch src/foo src/bar
   22 WVPASS bup index -u src
   23 WVPASSEQ "$(bup index -p)" "src/foo
   24 src/bar
   25 src/
   26 ./"
   27 WVPASS rm src/foo
   28 WVPASS bup index --clear
   29 WVPASS bup index -u src
   30 expected="$(WVPASS bup index -p)" || exit $?
   31 WVPASSEQ "$expected" "src/bar
   32 src/
   33 ./"
   34 
   35 
   36 WVPASS rm -rf "$tmpdir"