-
Notifications
You must be signed in to change notification settings - Fork 1
/
_Test6.bat
67 lines (56 loc) · 2.91 KB
/
_Test6.bat
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
echo off
echo "Testing Sorting"
del \tmp\tmp.*
echo "Test: Insertion Sort: not same order as schema: string, first element"
java epipog -i tests\6.txt -Scountry:string32,state:string32,city:string32,pop:integer,census:date
IF %ERRORLEVEL% NEQ 0 ( echo FAILED rc ) else ( echo PASSED )
java epipog -s "city,state" -o city >stdout
IF %ERRORLEVEL% NEQ 0 ( echo FAILED rc ) else ( echo PASSED )
fc stdout tests\6a.cmp >tmp
IF %ERRORLEVEL% NEQ 0 ( echo FAILED cmp ) else ( echo PASSED )
echo "Test: Insertion Sort: not same order as schema: string, second element"
java epipog -s "city,state" -o state >stdout
IF %ERRORLEVEL% NEQ 0 ( echo FAILED rc ) else ( echo PASSED )
fc stdout tests\6b.cmp >tmp
IF %ERRORLEVEL% NEQ 0 ( echo FAILED cmp ) else ( echo PASSED )
echo "Test: Insertion Sort: not same order as schema: integer"
java epipog -s "city,pop,census" -o pop >stdout
IF %ERRORLEVEL% NEQ 0 ( echo FAILED rc ) else ( echo PASSED )
fc stdout tests\6c.cmp >tmp
IF %ERRORLEVEL% NEQ 0 ( echo FAILED cmp ) else ( echo PASSED )
echo "Test: Insertion Sort: not same order as schema: date"
java epipog -s "city,pop,census" -o census >stdout
IF %ERRORLEVEL% NEQ 0 ( echo FAILED rc ) else ( echo PASSED )
fc stdout tests\6d.cmp >tmp
IF %ERRORLEVEL% NEQ 0 ( echo FAILED cmp ) else ( echo PASSED )
echo "Test: Insertion Sort: key not in results"
java epipog -s "city,state" -o pop 2>stderr
IF %ERRORLEVEL% NEQ 1 ( echo FAILED rc ) else ( echo PASSED )
find "Sort key not in result: pop" stderr >tmp
if %ERRORLEVEL% NEQ 0 ( echo FAILED stderr ) else ( echo PASSED )
echo "Test: Quick Sort: not same order as schema: string, first element"
java epipog -s "city,state" -o city -O quick >stdout
IF %ERRORLEVEL% NEQ 0 ( echo FAILED rc ) else ( echo PASSED )
fc stdout tests\6a.cmp >tmp
IF %ERRORLEVEL% NEQ 0 ( echo FAILED cmp ) else ( echo PASSED )
echo "Test: Quick Sort: not same order as schema: string, second element"
java epipog -s "city,state" -o state -O quick >stdout
IF %ERRORLEVEL% NEQ 0 ( echo FAILED rc ) else ( echo PASSED )
fc stdout tests\6e.cmp >tmp
IF %ERRORLEVEL% NEQ 0 ( echo FAILED cmp ) else ( echo PASSED )
echo "Test: Quick Sort: not same order as schema: integer"
java epipog -s "city,pop,census" -o pop -O quick >stdout
IF %ERRORLEVEL% NEQ 0 ( echo FAILED rc ) else ( echo PASSED )
fc stdout tests\6c.cmp >tmp
IF %ERRORLEVEL% NEQ 0 ( echo FAILED cmp ) else ( echo PASSED )
echo "Test: Quick Sort: not same order as schema: date"
java epipog -s "city,pop,census" -o census -O quick >stdout
IF %ERRORLEVEL% NEQ 0 ( echo FAILED rc ) else ( echo PASSED )
fc stdout tests\6f.cmp >tmp
IF %ERRORLEVEL% NEQ 0 ( echo FAILED cmp ) else ( echo PASSED )
echo "Test: Quick Sort: key not in results"
java epipog -s "city,state" -o pop -O quick 2>stderr
IF %ERRORLEVEL% NEQ 1 ( echo FAILED rc ) else ( echo PASSED )
find "Sort key not in result: pop" stderr >tmp
if %ERRORLEVEL% NEQ 0 ( echo FAILED stderr ) else ( echo PASSED )
del tmp stdout stderr