Skip to content

Commit d1062c6

Browse files
committed
Update preprocessor test.
1 parent 82619a8 commit d1062c6

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

test/truffle/cexts/test-preprocess.rb

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,19 @@ def test_patch(file, directory, input, expected)
4040
char * message;
4141
VALUE ruby_message;
4242
43-
rb_funcall(doc, id_warning, 1, NOKOGIRI_STR_NEW2("Warning."));
43+
#ifdef NOKOGIRI_PACKAGED_LIBRARIES
44+
va_list args;
45+
va_start(args, msg);
46+
vasprintf(&message, msg, args);
47+
va_end(args);
48+
49+
ruby_message = NOKOGIRI_STR_NEW2(message);
50+
vasprintf_free(message);
51+
rb_funcall(doc, id_warning, 1, ruby_message);
52+
#else
53+
rb_funcall(doc, id_warning, 1, NOKOGIRI_STR_NEW2("Warning."));
54+
#endif
55+
4456
}
4557
EOF
4658

0 commit comments

Comments
 (0)