| 44 |
#include "pcre_stringpiece.h" |
#include "pcre_stringpiece.h" |
| 45 |
#include "pcre_scanner.h" |
#include "pcre_scanner.h" |
| 46 |
|
|
|
#ifdef HAVE_WINDOWS_H |
|
|
# define snprintf _snprintf |
|
|
#endif |
|
|
|
|
| 47 |
#define FLAGS_unittest_stack_size 49152 |
#define FLAGS_unittest_stack_size 49152 |
| 48 |
|
|
| 49 |
// Dies with a fatal error if the two values are not equal. |
// Dies with a fatal error if the two values are not equal. |
| 128 |
static void TestBigComment() { |
static void TestBigComment() { |
| 129 |
string input; |
string input; |
| 130 |
for (int i = 0; i < 1024; ++i) { |
for (int i = 0; i < 1024; ++i) { |
| 131 |
char buf[1024]; |
char buf[1024]; // definitely big enough |
| 132 |
snprintf(buf, sizeof(buf), " # Comment %d\n", i); |
sprintf(buf, " # Comment %d\n", i); |
| 133 |
input += buf; |
input += buf; |
| 134 |
} |
} |
| 135 |
input += "name = value;\n"; |
input += "name = value;\n"; |