-
Notifications
You must be signed in to change notification settings - Fork 2
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
Showing
5 changed files
with
54 additions
and
8 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
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 |
---|---|---|
|
@@ -14,7 +14,7 @@ | |
|
||
## You should have received a copy of the GNU General Public License | ||
## along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
AC_INIT([giella-core], [1.0.3], [[email protected]], [giella-core], [https://github.com/giellalt/giella-core]) | ||
AC_INIT([giella-core], [1.0.4], [[email protected]], [giella-core], [https://github.com/giellalt/giella-core]) | ||
AC_REVISION([$Revision$]) | ||
AC_CONFIG_AUX_DIR([build-aux]) | ||
AM_INIT_AUTOMAKE([1.9 tar-pax -Wall -Werror foreign]) | ||
|
@@ -96,6 +96,8 @@ AC_CONFIG_FILES([scripts/generate-lemmas.sh], | |
[chmod +x scripts/generate-lemmas.sh]) | ||
AC_CONFIG_FILES([scripts/accept-all-lemmas.sh], | ||
[chmod +x scripts/accept-all-lemmas.sh]) | ||
AC_CONFIG_FILES([scripts/tag_test.sh], | ||
[chmod +x scripts/tag_test.sh]) | ||
|
||
AC_OUTPUT | ||
|
||
|
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 |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# Check if there are tags which are not declared in root.lexc or if | ||
# tags are misspelled. | ||
# | ||
# Exit with 0 if and only if all tests pass. | ||
|
||
if test $# != 1 ; then | ||
echo "Usage: $0 lexicon.lexc" | ||
exit 1 | ||
fi | ||
if ! test -f "$1" ; then | ||
echo "missing combined lexicon $1" | ||
exit 2 | ||
fi | ||
|
||
lexctags=$(mktemp -t giella-tag_test.lexc.XXXXXXXXXXX) | ||
roottags=$(mktemp -t giella-tag_test.root.XXXXXXXXXXX) | ||
|
||
# Get giella-core from the test environment: | ||
giella_core=$GIELLA_CORE | ||
|
||
# Extract USED tags: | ||
sed -e '1,/LEXICON Root/d' < "$1" | # Extract all lines after LEXICON Root | ||
"${giella_core}"/scripts/extract-used-tags.sh | | ||
LC_ALL=no_NO.UTF8 sort -u \ | ||
> "${lexctags}" | ||
|
||
# Extract DEFINED tags: | ||
sed -n '/LEXICON Root/q;p' < "$1" | # Extract all lines before LEXICON Root | ||
"${giella_core}"/scripts/extract-defined-tags.sh | | ||
LC_ALL=no_NO.UTF8 sort -u \ | ||
> "${roottags}" | ||
|
||
# Compare the two sets of tags, report and fail if there is a diff: | ||
check=$(LC_ALL=no_NO.UTF8 comm -23 "${lexctags}" "${roottags}") | ||
if [[ -n "${check}" ]]; then | ||
echo "FAIL: Have a look at these:" | ||
echo "${check}" | ||
exit 1 | ||
else | ||
echo "PASS: No errors found." | ||
fi | ||
|