| Line |   | 
|---|
| 1 | #!/bin/sh
 | 
|---|
| 2 | # Test conditional text.
 | 
|---|
| 3 | 
 | 
|---|
| 4 | unset TEXINFO_OUTPUT
 | 
|---|
| 5 | : ${srcdir=.}
 | 
|---|
| 6 | 
 | 
|---|
| 7 | # Default Info output.
 | 
|---|
| 8 | ../makeinfo -o cond.out $srcdir/cond.txi || exit 1
 | 
|---|
| 9 | egrep 'This is (ifnothtml|ifinfo|ifnottex) text' cond.out >/dev/null \
 | 
|---|
| 10 |   || exit 2
 | 
|---|
| 11 | test `fgrep ' text.' cond.out | wc -l` -eq 3 || exit 3
 | 
|---|
| 12 | 
 | 
|---|
| 13 | # Default HTML output.
 | 
|---|
| 14 | ../makeinfo --no-split --html -o cond.out $srcdir/cond.txi || exit 1
 | 
|---|
| 15 | egrep 'This is (html|ifhtml|ifnotinfo|ifnottex) text' cond.out >/dev/null \
 | 
|---|
| 16 |  || exit 2
 | 
|---|
| 17 | test `fgrep ' text.' cond.out | wc -l` -eq 4 || exit 3
 | 
|---|
| 18 | 
 | 
|---|
| 19 | # --ifhtml off, --ifinfo off, --iftex off.
 | 
|---|
| 20 | ../makeinfo --no-ifhtml --no-ifinfo --no-iftex -o cond.out $srcdir/cond.txi || exit 1
 | 
|---|
| 21 | egrep 'This is ifnot(html|info|tex) text' cond.out >/dev/null \
 | 
|---|
| 22 |  || exit 2
 | 
|---|
| 23 | test `fgrep ' text.' cond.out | wc -l` -eq 3 || exit 3
 | 
|---|
| 24 | 
 | 
|---|
| 25 | # Do we really need to test all the other permutations?
 | 
|---|
| 26 | 
 | 
|---|
| 27 | # --ifhtml on, --ifinfo on, --iftex on.
 | 
|---|
| 28 | ../makeinfo --ifhtml --ifinfo --iftex -o cond.out $srcdir/cond.txi || exit 1
 | 
|---|
| 29 | egrep 'This is (html|ifhtml|ifinfo|tex|iftex) text' cond.out >/dev/null \
 | 
|---|
| 30 |  || exit 2
 | 
|---|
| 31 | test `fgrep ' text.' cond.out | wc -l` -eq 5 || exit 3
 | 
|---|
| 32 | 
 | 
|---|
| 33 | rm -f cond.out cond.info
 | 
|---|
       
      
  Note:
 See   
TracBrowser
 for help on using the repository browser.