Skip to content

Commit

Permalink
Merge branch 'develop' into fix-683_bolnoclef
Browse files Browse the repository at this point in the history
* develop:
  Addeds test and expectations for note-in-same-glyph episema height fix. Tests the fix for gregorio-project/gregorio#693.
  Updated expectations to match the fix for gregorio-project/gregorio#675.
  Added gabc-to-gabc tests and expectations.
  Added support for gabc-to-gabc tests.
  Updated expectations to match changes for gregorio-project/gregorio#670.
  Updated test for biginitial style deprecation. Corresponds with changes for gregorio-project/gregorio#632.
  Updated tests and expectations for initial-style deprecation. Corresponds with changes for gregorio-project/gregorio#632.
  Added support for per-gabc-output-test preamble files.
  Updated expectations to match changes for gregorio-project/gregorio#632.
  Added a test for the forced initial hyphen. Corresponds with gregorio-project/gregorio#656. Tests the fix for gregorio-project/gregorio#653.
  Added tests and expectations corresponding to gregorio-project/gregorio#636. This tests the implementation of gregorio-project/gregorio#631.
  • Loading branch information
rpspringuel committed Dec 9, 2015
2 parents e170fd9 + 4cb9a62 commit 66c4a7c
Show file tree
Hide file tree
Showing 498 changed files with 2,077 additions and 2,387 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,12 @@ Requirements:

Notes:

The gabc file may be accompanied by a preamble file which can inject
additional TeX settings for processing. If provided, the preamble file
must be the gabc base filename with `-preamble.tex` appended. For
example, the preamble file for `mytest.gabc` should be named
`mytest-preamble.tex`.

