aboutsummaryrefslogtreecommitdiffstats
path: root/roms/skiboot/external/ffspart/test/tests/07-big-files
blob: f7a0064d900cc8887983d624aa96f44e87ec96c9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#! /bin/sh
touch $DATA_DIR/$CUR_TEST.gen

i=1;
while [ $i -lt 5 ] ; do
	j=0;
	while [ $j -lt $((0x101)) ] ; do
		echo -n "$i" >> $DATA_DIR/$CUR_TEST.$i;
		j=$(expr $j + 1);
	done
	sed -i "s|SEDCATCH_$i|$DATA_DIR\/$CUR_TEST.$i|" $DATA_DIR/$CUR_TEST.in
	i=$(expr $i + 1);
done

run_binary "./ffspart" "-s 0x100 -c 10 -i $DATA_DIR/$CUR_TEST.in -p $DATA_DIR/$CUR_TEST.gen"
if [ "$?" -eq 0 ] ; then
	fail_test
fi

sed -i "s|$DATA_DIR/$CUR_TEST.1|FILE_ONE|" "$STDERR_OUT"

sed -i "s|$DATA_DIR/$CUR_TEST.in|FILE|" "$STDERR_OUT"

diff_with_result

pass_test