Enlightenment CVS committal Author : mej Project : eterm Module : libast
Dir : eterm/libast/test Modified Files: test.c Log Message: Tue Jun 29 17:23:34 2004 Michael Jennings (mej) Oops, forgot some re-ordering. ---------------------------------------------------------------------- =================================================================== RCS file: /cvsroot/enlightenment/eterm/libast/test/test.c,v retrieving revision 1.42 retrieving revision 1.43 diff -u -3 -r1.42 -r1.43 --- test.c 29 Jun 2004 21:18:09 -0000 1.42 +++ test.c 29 Jun 2004 21:26:18 -0000 1.43 @@ -21,7 +21,7 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -static const char cvs_ident[] = "$Id: test.c,v 1.42 2004/06/29 21:18:09 mej Exp $"; +static const char cvs_ident[] = "$Id: test.c,v 1.43 2004/06/29 21:26:18 mej Exp $"; #if defined(HAVE_CONFIG_H) && (HAVE_CONFIG_H != 0) # include <config.h> @@ -125,13 +125,13 @@ TEST_BEGIN("spiftool_safe_strncpy() function"); s1 = MALLOC(20); - TEST_FAIL_IF(spiftool_safe_strncpy(s1, 20, "pneumonoultramicroscopicsilicovolcanoconiosis")); + TEST_FAIL_IF(spiftool_safe_strncpy(s1, "pneumonoultramicroscopicsilicovolcanoconiosis", 20)); TEST_FAIL_IF(strncmp(s1, "pneumonoultramicros", 20)); - TEST_FAIL_IF(!spiftool_safe_strncpy(s1, 20, "abc")); + TEST_FAIL_IF(!spiftool_safe_strncpy(s1, "abc", 20)); TEST_FAIL_IF(strcmp(s1, "abc")); - TEST_FAIL_IF(!spiftool_safe_strncpy(s1, 20, "")); + TEST_FAIL_IF(!spiftool_safe_strncpy(s1, "", 20)); TEST_FAIL_IF(*s1); - TEST_FAIL_IF(!spiftool_safe_strncpy(s1, 20, "0123456789012345678")); + TEST_FAIL_IF(!spiftool_safe_strncpy(s1, "0123456789012345678", 20)); TEST_FAIL_IF(strncmp(s1, "0123456789012345678", 20)); FREE(s1); TEST_PASS(); @@ -139,15 +139,15 @@ TEST_BEGIN("spiftool_safe_strncat() function"); s1 = MALLOC(20); *s1 = 0; - TEST_FAIL_IF(spiftool_safe_strncat(s1, 20, "pneumonoultramicroscopicsilicovolcanoconiosis")); + TEST_FAIL_IF(spiftool_safe_strncat(s1, "pneumonoultramicroscopicsilicovolcanoconiosis", 20)); TEST_FAIL_IF(strncmp(s1, "pneumonoultramicros", 20)); - TEST_FAIL_IF(!spiftool_safe_strncpy(s1, 20, "abc")); - TEST_FAIL_IF(!spiftool_safe_strncat(s1, 20, "defg")); + TEST_FAIL_IF(!spiftool_safe_strncpy(s1, "abc", 20)); + TEST_FAIL_IF(!spiftool_safe_strncat(s1, "defg", 20)); TEST_FAIL_IF(strcmp(s1, "abcdefg")); - TEST_FAIL_IF(!spiftool_safe_strncat(s1, 20, "")); + TEST_FAIL_IF(!spiftool_safe_strncat(s1, "", 20)); TEST_FAIL_IF(strcmp(s1, "abcdefg")); - TEST_FAIL_IF(!spiftool_safe_strncpy(s1, 20, "0123456789")); - TEST_FAIL_IF(!spiftool_safe_strncat(s1, 20, "012345678")); + TEST_FAIL_IF(!spiftool_safe_strncpy(s1, "0123456789", 20)); + TEST_FAIL_IF(!spiftool_safe_strncat(s1, "012345678", 20)); TEST_FAIL_IF(strncmp(s1, "0123456789012345678", 20)); FREE(s1); TEST_PASS(); ------------------------------------------------------- This SF.Net email sponsored by Black Hat Briefings & Training. Attend Black Hat Briefings & Training, Las Vegas July 24-29 - digital self defense, top technical experts, no vendor pitches, unmatched networking opportunities. Visit www.blackhat.com _______________________________________________ enlightenment-cvs mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs