Debian Codegraph @

gcc/testsuite/cobol.dg/group2/INSPECT_BACKWARD_simple_CONVERTING.cob

raw
1 *> { dg-do run }
2 *> { dg-options "-dialect mf" }
3 *> { dg-output-file "group2/INSPECT_BACKWARD_simple_CONVERTING.out" }
4
5 program-id. prog.
6 data division.
7 working-storage section.
8 01 item pic x(64).
9 01 should-be pic x(64).
10 procedure division.
11 display "Forward:"
12 move "the quick brown fox jumps over the lazy dog" to item
13 inspect item converting
14 "abcdefghijklmnopqrstuvwxyz"
15 TO "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
16 move "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG" to should-be
17 perform reportt
18
19 move "the quick brown fox jumps over the lazy dog" to item
20 inspect item converting
21 "abcdefghijklmnopqrstuvwxyz"
22 TO "ABCDEFGHIJKLMNOPQRSTUVWXYZ" before "jumps"
23 move "THE QUICK BROWN FOX jumps over the lazy dog" to should-be
24 perform reportt
25
26 move "the quick brown fox jumps over the lazy dog" to item
27 inspect item converting
28 "abcdefghijklmnopqrstuvwxyz"
29 TO "ABCDEFGHIJKLMNOPQRSTUVWXYZ" before "nothing"
30 move "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG" to should-be
31 perform reportt
32
33 move "the quick brown fox jumps over the lazy dog" to item
34 inspect item converting
35 "abcdefghijklmnopqrstuvwxyz"
36 TO "ABCDEFGHIJKLMNOPQRSTUVWXYZ" after "fox"
37 move "the quick brown fox JUMPS OVER THE LAZY DOG" to should-be
38 perform reportt
39
40 move "the quick brown fox jumps over the lazy dog" to item
41 inspect item converting
42 "abcdefghijklmnopqrstuvwxyz"
43 TO "ABCDEFGHIJKLMNOPQRSTUVWXYZ" after "fox" before "over"
44 move "the quick brown fox JUMPS over the lazy dog" to should-be
45 perform reportt
46
47 move "the quick brown fox jumps over the lazy dog" to item
48 inspect item converting
49 "abcdefghijklmnopqrstuvwxyz"
50 TO "ABCDEFGHIJKLMNOPQRSTUVWXYZ" after "fox" before "xyzzy"
51 move "the quick brown fox JUMPS OVER THE LAZY DOG" to should-be
52 perform reportt
53
54 display "Reverse:"
55
56 move "the quick brown fox jumps over the lazy dog" to item
57 inspect backward item converting
58 "abcdefghijklmnopqrstuvwxyz"
59 TO "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
60 move "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG" to should-be
61 perform reportt
62
63 move "the quick brown fox jumps over the lazy dog" to item
64 inspect backward item converting
65 "abcdefghijklmnopqrstuvwxyz"
66 TO "ABCDEFGHIJKLMNOPQRSTUVWXYZ" before "jumps"
67 move "the quick brown fox jumps OVER THE LAZY DOG" to should-be
68 perform reportt
69
70 move "the quick brown fox jumps over the lazy dog" to item
71 inspect backward item converting
72 "abcdefghijklmnopqrstuvwxyz"
73 TO "ABCDEFGHIJKLMNOPQRSTUVWXYZ" before "nothing"
74 move "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG" to should-be
75 perform reportt
76
77 move "the quick brown fox jumps over the lazy dog" to item
78 inspect backward item converting
79 "abcdefghijklmnopqrstuvwxyz"
80 TO "ABCDEFGHIJKLMNOPQRSTUVWXYZ" after "fox"
81 move "THE QUICK BROWN fox jumps over the lazy dog" to should-be
82 perform reportt
83
84 move "the quick brown fox jumps over the lazy dog" to item
85 inspect backward item converting
86 "abcdefghijklmnopqrstuvwxyz"
87 TO "ABCDEFGHIJKLMNOPQRSTUVWXYZ" before "fox" after "over"
88 move "the quick brown fox JUMPS over the lazy dog" to should-be
89 perform reportt
90
91 move "the quick brown fox jumps over the lazy dog" to item
92 inspect backward item converting
93 "abcdefghijklmnopqrstuvwxyz"
94 TO "ABCDEFGHIJKLMNOPQRSTUVWXYZ" before "xyzzy" after "over"
95 move "THE QUICK BROWN FOX JUMPS over the lazy dog" to should-be
96 perform reportt
97
98 goback.
99 reportt.
100 display " " function trim(item)
101 if item not equal to should-be
102 display "should have been " function trim(should-be)
103 end-if.
104 end program prog.
105