diff options
author | Baptiste Daroussin <bapt@FreeBSD.org> | 2018-09-20 10:58:52 +0000 |
---|---|---|
committer | Baptiste Daroussin <bapt@FreeBSD.org> | 2018-09-20 10:58:52 +0000 |
commit | 61d06d6bd19dafe8ea971dd43e8328fa1b473456 (patch) | |
tree | a3ce8735e57dbd7f659654ed712254f1831ec3eb /contrib/mandoc/test-rewb-bsd.c | |
parent | d465a4b0b320af2d6a3d09ad792f9b84fe2707f3 (diff) | |
parent | 1f1d4007ae66645e397e325b72643166dc3c1efe (diff) | |
download | src-61d06d6bd19dafe8ea971dd43e8328fa1b473456.tar.gz src-61d06d6bd19dafe8ea971dd43e8328fa1b473456.zip |
Import mandoc 1.14.4
Approved by: re (kib)
MFC after: 1 week
Notes
Notes:
svn path=/head/; revision=338826
Diffstat (limited to 'contrib/mandoc/test-rewb-bsd.c')
-rw-r--r-- | contrib/mandoc/test-rewb-bsd.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/contrib/mandoc/test-rewb-bsd.c b/contrib/mandoc/test-rewb-bsd.c new file mode 100644 index 000000000000..872dd4c81d02 --- /dev/null +++ b/contrib/mandoc/test-rewb-bsd.c @@ -0,0 +1,27 @@ +#include <sys/types.h> +#include <stddef.h> +#include <regex.h> + +int +main(void) +{ + regex_t re; + + if (regcomp(&re, "[[:<:]]word[[:>:]]", REG_EXTENDED | REG_NOSUB)) + return 1; + if (regexec(&re, "the word is here", 0, NULL, 0)) + return 2; + if (regexec(&re, "same word", 0, NULL, 0)) + return 3; + if (regexec(&re, "word again", 0, NULL, 0)) + return 4; + if (regexec(&re, "word", 0, NULL, 0)) + return 5; + if (regexec(&re, "wordy", 0, NULL, 0) != REG_NOMATCH) + return 6; + if (regexec(&re, "sword", 0, NULL, 0) != REG_NOMATCH) + return 7; + if (regexec(&re, "reworded", 0, NULL, 0) != REG_NOMATCH) + return 8; + return 0; +} |