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