mirror of
https://codeberg.org/scip/pcp.git
synced 2025-12-18 04:10:57 +01:00
last perl tests migrated to unittests.sh
This commit is contained in:
@@ -24,72 +24,73 @@ pcp=../src/pcp1
|
||||
passwd=xxx
|
||||
verbose=1
|
||||
|
||||
. keys.cfg
|
||||
. ./keys.cfg
|
||||
|
||||
check-json-support () {
|
||||
check_json_support () {
|
||||
cmd="$pcp -V vja -t -j"
|
||||
expect="\"keyvaultfile\""
|
||||
check "$cmd" "$expect"
|
||||
}
|
||||
|
||||
check-json-export-public () {
|
||||
check_json_export_public () {
|
||||
cmd="$pcp -V vja -p -j -x a -O testkeyvjapub.json"
|
||||
expectfile="testkeyvjapub.json"
|
||||
expect="/\"Alicia\"/"
|
||||
check "$cmd" "$expect" "$input" "$expectfile"
|
||||
}
|
||||
|
||||
check-json-export-secret () {
|
||||
check_json_export_secret () {
|
||||
cmd="$pcp -V vja -s -j -x a -O testkeyvjasec.json"
|
||||
expectfile="testkeyvjasec.json"
|
||||
check "$cmd" "$expect" "$input" "$expectfile"
|
||||
}
|
||||
check-json-export-secret-isjson () {
|
||||
|
||||
check_json_export_secret_isjson () {
|
||||
cmd="cat testkeyvjasec.json"
|
||||
expect="/\"Alicia\"/"
|
||||
check "$cmd" "$expect" "$input" "$expectfile"
|
||||
check "$cmd" "$expect" "$input" ""
|
||||
}
|
||||
|
||||
check-json-import-public () {
|
||||
check_json_import_public () {
|
||||
cmd="$pcp -V vjb -K -I testkeyvjapub.json -j"
|
||||
expect="/added/"
|
||||
check "$cmd" "$expect" "$input" "$expectfile"
|
||||
check "$cmd" "$expect" "$input" ""
|
||||
}
|
||||
|
||||
check-json-import-public-open () {
|
||||
check_json_import_public_open () {
|
||||
cmd="$pcp -V vjb -l"
|
||||
expect="/Alicia/"
|
||||
check "$cmd" "$expect" "$input" "$expectfile"
|
||||
check "$cmd" "$expect" "$input" ""
|
||||
}
|
||||
|
||||
check-json-import-secret () {
|
||||
check_json_import_secret () {
|
||||
cmd="$pcp -V vjc -K -I testkeyvjasec.json -x a -j"
|
||||
expect="/added/"
|
||||
check "$cmd" "$expect" "$input" "$expectfile"
|
||||
check "$cmd" "$expect" "$input" ""
|
||||
}
|
||||
|
||||
check-json-import-secret-open () {
|
||||
check_json_import_secret_open () {
|
||||
cmd="$pcp -V vjc -l"
|
||||
expect="/Alicia/"
|
||||
check "$cmd" "$expect" "$input" "$expectfile"
|
||||
check "$cmd" "$expect" "$input" ""
|
||||
}
|
||||
|
||||
check-json-text-vault () {
|
||||
check_json_text_vault () {
|
||||
cmd="$pcp -V vjb -t -j"
|
||||
expect="/\"Alicia\"/"
|
||||
check "$cmd" "$expect" "$input" "$expectfile"
|
||||
check "$cmd" "$expect" "$input" ""
|
||||
}
|
||||
|
||||
check-json-text-public () {
|
||||
check_json_text_public () {
|
||||
cmd="$pcp -V vjb -t -j -i ${idalicia}"
|
||||
expect="/\"Alicia\"/"
|
||||
check "$cmd" "$expect" "$input" "$expectfile"
|
||||
check "$cmd" "$expect" "$input" ""
|
||||
}
|
||||
|
||||
check-json-text-secret () {
|
||||
check_json_text_secret () {
|
||||
cmd="$pcp -V vjb -t -j -i ${idbobby}"
|
||||
expect="/\"Bobby\"/"
|
||||
check "$cmd" "$expect" "$input" "$expectfile"
|
||||
check "$cmd" "$expect" "$input" ""
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user