From 35e735ae24ebb3c49b96b4824c0ff9a46301e9b7 Mon Sep 17 00:00:00 2001 From: Joel Stanley Date: Thu, 29 Nov 2018 10:31:53 +1030 Subject: ffspart: Add toc test This test specifies a toc in the configuration file. There are no tests or documentation for the toc syntax, so this exists to describe how specify a toc. Signed-off-by: Joel Stanley Signed-off-by: Stewart Smith --- external/ffspart/test/files/17-toc.in | 5 +++++ external/ffspart/test/files/17-toc.out | Bin 0 -> 2560 bytes external/ffspart/test/tests/17-toc | 15 +++++++++++++++ 3 files changed, 20 insertions(+) create mode 100644 external/ffspart/test/files/17-toc.in create mode 100644 external/ffspart/test/files/17-toc.out create mode 100644 external/ffspart/test/tests/17-toc (limited to 'external') diff --git a/external/ffspart/test/files/17-toc.in b/external/ffspart/test/files/17-toc.in new file mode 100644 index 00000000..6020e0fe --- /dev/null +++ b/external/ffspart/test/files/17-toc.in @@ -0,0 +1,5 @@ +@0,0x0, +ONE,0x00400,0x00000100,EL,,/dev/zero +TWO,0x00500,0x00000100,EF,,/dev/zero +THREE,0x600,0x00000100,EF,,/dev/zero +FOUR,0x0700,0x00000100,EF,,/dev/zero diff --git a/external/ffspart/test/files/17-toc.out b/external/ffspart/test/files/17-toc.out new file mode 100644 index 00000000..e00fa5c0 Binary files /dev/null and b/external/ffspart/test/files/17-toc.out differ diff --git a/external/ffspart/test/tests/17-toc b/external/ffspart/test/tests/17-toc new file mode 100644 index 00000000..e7783394 --- /dev/null +++ b/external/ffspart/test/tests/17-toc @@ -0,0 +1,15 @@ +#! /bin/sh + +touch $DATA_DIR/$CUR_TEST.gen + +run_binary "./ffspart" "-s 0x100 -c 10 -i $DATA_DIR/$CUR_TEST.in -p $DATA_DIR/$CUR_TEST.gen" +if [ "$?" -ne 0 ] ; then + fail_test +fi + +if ! cmp -n $((0x100)) $DATA_DIR/$CUR_TEST.out $DATA_DIR/$CUR_TEST.gen ; then + echo "Output differs" + fail_test +fi + +pass_test -- cgit v1.2.1