Lines Matching refs:one
137 char one[50];
146 check (mystrncpy (one, "abc", 4) == one, 1); /* Returned value. */
147 equal (one, "abc", 2); /* Did the copy go right? */
149 (void) strcpy (one, "abcdefgh");
150 (void) mystrncpy (one, "xyz", 2);
151 equal (one, "xycdefgh", 3); /* Copy cut by count. */
153 (void) strcpy (one, "abcdefgh");
154 (void) mystrncpy (one, "xyz", 3); /* Copy cut just before NUL. */
155 equal (one, "xyzdefgh", 4);
157 (void) strcpy (one, "abcdefgh");
158 (void) mystrncpy (one, "xyz", 4); /* Copy just includes NUL. */
159 equal (one, "xyz", 5);
160 equal (one+4, "efgh", 6); /* Wrote too much? */
162 (void) strcpy (one, "abcdefgh");
163 (void) mystrncpy (one, "xyz", 5); /* Copy includes padding. */
164 equal (one, "xyz", 7);
165 equal (one+4, "", 8);
166 equal (one+5, "fgh", 9);
168 (void) strcpy (one, "abc");
169 (void) mystrncpy (one, "xyz", 0); /* Zero-length copy. */
170 equal (one, "abc", 10);
172 (void) mystrncpy (one, "", 2); /* Zero-length source. */
173 equal (one, "", 11);
174 equal (one+1, "", 12);
175 equal (one+2, "c", 13);
177 (void) strcpy (one, "hi there");
178 (void) mystrncpy (two, one, 9);
180 equal (one, "hi there", 15); /* Stomped on source? */