aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2019-04-19 02:21:54 +0300
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2019-04-19 02:21:54 +0300
commit54a5a4267090bb80d3337f1aa7419c8ba49c30b7 (patch)
tree0bf93b0b4225664adc421b2c8b27171f00cc3a76 /Makefile
parent57e82811588e37b247ece678f503655bd06aa090 (diff)
downloadopenrussian-cli-54a5a4267090bb80d3337f1aa7419c8ba49c30b7.tar.gz
make check: test page generation for all words; various fixes
* using the new `make check` target various bugs have been discovered. All of them were related to missing database fields.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile8
1 files changed, 8 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index a6b777f..55f7bf2 100644
--- a/Makefile
+++ b/Makefile
@@ -28,6 +28,14 @@ openrussian-sqlite3.db : openrussian-sql.zip mysql2sqlite postprocess.sql
unzip -p $< openrussian.sql | ./mysql2sqlite - | sqlite3 $@
sqlite3 $@ -batch <postprocess.sql
+# Try to generate all possible pages
+check : openrussian-sqlite3.db openrussian
+ sqlite3 $< 'SELECT bare FROM words WHERE LIKELY(disabled = 0)' | \
+ while read -r bare; do \
+ ./openrussian -V -p "$$bare" </dev/null >/dev/null || \
+ echo "Error generating \"$$bare\"" >/dev/stderr; \
+ done
+
# NOTE: Installation of the Bash completions depends on the Debain bash-completion
# package being installed or something similar
install : openrussian openrussian-sqlite3.db openrussian-completion.bash