Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added tests for better code coverage. #119

Merged
merged 1 commit into from
Jan 31, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions harness.sh
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,8 @@ function gabc_gtex_test {

testing "$filename" "$filename.result" "gabc_gtex_clean '$filename'"

if eval $gregorio -f gabc -F gtex -o "$outfile" -l "$logfile" "$filename"
export TEXINPUTS="$(dirname "$filename"):"
if eval $gregorio -W -f gabc -F gtex -o "$outfile" -l "$logfile" "$filename"
then
${SED} -e 's/^\(% File generated by gregorio \).*/\1@/' \
-e 's/\(\GregorioTeXAPIVersion{\)[^}]\+/\1@/' \
Expand Down Expand Up @@ -271,7 +272,8 @@ function gabc_dump_test {

testing "$filename" "$filename.result" "gabc_dump_clean '$filename'"

if eval $gregorio -f gabc -F dump -o "$outfile" -l "$logfile" "$filename"
export TEXINPUTS="$(dirname "$filename"):"
if eval $gregorio -W -f gabc -F dump -o "$outfile" -l "$logfile" "$filename"
then
${SED} -e 's/[0-9]\+\( (\(GRE\|S\|G\|L\|SP\|\)_\)/@\1/' "$outfile" \
> "$outfile-"
Expand Down Expand Up @@ -322,7 +324,8 @@ function gabc_gabc_test {

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

if eval $gregorio -f gabc -F gabc -o "$outfile" -l "$logfile" "$filename"
export TEXINPUTS="$(dirname "$filename"):"
if eval $gregorio -W -f gabc -F gabc -o "$outfile" -l "$logfile" "$filename"
then
${SED} -e 's/^\(% File generated by gregorio \).*/\1@/' \
-e 's/^\(generated-by: \).*;$/\1@;/' \
Expand Down
1,843 changes: 1,843 additions & 0 deletions tests/gabc-dump/FactusEst.dump

Large diffs are not rendered by default.

16 changes: 16 additions & 0 deletions tests/gabc-dump/FactusEst.gabc
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Factus est cum Alleluia;
office-part: Communio;
mode: 7;
book: Graduale Romanum, 1961, p. 296;
transcriber: Andrew Hinkley, Jakub Jelínek;
nabc-lines: 1;
%%
(c3)
FAc(e|talsi8)tus(ei|pe) est(i|vi) re(i|vihh)pén(i|vihi)te(e.|tahglsi9) de(i|vihhlsl2) cæ(i|vihhlse1)lo(h|ta) so(kjki|pfhhlsl2lsc2)nus(i.|ta) (,)
ad(i|talse8)ve(i|ta)ni(ij|pe)én(ji~|vi>lst2)tis(j_i|cl-hh) spí(hj|````peSlsl3lsm7lsi8)ri(i|vi)tus(h|ta) ve(h.|cl-lse4)he(f!gwh|ql)mén(hi~|ta>)tis,(h.|vi) (;)
u(hg|tolsi7lsc2)bi(h|vi) e(iji|to)rant(hih|tolst2lss9lsc7) se(hg|cllsc3lse7)dén(fhG'E|to>lsc2lsi9)tes,(fe..|cl-) (,)
al(eg~|````ta>lse4)le(gv./fhg|vi-tohhlsi7lss6)lú(efe___|toS)ia:(e.|ta) (:)
et(e|talse4) re(f|vilsc1)plé(h!i'j|vi-hhpehjlss7)ti(i|ta) sunt(i|ta) om(ij~|ta>)nes(i|talse6) Spí(j|vihh)ri(i|vi)tu(h|talsc3) Sanc(ij~|ta>lss1)to,(j.|vi) (;)
lo(i|vilsim2)quén(hg/h_ih~|cllsc2pq>lst2)tes(f|ta) ma(eg~|```ta>lse4lsl3)gná(ghg___//e!f'g|vicl-sahhlsi7)li(fd|clMlsc3lsi9)a(f|vi) De(efe___|toS)i,(e.|ta) (;)
al(eg~|ta>lsl1lsp2)le(g|vi)lú(hih|to>)ia,(f.|vi) (,)
al(eg~|ta>lsi8)le(gv.fhg|vi-tohi)lú(efe___|toS)ia.(e.|ta) (::)
87 changes: 87 additions & 0 deletions tests/gabc-dump/glyphs/choral_signs.dump
Original file line number Diff line number Diff line change
Expand Up @@ -706,4 +706,91 @@
---------------------------------------------------------------------
type 6 (GRE_END_OF_LINE)
ragged true
=====================================================================
type 5 (GRE_SYLLABLE)
position 4 (WORD_ONE_SYLLABLE)
---------------------------------------------------------------------
beginning of style ST_CENTER
---------------------------------------------------------------------
character 2
---------------------------------------------------------------------
character 0
---------------------------------------------------------------------
end of style ST_CENTER
---------------------------------------------------------------------
type 3 (GRE_ELEMENT)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
type 2 (GRE_GLYPH)
glyph_type 18 (G_PODATUS)
- - - - - - - - - - - - - - - - - - - - - - -
type 1 (GRE_NOTE)
pitch g
shape 14 (S_QUILISMA)
Choral Sign "c"
- - - - - - - - - - - - - - - - - - - - - - -
type 1 (GRE_NOTE)
pitch h
shape 1 (S_PUNCTUM)
=====================================================================
type 5 (GRE_SYLLABLE)
position 4 (WORD_ONE_SYLLABLE)
---------------------------------------------------------------------
beginning of style ST_CENTER
---------------------------------------------------------------------
character 2
---------------------------------------------------------------------
character 1
---------------------------------------------------------------------
end of style ST_CENTER
---------------------------------------------------------------------
type 3 (GRE_ELEMENT)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
type 2 (GRE_GLYPH)
glyph_type 24 (G_PORRECTUS)
- - - - - - - - - - - - - - - - - - - - - - -
type 1 (GRE_NOTE)
pitch g
shape 14 (S_QUILISMA)
Choral Sign "c"
- - - - - - - - - - - - - - - - - - - - - - -
type 1 (GRE_NOTE)
pitch f
shape 1 (S_PUNCTUM)
- - - - - - - - - - - - - - - - - - - - - - -
type 1 (GRE_NOTE)
pitch g
shape 1 (S_PUNCTUM)
=====================================================================
type 5 (GRE_SYLLABLE)
position 4 (WORD_ONE_SYLLABLE)
---------------------------------------------------------------------
beginning of style ST_CENTER
---------------------------------------------------------------------
character 2
---------------------------------------------------------------------
character 2
---------------------------------------------------------------------
end of style ST_CENTER
---------------------------------------------------------------------
type 3 (GRE_ELEMENT)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
type 2 (GRE_GLYPH)
glyph_type 22 (G_TORCULUS_RESUPINUS)
- - - - - - - - - - - - - - - - - - - - - - -
type 1 (GRE_NOTE)
pitch g
shape 14 (S_QUILISMA)
Choral Sign "c"
- - - - - - - - - - - - - - - - - - - - - - -
type 1 (GRE_NOTE)
pitch h
shape 1 (S_PUNCTUM)
- - - - - - - - - - - - - - - - - - - - - - -
type 1 (GRE_NOTE)
pitch g
shape 1 (S_PUNCTUM)
- - - - - - - - - - - - - - - - - - - - - - -
type 1 (GRE_NOTE)
pitch h
shape 1 (S_PUNCTUM)
=====================================================================
1 change: 1 addition & 0 deletions tests/gabc-dump/glyphs/choral_signs.gabc
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ ab(gh[cs:c]) ab(h[cs:c]g[cs:t]) ab(h_.g_[cs:t]) ab(f_[cs:c]g_) ab(h_[cs:t].g_Z)
11(h[cs:c]g) 12(hg[cs:c])
13(h[cs:c]gh) 14(hg[cs:c]h) 15(hgh[cs:c])
16(h[cs:c]ghg) 17(hg[cs:c]hg) 18(hgh[cs:c]g) 19(hghg[cs:c]Z)
20(gw[cs:c]h) 21(gw[cs:c]fg) 22(gw[cs:c]hgh)
Loading