diff tests/test-022-change-master-password.sh @ 36:f9501248b6bd

Add tests
author Guido Berhoerster <guido+pwm@berhoerster.name>
date Wed, 07 Aug 2019 11:28:07 +0200
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-022-change-master-password.sh	Wed Aug 07 11:28:07 2019 +0200
@@ -0,0 +1,13 @@
+# change master password and save password database
+
+password="GeHeIm"
+mkdir -p "${TESTS_OUTPUT_PATH}/${TEST_NAME}/"
+cp "${TESTS_PATH}/test.psafe3" "${TESTS_OUTPUT_PATH}/${TEST_NAME}/test.psafe3"
+printf "%s" "${password}" >"${TESTS_OUTPUT_PATH}/${TEST_NAME}/password.txt"
+$PWM -P "${TESTS_PATH}/password.txt" \
+    "${TESTS_OUTPUT_PATH}/${TEST_NAME}/test.psafe3" <<EOF
+ch $password
+w
+EOF
+$PWM -P "${TESTS_OUTPUT_PATH}/${TEST_NAME}/password.txt" \
+    "${TESTS_OUTPUT_PATH}/${TEST_NAME}/test.psafe3" </dev/null