The PDFs are compared by first converting the pages to PNG files with
imagemagick's convert and then compared using imagemagick's compare and
the AE metric.
Expand Down
1 change: 1 addition & 0 deletions gabc-output.tex
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
Ligatures = TeX
]{Alegreya}
\gresetnabcfont{gregall}{8}
###PREAMBLE###
\begin{document}
\gregorioscore[a]{###FILENAME###}
\end{document}
64 changes: 64 additions & 0 deletions harness.sh
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,63 @@ function gabc_dump_view_output {
}
register gabc_dump

function gabc_gabc_find {
find gabc-gabc -name '*.gabc' -print
}
function gabc_gabc_test {
filename="$1"
outfile="$filename.out"
logfile="$filename.log"
expfile="${filename%.gabc}.exp"

testing "$filename" "$filename.result" "gabc_gabc_clean '$filename'"

if gregorio -f gabc -F gabc -o "$outfile" -l "$logfile" "$filename"
then
${SED} -e 's/^\(% File generated by gregorio \).*/\1@/' \
-e 's/^\(generated-by: \).*;$/\1@;/' \
-e 's/^\(\GregorioTeXAPIVersion{\)[^}]*/\1@/' \
-e 's/^\(\GreBeginScore{\)[^}]*/\1@/' "$outfile" \
> "$outfile-"
$verify "$filename" && ${SED} \
-e 's/^\(% File generated by gregorio \).*/\1@/' \
-e 's/^\(generated-by: \).*;$/\1@;/' \
-e 's/^\(\GregorioTeXAPIVersion{\)[^}]*/\1@/' \
-e 's/^\(\GreBeginScore{\)[^}]*/\1@/' "$expfile" \
> "$expfile-"
maybe_run "$filename" diff -q "$outfile-" "$expfile-"
else
fail "Failed to compile" "Failed to compile $filename"
fi

return $RESULT
}
function gabc_gabc_clean {
filename="$1"
outfile="$filename.out"
expfile="${filename%.gabc}.exp"

$RM "$filename" "$filename.log" "$outfile" "$outfile-" "$expfile" \
"$expfile-"
}
function gabc_gabc_accept {
accept_result "$1" "$1.out" "$(basename "${1%.gabc}").exp"
}
function gabc_gabc_view_log {
view_text "$1.log"
}
function gabc_gabc_view_diff {
filename="$1"
diff_text "${filename%.gabc}.exp-" "$filename.out-"
}
function gabc_gabc_view_expected {
view_text "${1%.gabc}.exp-"
}
function gabc_gabc_view_output {
view_text "$filename.out-"
}
register gabc_gabc

function typeset_and_compare {
indir="$1"; shift
outdir="$1"; shift
Expand Down Expand Up @@ -389,9 +446,16 @@ function gabc_output_test {
else
debugarg=",debug=$GABC_OUTPUT_DEBUG"
fi
if test -f $filebase-preamble.tex
then
preamble="\\\\input{$filebase-preamble.tex}"
else
preamble=""
fi
if ${SED} -e "s/###FILENAME###/$filebase/" \
-e "s/###DEBUG###/$debugarg/" \
-e "s!###FONTDIR###!$testroot/fonts/!" \
-e "s/###PREAMBLE###/$preamble/" \
"$testroot/gabc-output.tex" >${texfile}
then
typeset_and_compare "$indir" "$outdir" "$texfile" latexmk -e 'push @generated_exts, "gaux";' -pdf -pdflatex='lualatex --shell-escape'
Expand Down
25 changes: 2 additions & 23 deletions tests/gabc-dump/PopulusSion.dump
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
date 2006
transcriber Elie Roux
transcription_date 2006
initial_style 1


=====================================================================
Expand All @@ -24,30 +23,10 @@
=====================================================================
type 9 (GRE_SYLLABLE)
position 1 (WORD_BEGINNING)
---------------------------------------------------------------------
beginning of style ST_INITIAL
---------------------------------------------------------------------
character P
---------------------------------------------------------------------
end of style ST_INITIAL
---------------------------------------------------------------------
beginning of style ST_CENTER
---------------------------------------------------------------------
beginning of style ST_FIRST_WORD
---------------------------------------------------------------------
beginning of style ST_FIRST_SYLLABLE
---------------------------------------------------------------------
beginning of style ST_FIRST_SYLLABLE_INITIAL
---------------------------------------------------------------------
character ó
---------------------------------------------------------------------
end of style ST_FIRST_SYLLABLE_INITIAL
---------------------------------------------------------------------
end of style ST_FIRST_SYLLABLE
---------------------------------------------------------------------
end of style ST_FIRST_WORD
---------------------------------------------------------------------
end of style ST_CENTER
---------------------------------------------------------------------
type 3 (GRE_ELEMENT)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Expand Down Expand Up @@ -317,11 +296,11 @@
type 9 (GRE_SYLLABLE)
position 3 (WORD_END)
---------------------------------------------------------------------
beginning of style ST_FORCED_CENTER
beginning of style ST_FORCED_CENTER
---------------------------------------------------------------------
character n
---------------------------------------------------------------------
end of style ST_FORCED_CENTER
end of style ST_FORCED_CENTER
---------------------------------------------------------------------
character u
---------------------------------------------------------------------
Expand Down
34 changes: 1 addition & 33 deletions tests/gabc-dump/bugs/fix-135.dump
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
SCORE INFOS
=====================================================================
number_of_voices 1
initial_style 1
name fix-135


=====================================================================
Expand All @@ -17,48 +17,16 @@
=====================================================================
type 9 (GRE_SYLLABLE)
position 1 (WORD_BEGINNING)
---------------------------------------------------------------------
beginning of style ST_INITIAL
---------------------------------------------------------------------
character P
---------------------------------------------------------------------
end of style ST_INITIAL
---------------------------------------------------------------------
beginning of style ST_FIRST_WORD
---------------------------------------------------------------------
beginning of style ST_FIRST_SYLLABLE
---------------------------------------------------------------------
beginning of style ST_SMALL_CAPS
---------------------------------------------------------------------
beginning of style ST_FIRST_SYLLABLE_INITIAL
---------------------------------------------------------------------
character r
---------------------------------------------------------------------
end of style ST_FIRST_SYLLABLE_INITIAL
---------------------------------------------------------------------
end of style ST_SMALL_CAPS
---------------------------------------------------------------------
end of style ST_FIRST_SYLLABLE
---------------------------------------------------------------------
end of style ST_FIRST_WORD
---------------------------------------------------------------------
beginning of style ST_CENTER
---------------------------------------------------------------------
beginning of style ST_FIRST_WORD
---------------------------------------------------------------------
beginning of style ST_FIRST_SYLLABLE
---------------------------------------------------------------------
beginning of style ST_SMALL_CAPS
---------------------------------------------------------------------
character i
---------------------------------------------------------------------
end of style ST_SMALL_CAPS
---------------------------------------------------------------------
end of style ST_FIRST_SYLLABLE
---------------------------------------------------------------------
end of style ST_FIRST_WORD
---------------------------------------------------------------------
end of style ST_CENTER
---------------------------------------------------------------------
type 3 (GRE_ELEMENT)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Expand Down
2 changes: 1 addition & 1 deletion tests/gabc-dump/bugs/fix-135.gabc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
%issue: #135
%notes: gregorio creates improper GregorioTeX for styles in the first syllable
initial-style: 1;
name: fix-135;
%%
(c4) P<sc>ri</sc>(f)<sc>mus</sc>(gh)
37 changes: 1 addition & 36 deletions tests/gabc-dump/bugs/fix-20.dump
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
SCORE INFOS
=====================================================================
number_of_voices 1
name fix-20


=====================================================================
Expand All @@ -16,44 +17,12 @@
=====================================================================
type 9 (GRE_SYLLABLE)
position 4 (WORD_ONE_SYLLABLE)
---------------------------------------------------------------------
beginning of style ST_FIRST_WORD
---------------------------------------------------------------------
beginning of style ST_FIRST_SYLLABLE
---------------------------------------------------------------------
beginning of style ST_INITIAL
---------------------------------------------------------------------
beginning of style ST_FIRST_SYLLABLE_INITIAL
---------------------------------------------------------------------
character s
---------------------------------------------------------------------
end of style ST_FIRST_SYLLABLE_INITIAL
---------------------------------------------------------------------
end of style ST_INITIAL
---------------------------------------------------------------------
character c
---------------------------------------------------------------------
end of style ST_FIRST_SYLLABLE
---------------------------------------------------------------------
end of style ST_FIRST_WORD
---------------------------------------------------------------------
beginning of style ST_CENTER
---------------------------------------------------------------------
beginning of style ST_FIRST_WORD
---------------------------------------------------------------------
beginning of style ST_FIRST_SYLLABLE
---------------------------------------------------------------------
character a
---------------------------------------------------------------------
end of style ST_FIRST_SYLLABLE
---------------------------------------------------------------------
end of style ST_FIRST_WORD
---------------------------------------------------------------------
end of style ST_CENTER
---------------------------------------------------------------------
beginning of style ST_FIRST_WORD
---------------------------------------------------------------------
beginning of style ST_FIRST_SYLLABLE
---------------------------------------------------------------------
character n
---------------------------------------------------------------------
Expand All @@ -66,10 +35,6 @@
character u
---------------------------------------------------------------------
character s
---------------------------------------------------------------------
end of style ST_FIRST_SYLLABLE
---------------------------------------------------------------------
end of style ST_FIRST_WORD
---------------------------------------------------------------------
type 3 (GRE_ELEMENT)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Expand Down
2 changes: 1 addition & 1 deletion tests/gabc-dump/bugs/fix-20.gabc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
%issue: 20
%notes: quilismapes-punctum is inccorectly determined to be a scandicus
initial-style: 0;
name: fix-20;
%%
(c3)
scandicus(ghi)
Expand Down
14 changes: 1 addition & 13 deletions tests/gabc-dump/bugs/fix-42-a.dump
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
SCORE INFOS
=====================================================================
number_of_voices 1
initial_style 1
name fix-42-a


=====================================================================
Expand All @@ -17,20 +17,8 @@
=====================================================================
type 9 (GRE_SYLLABLE)
position 1 (WORD_BEGINNING)
---------------------------------------------------------------------
beginning of style ST_CENTER
---------------------------------------------------------------------
beginning of style ST_FIRST_WORD
---------------------------------------------------------------------
beginning of style ST_INITIAL
---------------------------------------------------------------------
character A
---------------------------------------------------------------------
end of style ST_INITIAL
---------------------------------------------------------------------
end of style ST_FIRST_WORD
---------------------------------------------------------------------
end of style ST_CENTER
---------------------------------------------------------------------
type 3 (GRE_ELEMENT)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Expand Down
2 changes: 1 addition & 1 deletion tests/gabc-dump/bugs/fix-42-a.gabc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
%issue: #42
%notes: gregorio auto-centes the first syllable incorrectly
%notes: case: initial only
initial-style: 1;
name: fix-42-a;
%%
(c4) A(c)men(cd)
30 changes: 1 addition & 29 deletions tests/gabc-dump/bugs/fix-42-b.dump
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
SCORE INFOS
=====================================================================
number_of_voices 1
initial_style 1
name fix-42-b


=====================================================================
Expand All @@ -17,40 +17,12 @@
=====================================================================
type 9 (GRE_SYLLABLE)
position 1 (WORD_BEGINNING)
---------------------------------------------------------------------
beginning of style ST_INITIAL
---------------------------------------------------------------------
character P
---------------------------------------------------------------------
end of style ST_INITIAL
---------------------------------------------------------------------
beginning of style ST_FIRST_WORD
---------------------------------------------------------------------
beginning of style ST_FIRST_SYLLABLE
---------------------------------------------------------------------
beginning of style ST_FIRST_SYLLABLE_INITIAL
---------------------------------------------------------------------
character r
---------------------------------------------------------------------
end of style ST_FIRST_SYLLABLE_INITIAL
---------------------------------------------------------------------
end of style ST_FIRST_SYLLABLE
---------------------------------------------------------------------
end of style ST_FIRST_WORD
---------------------------------------------------------------------
beginning of style ST_CENTER
---------------------------------------------------------------------
beginning of style ST_FIRST_WORD
---------------------------------------------------------------------
beginning of style ST_FIRST_SYLLABLE
---------------------------------------------------------------------
character e
---------------------------------------------------------------------
end of style ST_FIRST_SYLLABLE
---------------------------------------------------------------------
end of style ST_FIRST_WORD
---------------------------------------------------------------------
end of style ST_CENTER
---------------------------------------------------------------------
type 3 (GRE_ELEMENT)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Expand Down
2 changes: 1 addition & 1 deletion tests/gabc-dump/bugs/fix-42-b.gabc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
%issue: #42
%notes: gregorio auto-centes the first syllable incorrectly
%notes: case: vowel after consonant after initial
initial-style: 1;
name: fix-42-b;
%%
(c4) Pre(d)ces(d)
Loading

0 comments on commit 66c4a7c

Please sign in to comment.