"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "mpl/test/strsep.c" between
hydra-3.3.1.tar.gz and hydra-3.3.2.tar.gz

About: Hydra (MPICH) is a process management system for starting parallel jobs. Hydra is designed to natively work with existing launcher daemons (such as ssh, rsh, fork), as well as natively integrate with resource management systems (such as slurm, pbs, sge).

strsep.c  (hydra-3.3.1):strsep.c  (hydra-3.3.2)
skipping to change at line 24 skipping to change at line 24
{ {
char *orig; char *orig;
char *str; char *str;
char *next; char *next;
str = NULL; str = NULL;
next = MPL_strsep(&str, "|"); next = MPL_strsep(&str, "|");
assert(next == NULL); assert(next == NULL);
assert(str == NULL); assert(str == NULL);
orig = strdup(""); orig = MPL_strdup("");
str = orig; str = orig;
next = MPL_strsep(&str, "|"); next = MPL_strsep(&str, "|");
assert(str == NULL); assert(str == NULL);
assert(next == orig); assert(next == orig);
free(orig); MPL_free(orig);
orig = strdup("a|b|c"); orig = MPL_strdup("a|b|c");
str = orig; str = orig;
next = MPL_strsep(&str, "|"); next = MPL_strsep(&str, "|");
assert(next == orig); assert(next == orig);
assert(0 == strcmp(next, "a")); assert(0 == strcmp(next, "a"));
next = MPL_strsep(&str, "|"); next = MPL_strsep(&str, "|");
assert(0 == strcmp(next, "b")); assert(0 == strcmp(next, "b"));
next = MPL_strsep(&str, "|"); next = MPL_strsep(&str, "|");
assert(0 == strcmp(next, "c")); assert(0 == strcmp(next, "c"));
next = MPL_strsep(&str, "|"); next = MPL_strsep(&str, "|");
assert(next == NULL); assert(next == NULL);
assert(str == NULL); assert(str == NULL);
free(orig); MPL_free(orig);
orig = strdup("a|b:c"); orig = MPL_strdup("a|b:c");
str = orig; str = orig;
next = MPL_strsep(&str, ":|"); next = MPL_strsep(&str, ":|");
assert(next == orig); assert(next == orig);
assert(0 == strcmp(next, "a")); assert(0 == strcmp(next, "a"));
next = MPL_strsep(&str, ":|"); next = MPL_strsep(&str, ":|");
assert(0 == strcmp(next, "b")); assert(0 == strcmp(next, "b"));
next = MPL_strsep(&str, ":|"); next = MPL_strsep(&str, ":|");
assert(0 == strcmp(next, "c")); assert(0 == strcmp(next, "c"));
next = MPL_strsep(&str, ":|"); next = MPL_strsep(&str, ":|");
assert(next == NULL); assert(next == NULL);
assert(str == NULL); assert(str == NULL);
free(orig); MPL_free(orig);
orig = strdup("a|:b:c"); orig = MPL_strdup("a|:b:c");
str = orig; str = orig;
next = MPL_strsep(&str, ":|"); next = MPL_strsep(&str, ":|");
assert(next == orig); assert(next == orig);
assert(0 == strcmp(next, "a")); assert(0 == strcmp(next, "a"));
next = MPL_strsep(&str, ":|"); next = MPL_strsep(&str, ":|");
assert(0 == strcmp(next, "")); assert(0 == strcmp(next, ""));
next = MPL_strsep(&str, ":|"); next = MPL_strsep(&str, ":|");
assert(0 == strcmp(next, "b")); assert(0 == strcmp(next, "b"));
next = MPL_strsep(&str, ":|"); next = MPL_strsep(&str, ":|");
assert(0 == strcmp(next, "c")); assert(0 == strcmp(next, "c"));
next = MPL_strsep(&str, ":|"); next = MPL_strsep(&str, ":|");
assert(next == NULL); assert(next == NULL);
assert(str == NULL); assert(str == NULL);
free(orig); MPL_free(orig);
return 0; return 0;
} }
 End of changes. 8 change blocks. 
8 lines changed or deleted 8 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)