Browse Source

[chordpro][test] Added a bunch of LaTeX tests

pull/79/head
Louis 9 years ago
parent
commit
dccb057f2e
  1. 2
      patacrep/songs/chordpro/data/latex/content_chordlist
  2. 4
      patacrep/songs/chordpro/data/latex/content_tablature
  3. 6
      patacrep/songs/chordpro/data/latex/content_verse
  4. 2
      patacrep/songs/chordpro/data/latex/song
  5. 10
      patacrep/songs/chordpro/test/00.tex
  6. 13
      patacrep/songs/chordpro/test/01.tex
  7. 12
      patacrep/songs/chordpro/test/03.tex
  8. 13
      patacrep/songs/chordpro/test/04.tex
  9. 13
      patacrep/songs/chordpro/test/05.tex
  10. 12
      patacrep/songs/chordpro/test/06.tex
  11. 13
      patacrep/songs/chordpro/test/07.tex
  12. 17
      patacrep/songs/chordpro/test/08.tex
  13. 17
      patacrep/songs/chordpro/test/09.tex
  14. 13
      patacrep/songs/chordpro/test/10.tex
  15. 13
      patacrep/songs/chordpro/test/11.tex
  16. 13
      patacrep/songs/chordpro/test/12.tex
  17. 15
      patacrep/songs/chordpro/test/13.tex
  18. 13
      patacrep/songs/chordpro/test/21.tex
  19. 10
      patacrep/songs/chordpro/test/22.tex
  20. 12
      patacrep/songs/chordpro/test/23.tex
  21. 13
      patacrep/songs/chordpro/test/24.tex
  22. 13
      patacrep/songs/chordpro/test/25.tex
  23. 12
      patacrep/songs/chordpro/test/26.tex
  24. 13
      patacrep/songs/chordpro/test/27.tex
  25. 17
      patacrep/songs/chordpro/test/28.tex
  26. 17
      patacrep/songs/chordpro/test/29.tex
  27. 25
      patacrep/songs/chordpro/test/chords.tex
  28. 12
      patacrep/songs/chordpro/test/customchords.tex
  29. 67
      patacrep/songs/chordpro/test/greensleeves.tex
  30. 15
      patacrep/songs/chordpro/test/invalid_chord.tex
  31. 10
      patacrep/songs/chordpro/test/invalid_customchord.tex
  32. 25
      patacrep/songs/chordpro/test/metadata.tex

2
patacrep/songs/chordpro/data/latex/content_chordlist

@ -1,6 +1,8 @@
(* if content.chords *)
\[
(*- for chord in content.chords -*)
(* if not loop.first *) (* endif -*)
(( render(chord) -))
(* endfor -*)
]
(*- endif -*)

4
patacrep/songs/chordpro/data/latex/content_tablature

@ -0,0 +1,4 @@
% TODO TABLATURE
% (* for foo in content.content *)
% (( foo ))
% (* endfor *)

6
patacrep/songs/chordpro/data/latex/content_verse

@ -1,5 +1,5 @@
\begin{(( content.type ))}
(* for line in content.lines -*)
(( render(line) ))
(* endfor *)
(* for line in content.lines *)
(( render(line) ))
(* endfor *)
\end{(( content.type ))}

2
patacrep/songs/chordpro/data/latex/song

@ -33,7 +33,7 @@
\cover
(* endif *)
(*- for chord in metadata['define'] *)
(*- for chord in metadata['define'] -*)
(( render(chord) ))
(* endfor *)

10
patacrep/songs/chordpro/test/00.tex

@ -0,0 +1,10 @@
\selectlanguage{english}
\beginsong{}[
by={
},
]
\endsong

13
patacrep/songs/chordpro/test/01.tex

@ -0,0 +1,13 @@
\selectlanguage{english}
\beginsong{}[
by={
},
]
\begin{verse}
A verse line
\end{verse}
\endsong

12
patacrep/songs/chordpro/test/03.tex

@ -0,0 +1,12 @@
\selectlanguage{english}
\beginsong{}[
by={
},
]
\endsong

13
patacrep/songs/chordpro/test/04.tex

