"Fossies" - the Fresh Open Source Software Archive

Member "Tomb-2.7/extras/test/20_recipients.sh" (11 Oct 2019, 1387 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. See also the latest Fossies "Diffs" side-by-side code changes report for "20_recipients.sh": 2.6_vs_2.7.

    1 #!/usr/bin/env zsh
    2 
    3 export test_description="Testing tomb with GnuPG keys"
    4 
    5 source ./setup
    6 
    7 test_export "recipient"
    8 test_expect_success 'Testing tomb with GnuPG keys: creation' '
    9     tt_dig -s 20 &&
   10     tt_forge -g -r $KEY1 &&
   11     tt_lock -g -r $KEY1
   12     '
   13 
   14 test_expect_success 'Testing tomb with GnuPG keys: open & close' '
   15     tt_open -g &&
   16     tt_close
   17     '
   18 
   19 test_export "default"
   20 test_expect_success 'Testing tomb with GnuPG keys using the default recipient' '
   21     tt_dig -s 20 &&
   22     tt_forge -g &&
   23     tt_lock -g &&
   24     gpg -d --status-fd 2 $tomb_key 1> /dev/null 2> $TMP/default.tmp &&
   25     [[ ! -z "$(grep "Tomb Test 2" $TMP/default.tmp)" ]]
   26     '
   27 
   28 test_export "hidden"
   29 test_expect_success 'Testing tomb with GnuPG keys using hidden recipient' '
   30     tt_dig -s 20 &&
   31     tt_forge -g -R $KEY1 &&
   32     tt_lock -g -R $KEY1
   33     '
   34 
   35 test_export "subkeys"
   36 test_expect_success 'Testing tomb with GnuPG subkeys' '
   37     tt_dig -s 20 &&
   38     tt_forge -g -R $SUBKEY2 &&
   39     tt_lock -g -R $SUBKEY2
   40     '
   41 
   42 test_export "shared"
   43 test_expect_success 'Testing tomb with GnuPG keys and shared tomb' '
   44     tt_dig -s 20 &&
   45     tt_forge -g -r $KEY1,$KEY2 &&
   46     tt_lock -g -r $KEY1 &&
   47     tt_open -g &&
   48     tt_close
   49     '
   50 
   51 test_export "untrusted"
   52 test_expect_success 'Testing tomb creation with untrusted GnuPG keys' '
   53     tt_dig -s 20 &&
   54     test_must_fail tt_forge -g -r $KEY_UNTRUSTED
   55     '
   56 
   57 test_done