summaryrefslogtreecommitdiff
path: root/tests/t0400-grep.sh
blob: 206377fa779af9ae9e0f5795218fa370517aff1e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/usr/bin/env bash

test_description='Grep check'
cd "$(dirname "$0")"
. ./setup.sh

test_expect_success 'Make sure grep prints normal lines' '
	"$PASS" init $KEY1 &&
	"$PASS" insert -e blah1 <<<"hello" &&
	"$PASS" insert -e blah2 <<<"my name is" &&
	"$PASS" insert -e folder/blah3 <<<"I hate computers" &&
	"$PASS" insert -e blah4 <<<"me too!" &&
	"$PASS" insert -e folder/where/blah5 <<<"They are hell" &&
	results="$("$PASS" grep hell)" &&
	[[ $(wc -l <<<"$results") -eq 4 ]] &&
	grep -q blah5 <<<"$results" &&
	grep -q blah1 <<<"$results" &&
	grep -q "They are" <<<"$results"
'

test_done
-29[release]: Fix github variable syntaxRené 'Necoro' Neumann1-2/+2 2022-01-29Build on windows and linuxRené 'Necoro' Neumann1-6/+9 2022-01-29Build on windows and linuxRené 'Necoro' Neumann1-45/+58 2022-01-25const blockRené 'Necoro' Neumann1-3/+5 2022-01-25Slight restructuringRené 'Necoro' Neumann2-84/+93 2022-01-24Add test stuff to .gitignoreRené 'Necoro' Neumann1-1/+7 2022-01-24Factor out `writeOutput`René 'Necoro' Neumann1-15/+15 2022-01-24Create clubs and participants files also via templateRené 'Necoro' Neumann4-113/+63