summaryrefslogtreecommitdiffstats
path: root/contrib/libucl/tests/test_basic.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/libucl/tests/test_basic.c')
-rw-r--r--contrib/libucl/tests/test_basic.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/contrib/libucl/tests/test_basic.c b/contrib/libucl/tests/test_basic.c
index 641679f..0834728 100644
--- a/contrib/libucl/tests/test_basic.c
+++ b/contrib/libucl/tests/test_basic.c
@@ -21,10 +21,8 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <stdio.h>
-#include <errno.h>
-#include <unistd.h>
#include "ucl.h"
+#include "ucl_internal.h"
int
main (int argc, char **argv)
@@ -97,7 +95,7 @@ main (int argc, char **argv)
else {
out = stdout;
}
- if (ucl_parser_get_error(parser) != NULL) {
+ if (ucl_parser_get_error (parser) != NULL) {
fprintf (out, "Error occurred: %s\n", ucl_parser_get_error(parser));
ret = 1;
goto end;
@@ -112,7 +110,7 @@ main (int argc, char **argv)
ucl_parser_free (parser);
ucl_object_unref (obj);
parser2 = ucl_parser_new (UCL_PARSER_KEY_LOWERCASE);
- ucl_parser_add_chunk (parser2, emitted, strlen (emitted));
+ ucl_parser_add_string (parser2, emitted, 0);
if (ucl_parser_get_error(parser2) != NULL) {
fprintf (out, "Error occurred: %s\n", ucl_parser_get_error(parser2));
OpenPOWER on IntegriCloud