diff --git a/tests/comments-cmp.dts b/tests/comments-cmp.dts new file mode 100644 index 0000000..4ee9f52 --- /dev/null +++ b/tests/comments-cmp.dts @@ -0,0 +1,16 @@ +/dts-v1/; + +/ { + prop1; + prop2; + prop3; + prop4; + prop5; + prop6; + prop7; + prop8; + prop9; + prop10; + child { + }; +}; diff --git a/comment-test.dts b/tests/comments.dts similarity index 97% rename from comment-test.dts rename to tests/comments.dts index 0174347..0b04b6b 100644 --- a/comment-test.dts +++ b/tests/comments.dts @@ -1,5 +1,6 @@ /* regexps for lexing comments are.. tricky. Check if we've actually * got it right */ +/dts-v1/; / { // line comment diff --git a/tests/run_tests.sh b/tests/run_tests.sh index 02b1fb0..73b9d81 100755 --- a/tests/run_tests.sh +++ b/tests/run_tests.sh @@ -154,6 +154,10 @@ dtc_tests () { run_test dtc.sh -I dts -O dtb -o dtc_path-references.test.dtb path-references.dts run_test path-references dtc_path-references.test.dtb + run_test dtc.sh -I dts -O dtb -o dtc_comments.test.dtb comments.dts + run_test dtc.sh -I dts -O dtb -o dtc_comments-cmp.test.dtb comments-cmp.dts + run_test dtbs_equal_ordered dtc_comments.test.dtb dtc_comments-cmp.test.dtb + # Check -Odts mode preserve all dtb information for tree in test_tree1.dtb dtc_tree1.test.dtb dtc_escapes.test.dtb ; do run_test dtc.sh -I dtb -O dts -o odts_$tree.test.dts $tree