1# $OpenBSD: Makefile,v 1.4 2024/12/29 06:43:33 anton Exp $
2
3REGRESS_TARGETS= \
4		${DASHO_TARGETS:C/^/t-dasho-/} \
5		${REDIRECT_TARGETS:C/^/t-redirect-/}
6
7CLEANFILES=	*.log
8
9dfile=file:../src/-
10xfile=file:../src/X
11
12dasho=	@sh ${.CURDIR}/dasho.sh
13
14#	${dasho} <args>			<$?>	<out>	<err>	<files>
15
16t-dasho-1:
17	${dasho} "-V         ${dfile}"	0	""	""	"[-] DASH"
18
19t-dasho-2:
20	${dasho} "-V -oX     ${dfile}"	0	""	""	"[X] DASH"
21
22t-dasho-3:
23	${dasho} "-V -o- -oX ${dfile}"	0	""	""	"[X] DASH"
24
25t-dasho-4:
26	${dasho} "-V -o-     ${dfile}"	0	"DASH"	""	""
27
28t-dasho-5:
29	${dasho} "-V -oX -o- ${dfile}"	0	"DASH"	""	""
30
31t-dasho-6:
32	${dasho} "-V -o./-   ${dfile}"	0	""	""	"[-] DASH"
33
34t-dasho-7:
35	${dasho} "-V         ${xfile}"	0	""	""	"[X] XXXX"
36
37t-dasho-8:
38	${dasho} "-V -oX     ${xfile}"	0	""	""	"[X] XXXX"
39
40t-dasho-9:
41	${dasho} "-V -o- -oX ${xfile}"	0	""	""	"[X] XXXX"
42
43t-dasho-10:
44	${dasho} "-V -o-     ${xfile}"	0	"XXXX"	""	""
45
46t-dasho-11:
47	${dasho} "-V -oX -o- ${xfile}"	0	"XXXX"	""	""
48
49t-dasho-12:
50	${dasho} "-V -o./-   ${xfile}"	0	""	""	"[-] XXXX"
51
52DASHO_TARGETS=1 2 3 4 5 6 7 8 9 10 11 12
53
54
55rport1?=	9000
56rport2?=	9001
57rbase1=		http://localhost:${rport1}
58rbase2=		http://localhost:${rport2}
59rbase_1=	http://[localhost]:${rport1}
60rbase_2=	http://[localhost]:${rport2}
61
62redirect=	@rport1=${rport1} rport2=${rport2} sh ${.CURDIR}/redirect.sh
63
64#	${redirect}	request			Location:		request
65
66t-redirect-1:
67	${redirect}	${rbase1}/path/to/file	${rbase2}/another/file	${rbase2}/another/file
68
69t-redirect-2:
70	${redirect}	${rbase1}/path/to/file	${rbase2}/		${rbase2}/
71
72t-redirect-3:
73	${redirect}	${rbase1}/path/to/file	/another/file		${rbase1}/another/file
74
75t-redirect-4:
76	${redirect}	${rbase1}/path/to/file	/			${rbase1}/
77
78t-redirect-5:
79	${redirect}	${rbase1}/path/to/file	another/file		${rbase1}/path/to/another/file
80
81t-redirect-6:
82	${redirect}	${rbase1}/path/to/file/	another/file		${rbase1}/path/to/file/another/file
83
84t-redirect-7:
85	${redirect}	${rbase1}/path/to/file	../			${rbase1}/path/to/../
86
87t-redirect-8:
88	${redirect}	${rbase1}/path/to/file	${rbase_2}/another/file	${rbase_2}/another/file
89
90t-redirect-9:
91	${redirect}	${rbase1}/path/to/file	${rbase_2}/		${rbase_2}/
92
93t-redirect-10:
94	${redirect}	${rbase1}/p/x?a#b?c#d	another/file		${rbase1}/p/another/file
95
96t-redirect-11:
97	${redirect}	${rbase1}/p/x#b?c#d	another/file		${rbase1}/p/another/file
98
99t-redirect-12:
100	${redirect}	${rbase1}/p/x/#b?c#d	another/file		${rbase1}/p/x/another/file
101
102t-redirect-13:
103	${redirect}	${rbase1}/p/x?aa#bb	another/file?x#yz	${rbase1}/p/another/file?x
104
105t-redirect-14:
106	${redirect}	${rbase1}/p/x/?aa#bb	another/file?x#yz	${rbase1}/p/x/another/file?x
107
108t-redirect-15:
109	${redirect}	${rbase1}/p/x#y?z/k#l?m	file?a#b?c#d		${rbase1}/p/file?a
110
111REDIRECT_TARGETS=1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
112
113
114.include <bsd.regress.mk>
115