File: functional-tests.in

package info (click to toggle)
mlmmj 1.6.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,560 kB
  • sloc: ansic: 13,223; php: 1,337; perl: 904; sh: 501; makefile: 99
file content (38 lines) | stat: -rw-r--r-- 1,183 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!@ATFSH@

. $(atf_get_srcdir)/test_env.sh

tests_init \
	discard

discard_body()
{

	mlmmjrecv=$(command -v mlmmj-receive)
	mlmmjmaint=$(command -v mlmmj-maintd)
	init_ml list
	echo "list@test" > list/control/listaddress
	here=$(pwd)

	atf_check -s exit:0 $mlmmjrecv -L list -F <<-EOF
bla
EOF
	atf_check -o inline:"bla\n" cat list/queue/discarded/*
	# the discarded file is too new, do not drop it yet
	atf_check -s exit:0 -e ignore $mlmmjmaint -F -L ${here}/list
	atf_check -o inline:"bla\n" cat list/queue/discarded/*
	atf_check touch -m -t 197001010101 list/queue/discarded/*
	atf_check -s exit:0 -e ignore $mlmmjmaint -F -L ${here}/list
	atf_check -o inline:"list/queue/discarded\n" find list/queue/discarded  -type d -empty

	#now with relative path
	atf_check -s exit:0 $mlmmjrecv -L list -F <<-EOF
bla
EOF
	atf_check -o inline:"bla\n" cat list/queue/discarded/*
	atf_check -s exit:0 -e ignore $mlmmjmaint -F -L list
	atf_check -o inline:"bla\n" cat list/queue/discarded/*
	atf_check touch -m -t 197001010101 list/queue/discarded/*
	atf_check -s exit:0 -e ignore $mlmmjmaint -F -L list
	atf_check -o inline:"list/queue/discarded\n" find list/queue/discarded  -type d -empty
}