"Fossies" - the Fresh Open Source Software Archive

Member "Tomb-2.7/extras/test/50_integrity.sh" (11 Oct 2019, 560 Bytes) of package /linux/privat/Tomb-2.7.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 zsh
    2 
    3 export test_description="Testing file integrity"
    4 
    5 source ./setup
    6 
    7 test_export "test" # Using already generated tomb
    8 test_expect_success 'Testing contents integrity' '
    9     tt_open --tomb-pwd $DUMMYPASS &&
   10     tt_set_ownership "$MEDIA/$testname" &&
   11     tt dig -s 10 "$MEDIA/$testname/datacheck.raw" &&
   12     CRC1=$(sha256sum "$MEDIA/$testname/datacheck.raw") &&
   13     tt_close --unsafe &&
   14     tt_open --tomb-pwd $DUMMYPASS &&
   15     CRC2=$(sha256sum "$MEDIA/$testname/datacheck.raw") &&
   16     [[ "$CRC1" == "$CRC2" ]] &&
   17     tt_close
   18     '
   19 
   20 test_done