OSDN Git Service

re-applied the correct DJGPP patch. Thanks to Doug Kaufman.
[lha/lha.git] / tests / lha-test12
1 # -*- shell-script -*-
2 message testing the end of line conversion.
3
4 # LF to CR LF in archive
5 $lha ct test-tmp-crlf.lzh test-a test-b test-c
6                                                         check $? $LINENO
7 # no convert
8 $lha xw=test-tmp-crlf test-tmp-crlf.lzh
9                                                         check $? $LINENO
10 # use GNU diff option --binary for DJGPP.
11 case `$lha --version 2>&1` in
12 *msdosdjgpp*)
13 diff -r --binary test-1 test-tmp-crlf
14   ;;
15 *)
16 diff -r test-1 test-tmp-crlf
17   ;;
18 esac
19 test $? -ne 0
20                                                         check $? $LINENO
21 sed -e 's/$/
22 /' < test-a | diff test-tmp-crlf/test-a -
23                                                         check $? $LINENO
24 sed -e 's/$/
25 /' < test-b | diff test-tmp-crlf/test-b -
26                                                         check $? $LINENO
27 sed -e 's/$/
28 /' < test-c | diff test-tmp-crlf/test-c -
29                                                         check $? $LINENO
30 # CR LF to LF
31 $lha xtw=test-tmp-nl test-tmp-crlf.lzh
32                                                         check $? $LINENO
33 diff -r test-1 test-tmp-nl
34                                                         check $? $LINENO
35 # no convert
36 $lha c test-tmp-nl.lzh test-a test-b test-c
37                                                         check $? $LINENO
38 # CR LF to LF (cannot convert)
39 $lha xtw=test-tmp-nl2 test-tmp-nl.lzh
40                                                         check $? $LINENO
41 diff -r test-1 test-tmp-nl2
42                                                         check $? $LINENO