Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/freebsd-src
Path: blob/main/usr.bin/bintrans/tests/bintrans_test.sh
34875 views
1
atf_test_case encode_qp
2
encode_qp_body()
3
{
4
atf_check -e empty -o file:"$(atf_get_srcdir)/textqpenc" bintrans qp $(atf_get_srcdir)/textqpdec
5
}
6
7
atf_test_case decode_qp
8
decode_qp_body()
9
{
10
printf "=" > test
11
atf_check -e empty -o inline:"=" bintrans qp -u test
12
printf "=\ra" > test
13
atf_check -e empty -o inline:"=\ra" bintrans qp -u test
14
printf "=\r\na" > test
15
atf_check -e empty -o inline:"a" bintrans qp -u test
16
printf "This is a line" > test
17
atf_check -e empty -o inline:"This is a line" bintrans qp -u test
18
printf "This= is a line" > test
19
atf_check -e empty -o inline:"This= is a line" bintrans qp -u test
20
printf "This=2 is a line" > test
21
atf_check -e empty -o inline:"This=2 is a line" bintrans qp -u test
22
printf "This=23 is a line" > test
23
atf_check -e empty -o inline:"This# is a line" bintrans qp -u test
24
printf "This=3D is a line" > test
25
atf_check -e empty -o inline:"This= is a line" bintrans qp -u test
26
printf "This_ is a line" > test
27
atf_check -e empty -o inline:"This_ is a line" bintrans qp -u test
28
atf_check -e empty -o file:"$(atf_get_srcdir)/textqpdec" bintrans qp -u $(atf_get_srcdir)/textqpenc
29
}
30
31
atf_init_test_cases()
32
{
33
atf_add_test_case decode_qp
34
atf_add_test_case encode_qp
35
}
36
37