3 #include "ui/syntax-gen.h"
8 test_runner (const char *format, ...)
12 va_start (args, format);
14 ds_init_empty (&syntax);
16 syntax_gen_pspp_valist (&syntax, format, args);
20 puts (ds_cstr (&syntax));
28 test_runner ("A simple string: %ssEND", "Hello world");
29 test_runner ("A syntax string: %sqEND", "Hello world");
30 test_runner ("A syntax string containing \": %sqEND", "here\"is the quote");
31 test_runner ("A syntax string containing non-printables: %sqEND", "A CtrlL
\fchar");
32 test_runner ("An integer: %dEND", 98765);
33 test_runner ("A floating point number: %gEND", 3.142);
34 test_runner ("A floating point number with default precision: %fEND", 1.234);
35 test_runner ("A floating point number with given precision: %.20fEND", 1.234);
36 test_runner ("A literal %%");
38 test_runner ("and %ss a %sq of %d different %f examples %g of 100%% conversions.",
39 "finally", "concatination", 6, 20.309, 23.09);