- Timestamp:
- Jan 31, 2024, 6:40:25 PM (2 years ago)
- Branches:
- master
- Children:
- 496ffc17
- Parents:
- c75b30a (diff), e71b09a (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)links above to see all the changes relative to each parent. - Location:
- tests
- Files:
-
- 8 edited
-
collections/.expect/string-istream-manip.txt (modified) (2 diffs)
-
collections/.in/string-istream-manip.txt (modified) (2 diffs)
-
collections/string-istream-manip.cfa (modified) (2 diffs)
-
io/.expect/manipulatorsInput.arm64.txt (modified) (1 diff)
-
io/.expect/manipulatorsInput.x64.txt (modified) (1 diff)
-
io/.expect/manipulatorsInput.x86.txt (modified) (1 diff)
-
io/.in/manipulatorsInput.txt (modified) (4 diffs)
-
io/manipulatorsInput.cfa (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
tests/collections/.expect/string-istream-manip.txt
rc75b30a r32490deb 68 68 12 wwwwwwww 69 69 13 wwwwwwww 70 14 cccc70 14 71 71 15 72 72 1 yyyyyyyyyyyyyyyyyyyy … … 83 83 12 wwwwwwww 84 84 13 wwwwwwww 85 14 cccc85 14 86 86 15 -
tests/collections/.in/string-istream-manip.txt
rc75b30a r32490deb 36 36 abcxxx 37 37 abcyyy 38 aaaaaaaaxxxxxxxxaabbccbbdddwwwbbbbbbbbwwwwwwwwaaaaaaaawwwwwwww 39 uuuuu ccccuuuuu38 aaaaaaaaxxxxxxxxaabbccbbdddwwwbbbbbbbbwwwwwwwwaaaaaaaawwwwwwwwaaaaaaaawwwwwwww 39 uuuuu 40 40 abc 41 41 cccccb … … 43 43 abcxxx 44 44 abcyyy 45 aaaaaaaaxxxxxxxxaabbccbbdddwwwbbbbbbbbwwwwwwwwaaaaaaaawwwwwwww 46 uuuuu ccccuuuuu45 aaaaaaaaxxxxxxxxaabbccbbdddwwwbbbbbbbbwwwwwwwwaaaaaaaawwwwwwwwaaaaaaaawwwwwwww 46 uuuuu -
tests/collections/string-istream-manip.cfa
rc75b30a r32490deb 165 165 sin | ignore( incl( "abc", wdi( 8, s ) ) ); sout | "12" | s; 166 166 sin | ignore( excl( "abc", wdi( 8, s ) ) ); sout | "13" | s; 167 sin | "\n"; 167 168 168 169 s = "q"; … … 191 192 sin | ignore( incl( "abc", wdi( 8, s ) ) ); sout | "12" | s; 192 193 sin | ignore( excl( "abc", wdi( 8, s ) ) ); sout | "13" | s; 194 sin | "\n"; 193 195 194 196 s = "q"; -
tests/io/.expect/manipulatorsInput.arm64.txt
rc75b30a r32490deb 18 18 12 wwwwwwww 19 19 13 wwwwwwww 20 14 rc= 1, cccc20 14 rc=0, q 21 21 15 rc=0, q 22 22 16 get this line 23 23 17 @# this line 1)-{} 24 18 abc 25 19 abc 26 20 d d 24 18 @# this line 1)-{} 25 19 abc 26 20 abc 27 21 d d 27 28 28 29 d 29 21 ZC44% 30 22 ZC44% 31 23 ZC44% 32 24 x 33 25 x 34 26 x 35 27 x 36 28 x 30 37 1 yyyyyyyyyyyyyyyyyyyy 31 38 2 abcxxx 32 39 3 abcxxx 33 40 4 aaaaaaaa 34 5 41 5 aaaaaaaa 35 42 6 aabbccbb 36 43 7 dddwww 37 8 38 9 44 8 dddwww 45 9 dddwww 39 46 10 aaaaaaaa 40 47 11 wwwwwwww 41 12 42 13 43 14 cccc48 12 wwwwwwww 49 13 wwwwwwww 50 14 44 51 15 45 52 16 get this line 46 53 17 @# this line 1)-{} 47 18 abc 48 19 abc 49 20 d d 54 18 @# this line 1)-{} 55 19 abc 56 20 abc 57 21 d d 50 58 51 59 d 52 21 ZC44% 60 22 ZC44% 61 23 ZC44% 62 24 x 63 25 x 64 26 x 65 27 x 66 28 x 53 67 a 54 68 a 69 xxx 70 xxx 55 71 -1 56 72 15 -
tests/io/.expect/manipulatorsInput.x64.txt
rc75b30a r32490deb 18 18 12 wwwwwwww 19 19 13 wwwwwwww 20 14 rc= 1, cccc20 14 rc=0, q 21 21 15 rc=0, q 22 22 16 get this line 23 23 17 @# this line 1)-{} 24 18 abc 25 19 abc 26 20 d d 24 18 @# this line 1)-{} 25 19 abc 26 20 abc 27 21 d d 27 28 28 29 d 29 21 ZC44% 30 22 ZC44% 31 23 ZC44% 32 24 x 33 25 x 34 26 x 35 27 x 36 28 x 30 37 1 yyyyyyyyyyyyyyyyyyyy 31 38 2 abcxxx 32 39 3 abcxxx 33 40 4 aaaaaaaa 34 5 41 5 aaaaaaaa 35 42 6 aabbccbb 36 43 7 dddwww 37 8 38 9 44 8 dddwww 45 9 dddwww 39 46 10 aaaaaaaa 40 47 11 wwwwwwww 41 12 42 13 43 14 cccc48 12 wwwwwwww 49 13 wwwwwwww 50 14 44 51 15 45 52 16 get this line 46 53 17 @# this line 1)-{} 47 18 abc 48 19 abc 49 20 d d 54 18 @# this line 1)-{} 55 19 abc 56 20 abc 57 21 d d 50 58 51 59 d 52 21 ZC44% 60 22 ZC44% 61 23 ZC44% 62 24 x 63 25 x 64 26 x 65 27 x 66 28 x 53 67 a 54 68 a 69 xxx 70 xxx 55 71 -1 56 72 15 -
tests/io/.expect/manipulatorsInput.x86.txt
rc75b30a r32490deb 18 18 12 wwwwwwww 19 19 13 wwwwwwww 20 14 rc= 1, cccc20 14 rc=0, q 21 21 15 rc=0, q 22 22 16 get this line 23 23 17 @# this line 1)-{} 24 18 abc 25 19 abc 26 20 d d 24 18 @# this line 1)-{} 25 19 abc 26 20 abc 27 21 d d 27 28 28 29 d 29 21 ZC44% 30 22 ZC44% 31 23 ZC44% 32 24 x 33 25 x 34 26 x 35 27 x 36 28 x 30 37 1 yyyyyyyyyyyyyyyyyyyy 31 38 2 abcxxx 32 39 3 abcxxx 33 40 4 aaaaaaaa 34 5 41 5 aaaaaaaa 35 42 6 aabbccbb 36 43 7 dddwww 37 8 38 9 44 8 dddwww 45 9 dddwww 39 46 10 aaaaaaaa 40 47 11 wwwwwwww 41 12 42 13 43 14 cccc48 12 wwwwwwww 49 13 wwwwwwww 50 14 44 51 15 45 52 16 get this line 46 53 17 @# this line 1)-{} 47 18 abc 48 19 abc 49 20 d d 54 18 @# this line 1)-{} 55 19 abc 56 20 abc 57 21 d d 50 58 51 59 d 52 21 ZC44% 60 22 ZC44% 61 23 ZC44% 62 24 x 63 25 x 64 26 x 65 27 x 66 28 x 53 67 a 54 68 a 69 xxx 70 xxx 55 71 -1 56 72 15 -
tests/io/.in/manipulatorsInput.txt
rc75b30a r32490deb 8 8 abcxxx 9 9 abcyyy 10 aaaaaaaaxxxxxxxxaabbccbbdddwwwbbbbbbbbwwwwwwwwaaaaaaaawwwwwwww 11 uuuuu ccccuuuuu10 aaaaaaaaxxxxxxxxaabbccbbdddwwwbbbbbbbbwwwwwwwwaaaaaaaawwwwwwwwaaaaaaaawwwwwwww 11 uuuuu 12 12 get this line 13 13 @# this line 1)-{}% 14 @# this line 2)-{}% 14 15 "abc" 15 16 'abc ' … … 18 19 d } 19 20 X ZC44%Y 21 X ZC55%Y 22 'x' 23 "x" 24 {x} 25 XxY 26 XyY 20 27 abc 21 28 cccccb … … 23 30 abcxxx 24 31 abcyyy 25 aaaaaaaaxxxxxxxxaabbccbbdddwwwbbbbbbbbwwwwwwwwaaaaaaaawwwwwwww 26 uuuuu ccccuuuuu32 aaaaaaaaxxxxxxxxaabbccbbdddwwwbbbbbbbbwwwwwwwwaaaaaaaawwwwwwwwaaaaaaaawwwwwwww 33 uuuuu 27 34 get this line 28 35 @# this line 1)-{}% 36 @# this line 2)-{}% 29 37 "abc" 30 38 'abc ' … … 33 41 d } 34 42 X ZC44%Y 43 X ZC55%Y 44 'x' 45 "x" 46 {x} 47 XxY 48 XyY 35 49 ab 50 xxxyyy 36 51 0xff 017 15-15 37 52 0xff 017 15-15 -
tests/io/manipulatorsInput.cfa
rc75b30a r32490deb 7 7 // Created On : Sat Jun 8 17:58:54 2019 8 8 // Last Modified By : Peter A. Buhr 9 // Last Modified On : Wed Jan 3 11:15:04202410 // Update Count : 1 039 // Last Modified On : Sun Jan 28 11:59:55 2024 10 // Update Count : 133 11 11 // 12 12 … … 55 55 } 56 56 { 57 char s[] = "yyyyyyyyyyyyyyyyyyyy"; 57 char s[] = "yyyyyyyyyyyyyyyyyyyy"; // Input characters consumed: 58 58 const char sk_fmt[] = "%*[abc]"; 59 scanf( "abc " ); scanf( sk_fmt ); for ( 5 ) scanf( "%*c" ); printf( "1 %s\n", s ); 60 scanf( "%s", s ); printf( "2 %s\n", s ); 61 scanf( "%*s" ); printf( "3 %s\n", s ); 62 scanf( "%8s", s ); printf( "4 %s\n", s ); 63 scanf( "%*8s" ); printf( "5 %s\n", s ); 64 65 scanf( "%[abc]", s ); printf( "6 %s\n", s ); 66 scanf( "%[^abc]", s ); printf( "7 %s\n", s ); 67 scanf( "%*[abc]" ); printf( "8 %s\n", s ); 68 scanf( "%*[^abc]" ); printf( "9 %s\n", s ); 69 scanf( "%8[abc]", s ); printf( "10 %s\n", s ); 70 scanf( "%8[^abc]", s ); printf( "11 %s\n", s ); 71 scanf( "%*8[abc]" ); printf( "12 %s\n", s ); 72 scanf( "%*8[^abc]" ); printf( "13 %s\n", s ); 59 scanf( "abc " ); scanf( sk_fmt ); for ( 5 ) scanf( "%*c" ); printf( "1 %s\n", s ); // |abc |\ncccccb| \nxx\n| 60 scanf( "%s", s ); printf( "2 %s\n", s ); // |abcxxx| 61 scanf( "%*s" ); printf( "3 %s\n", s ); // |\nabcyyy| 62 scanf( "%8s", s ); printf( "4 %s\n", s ); // |\naaaaaaaa| 63 scanf( "%*8s" ); printf( "5 %s\n", s ); // |xxxxxxxx| 64 65 scanf( "%[abc]", s ); printf( "6 %s\n", s ); // |aabbccbb| 66 scanf( "%[^abc]", s ); printf( "7 %s\n", s ); // |dddwww| 67 scanf( "%*[abc]" ); printf( "8 %s\n", s ); // |bbbbbbbb| 68 scanf( "%*[^abc]" ); printf( "9 %s\n", s ); // |wwwwwwww| 69 scanf( "%8[abc]", s ); printf( "10 %s\n", s ); // |aaaaaaaa| 70 scanf( "%8[^abc]", s ); printf( "11 %s\n", s ); // |wwwwwwww| 71 scanf( "%*8[abc]" ); printf( "12 %s\n", s ); // |aaaaaaaa| 72 scanf( "%*8[^abc]" ); printf( "13 %s\n", s ); // |wwwwwwww| 73 scanf( "\n" ); // must start next line // |\n| 73 74 74 75 int rc; 75 76 s[0] = 'q'; s[1] = '\0'; rc = 99; 76 rc = scanf( "%[abc]", s ); printf( "14 rc=%d, %s\n", rc, s ); 77 rc = scanf( "%[abc]", s ); printf( "14 rc=%d, %s\n", rc, s ); // || 77 78 s[0] = 'q'; s[1] = '\0'; rc = 99; 78 rc = scanf( "%[^u]", s ); printf( "15 rc=%d, %s\n", rc, s ); 79 scanf( "%*[u]\n" ); 80 scanf( "%[^\n]\n", s ); printf( "16 %s\n", s ); 81 scanf( "%[^%%]%%\n", s ); printf( "17 %s\n", s ); 82 83 scanf( "%*[ \f\n\r\t\v]" ); // ignore whitespace 84 scanf( "\"%[^\"]\"", s ); printf( "18 %s\n", s ); 85 scanf( "%*[ \f\n\r\t\v]" ); // ignore whitespace 86 scanf( "'%[^']'", s ); printf( "19 %s\n", s ); 87 scanf( "%*[ \f\n\r\t\v]" ); // ignore whitespace 88 scanf( "{%[^}]}", s ); printf( "20 %s\n", s ); 89 scanf( "%*[ \f\n\r\t\v]" ); // ignore whitespace 90 scanf( "X%[^Y]Y", s ); printf( "21 %s\n", s ); 91 scanf( "\n" ); // must start next line 79 rc = scanf( "%[^u]", s ); printf( "15 rc=%d, %s\n", rc, s ); // || 80 scanf( "%*[u]\n" ); // |uuuuu\n| 81 scanf( "%[^\n]\n", s ); printf( "16 %s\n", s ); // |get this line\n| 82 scanf( "%[^%%]%%\n", s ); printf( "17 %s\n", s ); // |@# this line 1)-{}%\n| 83 scanf( "%*[^%%]%%\n", s ); printf( "18 %s\n", s ); // |@# this line 1)-{}%\n| 84 85 scanf( "%*[ \f\n\r\t\v]" ); // ignore whitespace // || 86 scanf( "\"%[^\"]\"", s ); printf( "19 %s\n", s ); // |"abc"| 87 scanf( "%*[ \f\n\r\t\v]" ); // ignore whitespace // |\n| 88 scanf( "'%[^']'", s ); printf( "20 %s\n", s ); // |'abc '| 89 scanf( "%*[ \f\n\r\t\v]" ); // ignore whitespace // |\n| 90 scanf( "{%[^}]}", s ); printf( "21 %s\n", s ); // |{ d d\n\nd }| 91 scanf( "%*[ \f\n\r\t\v]" ); // ignore whitespace // |\n| 92 scanf( "X%[^Y]Y", s ); printf( "22 %s\n", s ); // |X ZC44%Y| 93 scanf( "%*[ \f\n\r\t\v]" ); // ignore whitespace // |\n| 94 scanf( "X%*[^Y]Y", s ); printf( "23 %s\n", s ); // |X ZC44%Y| 95 scanf( "\n" ); // must start next line // |\n| 96 97 char ch; 98 scanf( "%*[ \f\n\r\t\v]" ); // ignore whitespace // |\n| 99 scanf( "'%c'", &ch ); printf( "24 %c\n", ch ); // |x| 100 scanf( "%*[ \f\n\r\t\v]" ); // ignore whitespace // |\n| 101 scanf( "\"%c\"", &ch ); printf( "25 %c\n", ch ); // |x| 102 scanf( "%*[ \f\n\r\t\v]" ); // ignore whitespace // |\n| 103 scanf( "{%c}", &ch ); printf( "26 %c\n", ch ); // |x| 104 scanf( "%*[ \f\n\r\t\v]" ); // ignore whitespace // |\n| 105 scanf( "X%cY", &ch ); printf( "27 %c\n", ch ); // |x| 106 scanf( "%*[ \f\n\r\t\v]" ); // ignore whitespace // |\n| 107 scanf( "X%*cY", &ch ); printf( "28 %c\n", ch ); // |x| 108 scanf( "\n" ); // must start next line // |\n| 92 109 } 93 110 { … … 108 125 sin | ignore( incl( "abc", wdi( sizeof(s), 8, s ) ) ); sout | "12" | s; 109 126 sin | ignore( excl( "abc", wdi( sizeof(s), 8, s ) ) ); sout | "13" | s; 127 sin | nl; 110 128 111 129 s[0] = 'q'; s[1] = '\0'; … … 116 134 sin | getline( wdi( sizeof(s), s ) ); sout | "16" | s; 117 135 sin | getline( wdi( sizeof(s), s ), '%' ) | "\n"; sout | "17" | s; 118 119 sin | quoted( wdi( sizeof(s), s ) ); sout | "18" | s; 120 sin | quoted( wdi( sizeof(s), s ), '\'' ); sout | "19" | s; 121 sin | quoted( wdi( sizeof(s), s ), '{', '}' ); sout | "20" | s; 122 sin | quoted( wdi( sizeof(s), s ), 'X', 'Y' ); sout | "21" | s; 123 } 124 // Keep harmonized with collections/string-istream-manip 136 sin | ignore( getline( wdi( sizeof(s), s ), '%' ) ) | "\n"; sout | "18" | s; 137 138 sin | quoted( wdi( sizeof(s), s ) ); sout | "19" | s; 139 sin | quoted( wdi( sizeof(s), s ), '\'' ); sout | "20" | s; 140 sin | quoted( wdi( sizeof(s), s ), '{', '}' ); sout | "21" | s; 141 sin | quoted( wdi( sizeof(s), s ), 'X', 'Y' ); sout | "22" | s; 142 sin | ignore( quoted( wdi( sizeof(s), s ), 'X', 'Y' ) ); sout | "23" | s; 143 144 char ch; 145 sin | quoted( ch ); sout | "24 " | ch; 146 sin | quoted( ch, '\"' ); sout | "25 " | ch; 147 sin | quoted( ch, '{', '}' ); sout | "26 " | ch; 148 sin | quoted( ch, 'X', 'Y' ); sout | "27 " | ch; 149 sin | ignore( quoted( ch, 'X', 'Y' ) ); sout | "28 " | ch; 150 sin | nl; 151 } 152 // Keep harmonized with collections/string-istream-manip 125 153 { 126 154 char c; 127 155 sin | c; sout | c; 128 156 sin | ignore( c ); sout | c; 157 sin | nl; 158 159 char ca[3] = { 'a', 'b', 'c' }; 160 sin | wdi( sizeof(ca), ca[0] ); sout | ca[0] | ca[1] | ca[2]; 161 sin | ignore( wdi( sizeof(ca), ca[0] ) ); sout | ca[0] | ca[1] | ca[2]; 162 sin | nl; 129 163 130 164 signed char sc;
Note:
See TracChangeset
for help on using the changeset viewer.