forked from mirror12k/42us-stupidity
-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathconfig_d06.pl
50 lines (42 loc) · 901 Bytes
/
config_d06.pl
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
39
40
41
42
43
44
45
46
47
48
49
ex01 -p
ft_print_program_name
check -t ====
%tests = (
"$program" => "$program\n",
"$program a b c" => "$program\n",
);
====
ex02 -p
ft_print_params
check -t ====
%tests = (
"$program" => "",
"$program a" => "a\n",
"$program a b" => "a\nb\n",
"$program asdf beta char" => "asdf\nbeta\nchar\n",
"$program 'hello world' !" => "hello world\n!\n",
"$program '' lol" => "\nlol\n",
);
====
ex03 -p
ft_rev_params
check -t ====
%tests = (
"$program" => "",
"$program a" => "a\n",
"$program a b" => "b\na\n",
"$program asdf beta char" => "char\nbeta\nasdf\n",
"$program 'lol hi' test" => "test\nlol hi\n",
"$program '' !" => "!\n\n",
);
====
ex04 -p
ft_sort_params
check -t ====
%tests = (
"$program" => "",
"$program asdf beta char" => "asdf\nbeta\nchar\n",
"$program abcd abc ab a" => "a\nab\nabc\nabcd\n",
"$program zxcv '' qwer 1234 asdf" => "\n1234\nasdf\nqwer\nzxcv\n",
);
====