-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.bat
62 lines (54 loc) · 1.26 KB
/
test.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
@echo off
cell.exe -to "thisFileIsCreated.xlsx" "exit(1)"
if %ERRORLEVEL% neq 1 (
@echo on
echo "exit status is wrong. want 1, but got " %ERRORLEVEL%
exit /B 1
)
cell.exe -to "thisFileIsNotCreated.xlsx" "abort(2)"
if %ERRORLEVEL% neq 2 (
@echo on
echo "exit status is wrong. want 2, but got" %ERRORLEVEL%
exit /B 1
)
if exist "thisFileIsNotCreated.xlsx" (
@echo on
echo "the file specified by 'to' option exists even through program aborted by abort()."
exit /B 1
)
cell.exe -f test/prog.cell
if %ERRORLEVEL% neq 4 (
@echo on
echo "-f option could not working"
exit /B 1
)
cell.exe "gets();ret+=$1;gets();ret+=$1;exit(ret);" test/data1.txt test/data2.txt
if %ERRORLEVEL% neq 6 (
@echo on
echo "file args could not working"
exit /B 1
)
cell.exe -F ":" "exit(FS eq ':')"
if %ERRORLEVEL% neq 1 (
@echo on
echo "option -F could not working"
exit /B 1
)
cell.exe -s 3 "exit(SER)"
if %ERRORLEVEL% neq 3 (
@echo on
echo "option -s could not working"
exit /B 1
)
cell.exe -S Sheet2 "exit(@ eq 'Sheet2')"
if %ERRORLEVEL% neq 1 (
@echo on
echo "option -S could not working"
exit /B 1
)
cell.exe -f test/read.cell test/data1.txt test/data2.txt
if %ERRORLEVEL% neq 6 (
@echo on
echo "option -f with file specify could not working"
exit /B 1
)