1 // SPDX-License-Identifier: LGPL-2.1-or-later
2 /*
3  * libfdt - Flat Device Tree manipulation
4  *	Testcase for string escapes in dtc
5  * Copyright (C) 2006 David Gibson, IBM Corporation.
6  */
7 #include <stdlib.h>
8 #include <stdio.h>
9 #include <string.h>
10 #include <stdint.h>
11 
12 #include <libfdt.h>
13 
14 #include "tests.h"
15 #include "testdata.h"
16 
main(int argc,char * argv[])17 int main(int argc, char *argv[])
18 {
19 	void *fdt;
20 
21 	test_init(argc, argv);
22 	fdt = load_blob_arg(argc, argv);
23 
24 	check_getprop(fdt, 0, "escape-str",
25 		      strlen(TEST_STRING_2)+1, TEST_STRING_2);
26 	check_getprop(fdt, 0, "escape-str-2",
27 		      strlen(TEST_STRING_3)+1, TEST_STRING_3);
28 
29 	PASS();
30 }
31