1#!/bin/sh 2 3# 4# Test that listing tasks works the framed way 5# 6 7. "$(cd "$(dirname "$0")" && pwd)/common.sh" 8 9EXPECTED_OUTPUT=$WORK/expected_output 10ACTUAL_OUTPUT=$WORK/actual_output 11 12cat >$CONFIG <<EOF 13task complete { 14} 15task task2 { 16} 17task task3 { 18} 19task task4 { 20} 21EOF 22 23cat >$EXPECTED_OUTPUT <<EOF 24complete 25task2 26task3 27task4 28EOF 29 30cat >$EXPECTED_OUTPUT.type << EOF 31OK 32EOF 33 34$FWUP_CREATE -c -f $CONFIG -o $FWFILE 35$FWUP_APPLY_NO_CHECK -i $FWFILE --list --framing > $ACTUAL_OUTPUT 36 37# Verify and removing framing 38cat $ACTUAL_OUTPUT | $FRAMING_HELPER -d > $ACTUAL_OUTPUT.noframing 39 40# Check the textual component 41cat $ACTUAL_OUTPUT.noframing | (dd bs=1 skip=4 2>/dev/null) > $ACTUAL_OUTPUT.trimmed 42diff -w $EXPECTED_OUTPUT $ACTUAL_OUTPUT.trimmed 43 44# Check the type 45cat $ACTUAL_OUTPUT.noframing | (dd bs=1 count=2 2>/dev/null) > $ACTUAL_OUTPUT.type 46diff -w $EXPECTED_OUTPUT.type $ACTUAL_OUTPUT.type 47