pashage

Yet Another Opinionated Re-engineering of the Unix Password Store
git clone https://git.instinctive.eu/pashage.git
Log | Files | Refs | README | LICENSE

commit 29e1c6d4f388c87f87772510e9f2a4793954c3bc
parent c2dd6586d9fbd7fd9ce54b32abc10d75a96ce727
Author: Natasha Kerensikova <natgh@instinctive.eu>
Date:   Sat,  2 Nov 2024 16:57:42 +0000

Mock environment is corrected to support random_chars
Diffstat:
Mspec/pashage_extra_spec.sh | 14+-------------
Mspec/pass_spec.sh | 3+--
Aspec/support/bin/@dd | 3+++
3 files changed, 5 insertions(+), 15 deletions(-)

diff --git a/spec/pashage_extra_spec.sh b/spec/pashage_extra_spec.sh @@ -359,24 +359,12 @@ Describe 'Integrated Command Functions' OVERWRITE=no SHOW=text - random_chars() { %- 0123456789 ; } - It 'overwrites after asking for confirmation' - expected_out() { %text - #|An entry already exists for subdir/file. Overwrite it? [y/n](B)The generated password for (U)subdir/file(!U) is:(N) - #|0123456789 - } Data 'y' When call cmd_generate subdir/file 10 The status should be success - The output should equal "$(expected_out)" + The output should start with 'An entry already exists for subdir/file. Overwrite it? [y/n](B)The generated password for (U)subdir/file(!U) is:(N)' The error should be blank - expected_file() { %text:expand - #|ageRecipient:myself - #|age:0123456789 - } - The contents of file "${PREFIX}/subdir/file.age" should \ - equal "$(expected_file)" expected_log() { %text #|Add generated password for subdir/file. #| diff --git a/spec/pass_spec.sh b/spec/pass_spec.sh @@ -186,8 +186,7 @@ Describe 'Pass-like command' End Mock dd - . "${SHELLSPEC_SUPPORT_BIN}" - invoke dd "$@" + @dd "$@" End Mock diff diff --git a/spec/support/bin/@dd b/spec/support/bin/@dd @@ -0,0 +1,3 @@ +#!/bin/sh -e +. "$SHELLSPEC_SUPPORT_BIN" +invoke dd "$@"