@ -0,0 +1,13 @@
\selectlanguage{english}
\beginsong{}[
by={
},
]
\begin{chorus}
A one line chorus
\end{chorus}
\endsong

13
patacrep/songs/chordpro/test/05.tex

@ -0,0 +1,13 @@
\selectlanguage{english}
\beginsong{}[
by={
},
]
\begin{bridge}
A one line bridge
\end{bridge}
\endsong

12
patacrep/songs/chordpro/test/06.tex

@ -0,0 +1,12 @@
\selectlanguage{english}
\beginsong{}[
by={
},
]
\endsong

13
patacrep/songs/chordpro/test/07.tex

@ -0,0 +1,13 @@
\selectlanguage{english}
\beginsong{}[
by={
},
]
% TODO TABLATURE
% % A tab
%
\endsong

17
patacrep/songs/chordpro/test/08.tex

@ -0,0 +1,17 @@
\selectlanguage{english}
\beginsong{}[
by={
},
]
\begin{verse}
A lot of new lines
\end{verse}
\endsong

17
patacrep/songs/chordpro/test/09.tex

@ -0,0 +1,17 @@
\selectlanguage{english}
\beginsong{and a directive}[
by={
},
]
\begin{verse}
A lot of new lines
\end{verse}
\endsong

13
patacrep/songs/chordpro/test/10.tex

@ -0,0 +1,13 @@
\selectlanguage{english}
\beginsong{}[
by={
},
]
\begin{verse}
A line\[A] with a chord
\end{verse}
\endsong

13
patacrep/songs/chordpro/test/11.tex

@ -0,0 +1,13 @@
\selectlanguage{english}
\beginsong{}[
by={
},
]
\begin{verse}
A line ending with a chord\[A]
\end{verse}
\endsong

13
patacrep/songs/chordpro/test/12.tex

@ -0,0 +1,13 @@
\selectlanguage{english}
\beginsong{}[
by={
},
]
\begin{verse}
\[A]A line starting with a chord
\end{verse}
\endsong

15
patacrep/songs/chordpro/test/13.tex

