Annotation of embedaddon/php/ext/standard/tests/strings/convert_uuencode_basic.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: Test convert_uuencode() function : basic functionality
3: --FILE--
4: <?php
5:
6: /* Prototype : string convert_uuencode ( string $data )
7: * Description: Uuencode a string
8: * Source code: ext/standard/uuencode.c
9: */
10:
11: echo "*** Testing convert_uuencode() : basic functionality ***\n";
12:
13: // array with different values for $string
14: $strings = array (
15:
16: //double quoted strings
17: b"123",
18: b"abc",
19: b"1a2b3c",
20: b"Here is a simple string to test convert_uuencode/decode",
21: b"\t This String contains \t\t some control characters\r\n",
22: b"\x90\x91\x00\x93\x94\x90\x91\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f",
23:
24: //single quoted strings
25: b'123',
26: b'abc',
27: b'1a2b3c',
28: b'\t This String contains \t\t some control characters\r\n',
29:
30: );
31:
32: // loop through with each element of the $strings array to test convert_uuencode() function
33: $count = 1;
34: foreach($strings as $string) {
35: echo "-- Iteration $count --\n";
36: var_dump( convert_uuencode($string) );
37: $count ++;
38: }
39:
40:
41: ?>
42: ===DONE===
43: --EXPECTF--
44: *** Testing convert_uuencode() : basic functionality ***
45: -- Iteration 1 --
46: string(8) "#,3(S
47: `
48: "
49: -- Iteration 2 --
50: string(8) "#86)C
51: `
52: "
53: -- Iteration 3 --
54: string(12) "&,6$R8C-C
55: `
56: "
57: -- Iteration 4 --
58: string(82) "M2&5R92!I<R!A('-I;7!L92!S=')I;F<@=&\@=&5S="!C;VYV97)T7W5U96YC
59: *;V1E+V1E8V]D90``
60: `
61: "
62: -- Iteration 5 --
63: string(74) "M"2!4:&ES(%-T<FEN9R!C;VYT86EN<R`)"2!S;VUE(&-O;G1R;VP@8VAA<F%C
64: &=&5R<PT*
65: `
66: "
67: -- Iteration 6 --
68: string(28) "2D)$`DY20D966EYB9FIN<G9Z?
69: `
70: "
71: -- Iteration 7 --
72: string(8) "#,3(S
73: `
74: "
75: -- Iteration 8 --
76: string(8) "#86)C
77: `
78: "
79: -- Iteration 9 --
80: string(12) "&,6$R8C-C
81: `
82: "
83: -- Iteration 10 --
84: string(82) "M7'0@5&AI<R!3=')I;F<@8V]N=&%I;G,@7'1<="!S;VUE(&-O;G1R;VP@8VAA
85: +<F%C=&5R<UQR7&X`
86: `
87: "
88: ===DONE===
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>