-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
363caad
commit 017f172
Showing
3 changed files
with
54 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,58 +1,15 @@ | ||
#!/bin/sh | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
mkdir -p build | ||
cd build | ||
cd build || exit 1 | ||
cmake .. | ||
make | ||
ctest -V | ||
|
||
echo 'inline' | ||
echo '\sin y' | ./mtex2MML --inline | grep "display='inline'" || exit 1 | ||
echo '' | ||
|
||
echo 'display' | ||
echo '\sin y' | ./mtex2MML --display | grep "display='block'" || exit 1 | ||
echo '' | ||
|
||
echo 'inline print-mtex' | ||
echo '\sin y' | ./mtex2MML --inline --print-mtex | grep '$\\sin y\$'|| exit 1 | ||
echo '' | ||
|
||
echo 'display print-mtex' | ||
echo '\sin y' | ./mtex2MML --display --print-mtex | grep '$$\\sin y\$\$' || exit 1 | ||
echo '' | ||
|
||
echo 'dollar' | ||
echo '$\sin y$' | ./mtex2MML | grep "display='inline'" || exit 1 | ||
|
||
echo 'double dollar' | ||
echo '$$\sin y$$' | ./mtex2MML | grep "display='block'" || exit 1 | ||
|
||
echo 'parens' | ||
echo '\(\sin y\)' | ./mtex2MML | grep "display='inline'" || exit 1 | ||
|
||
echo 'brackets' | ||
echo '\[\sin y\]' | ./mtex2MML | grep "display='block'" || exit 1 | ||
|
||
echo 'dollar use-dollar' | ||
echo '$\sin y$' | ./mtex2MML --use-dollar | grep "display='inline'" || exit 1 | ||
|
||
echo 'double dollar use-double' | ||
echo '$$\sin y$$' | ./mtex2MML --use-double | grep "display='block'" || exit 1 | ||
|
||
echo 'parens use-parens' | ||
echo '\(\sin y\)' | ./mtex2MML --use-parens | grep "display='inline'" || exit 1 | ||
|
||
echo 'brackets use-brackets' | ||
echo '\[\sin y\]' | ./mtex2MML --use-brackets | grep "display='block'" || exit 1 | ||
|
||
echo 'env use-env' | ||
echo '\\begin{align}3x + 9y &= -12\\end{align}' | ./mtex2MML --use-env | grep "display='block'" || exit 1 | ||
|
||
echo 'DONE with command check' | ||
|
||
if [ -n "$CI" ]; then | ||
if [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]; then | ||
if [[ "$(uname -s)" == "Linux" ]] ; then | ||
make memcheck | ||
fi | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
echo 'inline' | ||
echo '\sin y' | ./mtex2MML --inline | grep "display='inline'" || exit 1 | ||
echo '' | ||
|
||
echo 'display' | ||
echo '\sin y' | ./mtex2MML --display | grep "display='block'" || exit 1 | ||
echo '' | ||
|
||
echo 'inline print-mtex' | ||
echo '\sin y' | ./mtex2MML --inline --print-mtex | grep '$\\sin y\$'|| exit 1 | ||
echo '' | ||
|
||
echo 'display print-mtex' | ||
echo '\sin y' | ./mtex2MML --display --print-mtex | grep '$$\\sin y\$\$' || exit 1 | ||
echo '' | ||
|
||
echo 'dollar' | ||
echo '$\sin y$' | ./mtex2MML | grep "display='inline'" || exit 1 | ||
|
||
echo 'double dollar' | ||
echo '$$\sin y$$' | ./mtex2MML | grep "display='block'" || exit 1 | ||
|
||
echo 'parens' | ||
echo '\(\sin y\)' | ./mtex2MML | grep "display='inline'" || exit 1 | ||
|
||
echo 'brackets' | ||
echo '\[\sin y\]' | ./mtex2MML | grep "display='block'" || exit 1 | ||
|
||
echo 'dollar use-dollar' | ||
echo '$\sin y$' | ./mtex2MML --use-dollar | grep "display='inline'" || exit 1 | ||
|
||
echo 'double dollar use-double' | ||
echo '$$\sin y$$' | ./mtex2MML --use-double | grep "display='block'" || exit 1 | ||
|
||
echo 'parens use-parens' | ||
echo '\(\sin y\)' | ./mtex2MML --use-parens | grep "display='inline'" || exit 1 | ||
|
||
echo 'brackets use-brackets' | ||
echo '\[\sin y\]' | ./mtex2MML --use-brackets | grep "display='block'" || exit 1 | ||
|
||
echo 'env use-env' | ||
echo '\\begin{align}3x + 9y &= -12\\end{align}' | ./mtex2MML --use-env | grep "display='block'" || exit 1 | ||
|
||
echo 'DONE with command check' |