@ -0,0 +1,15 @@
\selectlanguage{english}
\beginsong{}[
by={
},
]
% TODO TABLATURE
% % A table
% % wit many # weir [
% % [ symbols
%
\endsong

13
patacrep/songs/chordpro/test/21.tex

@ -0,0 +1,13 @@
\selectlanguage{english}
\beginsong{}[
by={
},
]
\begin{verse}
A verse line
\end{verse}
\endsong

10
patacrep/songs/chordpro/test/22.tex

@ -0,0 +1,10 @@
\selectlanguage{english}
\beginsong{A directive}[
by={
},
]
\endsong

12
patacrep/songs/chordpro/test/23.tex

@ -0,0 +1,12 @@
\selectlanguage{english}
\beginsong{}[
by={
},
]
\endsong

13
patacrep/songs/chordpro/test/24.tex

@ -0,0 +1,13 @@
\selectlanguage{english}
\beginsong{}[
by={
},
]
\begin{chorus}
A one line chorus
\end{chorus}
\endsong

13
patacrep/songs/chordpro/test/25.tex

@ -0,0 +1,13 @@
\selectlanguage{english}
\beginsong{}[
by={
},
]
\begin{bridge}
A one line bridge
\end{bridge}
\endsong

12
patacrep/songs/chordpro/test/26.tex

@ -0,0 +1,12 @@
\selectlanguage{english}
\beginsong{}[
by={
},
]
\endsong

13
patacrep/songs/chordpro/test/27.tex

@ -0,0 +1,13 @@
\selectlanguage{english}
\beginsong{}[
by={
},
]
% TODO TABLATURE
% % A tab
%
\endsong

17
patacrep/songs/chordpro/test/28.tex

@ -0,0 +1,17 @@
\selectlanguage{english}
\beginsong{}[
by={
},
]
\begin{verse}
A lot of new lines
\end{verse}
\endsong

17
patacrep/songs/chordpro/test/29.tex

@ -0,0 +1,17 @@
\selectlanguage{english}
\beginsong{and a directive}[
by={
},
]
\begin{verse}
A lot of new lines
\end{verse}
\endsong

25
patacrep/songs/chordpro/test/chords.tex

@ -0,0 +1,25 @@
\selectlanguage{english}
\beginsong{}[
by={
},
]
\begin{verse}
\[A]Simple
\[B&]Bémol
\[C#]Dièse
\[Adim]dim
\[Dmaj]maj
\[Em3]m chiffre
\[G4]Nombre
\[Emaj3]maj et nombre
\[A&sus8]bémol, sus et nombre
\[A/A]Deux notes
\[F/F&]Deux notes, bémol
\[B/C#]Deux notes, dièse
\[A& B#/A]Plusieurs notes à la suite
\end{verse}
\endsong

12
patacrep/songs/chordpro/test/customchords.tex

@ -0,0 +1,12 @@
\selectlanguage{english}
\beginsong{}[
by={
},
]
\gtab{E4}{7:0133XX}
\gtab{E5}{7:0133XX:012300}
\endsong

67
patacrep/songs/chordpro/test/greensleeves.tex

@ -0,0 +1,67 @@
\selectlanguage{english}
\songcolumns{2}
\beginsong{Greensleeves\\
Un autre sous-titre\\
Un sous titre}[
by={
Traditionnel },
album={Angleterre},
cov={DIRNAME/traditionnel},
]
\cover
\lilypond{DIRNAME/greensleeves.ly}
\begin{verse}
A\[Am]las, my love, ye \[G]do me wrong
To \[Am]cast me oft dis\[E]curteously
And \[Am]I have loved \[G]you so long
De\[Am]lighting \[E]in your \[Am]companie
\end{verse}
\begin{chorus}
\[C]Green\[B]sleeves was \[G]all my joy
\[Am]Greensleeves was \[E]my delight
\[C]Greensleeves was my \[G]heart of gold
And \[Am]who but \[E]Ladie \[Am]Greensleeves
\end{chorus}
\begin{verse}
I \[Am]have been ready \[G]at your hand
To \[Am]grant what ever \[E]you would crave
I \[Am]have both waged \[G]life and land
Your \[Am]love and \[E]good will \[Am]for to have
\end{verse}
\begin{verse}
I \[Am]bought thee kerchers \[G]to thy head
That \[Am]were wrought fine and \[E]gallantly
I \[Am]kept thee both at \[G]boord and bed
Which \[Am]cost my \[E]purse well \[Am]favouredly
\end{verse}
\begin{verse}
I \[Am]bought thee peticotes \[G]of the best
The \[Am]cloth so fine as \[E]fine might be
I \[Am]gave thee jewels \[G]for thy chest
And \[Am]all this \[E]cost I \[Am]spent on thee
\end{verse}
\begin{verse}
Thy \[Am]smock of silke, both \[G]faire and white
With \[Am]gold embrodered \[E]gorgeously
Thy \[Am]peticote of \[G]sendall right
And \[Am]this I \[E]bought thee \[Am]gladly
\end{verse}
\endsong

15
patacrep/songs/chordpro/test/invalid_chord.tex

@ -0,0 +1,15 @@
\selectlanguage{english}
\beginsong{}[
by={
},
]
\begin{verse}
This is invalid.
This \[A]too.
And as well.
\end{verse}
\endsong

10
patacrep/songs/chordpro/test/invalid_customchord.tex

@ -0,0 +1,10 @@
\selectlanguage{english}
\beginsong{}[
by={
},
]
\endsong

25
patacrep/songs/chordpro/test/metadata.tex

@ -0,0 +1,25 @@
\selectlanguage{french}
\beginsong{Title\\
Subtitle1\\
Subtitle2\\
Subtitle3\\
Subtitle4\\
Subtitle5}[
by={
Author1,
Author2 },
album={Album},
copyright={Copyright},
cov={DIRNAME/Cover},
vcov={VCover},
]
\cover
\textnote{Comment}
\musicnote{GuitarComment}
\image{DIRNAME/Image}
\lilypond{DIRNAME/Lilypond}
\endsong
Loading…
Cancel
Save