source: test/diff-reglookup@ 181

Last change on this file since 181 was 174, checked in by tim, 15 years ago

minor improvements to test scripts

  • Property svn:executable set to *
File size: 811 bytes
Line 
1#!/bin/sh
2
3mkdir -p tmp
4TMP_DIR=tmp
5OUTPUT_DIR=tmp
6
7OLD=reglookup
8NEW=../trunk/build/bin/reglookup
9
10
11compareOneFile()
12{
13 echo "Comparing output on $BNAME, test case: $CASE" 1>&2
14
15 echo " $OLD $OPTS $F" 1>&2
16 $OLD $OPTS $F > $TMP_DIR/old.csv
17
18 echo " $NEW $OPTS $F" 1>&2
19 $NEW $OPTS $F > $TMP_DIR/new.csv
20
21 diff -ud $TMP_DIR/old.csv $TMP_DIR/new.csv > $OUTPUT_DIR/$CASE-${BNAME}.diff
22 SIZE=`stat -c '%s' $OUTPUT_DIR/$CASE-${BNAME}.diff`
23 if [ "x$SIZE" = "x0" ]; then
24 rm $OUTPUT_DIR/$CASE-${BNAME}.diff
25 fi
26}
27
28for F in hives/*; do
29{
30 BNAME=`basename $F`
31
32 CASE=basic
33 OPTS=''
34 compareOneFile
35
36 CASE=security
37 OPTS='-s'
38 compareOneFile
39
40 CASE=type
41 OPTS='-t MULTI_SZ'
42 compareOneFile
43
44 CASE=security+type
45 OPTS='-s -t KEY'
46 compareOneFile
47} done
48
49rm $TMP_DIR/old.csv $TMP_DIR/new.csv
Note: See TracBrowser for help on using the repository browser.