2008-04-29 12:55:25 +00:00
|
|
|
#include <qpdf/PCRE.hh>
|
|
|
|
#include <iostream>
|
2008-05-04 16:02:53 +00:00
|
|
|
#include <string.h>
|
2008-04-29 12:55:25 +00:00
|
|
|
|
|
|
|
int main(int argc, char* argv[])
|
|
|
|
{
|
|
|
|
if ((argc == 2) && (strcmp(argv[1], "--unicode-classes-supported") == 0))
|
|
|
|
{
|
|
|
|
try
|
|
|
|
{
|
|
|
|
PCRE("^([\\p{L}]+)", PCRE_UTF8);
|
|
|
|
std::cout << "1" << std::endl;
|
|
|
|
}
|
2013-02-25 15:28:34 +00:00
|
|
|
catch (std::exception&)
|
2008-04-29 12:55:25 +00:00
|
|
|
{
|
|
|
|
std::cout << "0" << std::endl;
|
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
if ((argc == 2) && (strcmp(argv[1], "--unicode-classes") == 0))
|
|
|
|
{
|
|
|
|
PCRE::test(1);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
PCRE::test();
|
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|