Browse Source

Change test_compilation extensions

pull/174/head
Oliverpool 9 years ago
parent
commit
312b63df60
  1. 2
      patacrep/build.py
  2. 4
      patacrep/content/tex.py
  3. 2
      patacrep/songbook/__main__.py
  4. 6
      patacrep/songs/latex/__init__.py
  5. 30
      test/test_compilation/datadir.tex.control
  6. 0
      test/test_compilation/datadir_datadir/songs/datadir.csg
  7. 0
      test/test_compilation/datadir_datadir/songs/datadir.tsg
  8. 0
      test/test_compilation/datadir_datadir/songs/datadir2.csg
  9. 0
      test/test_compilation/datadir_datadir/songs/datadir2.tsg
  10. 0
      test/test_compilation/datadir_datadir/songs/relative.csg
  11. 0
      test/test_compilation/datadir_datadir/songs/relative.tsg
  12. 0
      test/test_compilation/datadir_datadir/songs/subdir/subdir.csg
  13. 0
      test/test_compilation/datadir_datadir/songs/subdir/subdir.tsg
  14. 10
      test/test_compilation/languages.tex.control
  15. 0
      test/test_compilation/languages_datadir/songs/language.csg
  16. 0
      test/test_compilation/languages_datadir/songs/language_location.csg
  17. 0
      test/test_compilation/languages_datadir/songs/no_language.csg
  18. 0
      test/test_compilation/languages_datadir/songs/wrong_language.csg
  19. 0
      test/test_compilation/languages_datadir/songs/wrong_location.csg
  20. 2
      test/test_compilation/syntax.tex.control
  21. 0
      test/test_compilation/syntax_datadir/songs/musicnote.csg
  22. 2
      test/test_compilation/unicode.tex.control
  23. 0
      test/test_compilation/unicode_datadir/songs/nonbreak.csg

2
patacrep/build.py

@ -109,7 +109,7 @@ class Songbook(object):
datadirs=config.get('datadir', []),
root_modules=['songs'],
keyword='SONG_RENDERERS',
)['latex']
)['tsg']
# Configuration set
config['render'] = content.render

4
patacrep/content/tex.py

@ -33,7 +33,7 @@ def parse(keyword, argument, contentlist, config):
"""
if not contentlist:
LOGGER.warning(
"Useless 'tex' content: list of files to include is empty."
"Useless 'tsg' content: list of files to include is empty."
)
filelist = []
basefolders = itertools.chain(
@ -62,4 +62,4 @@ def parse(keyword, argument, contentlist, config):
return filelist
CONTENT_PLUGINS = {'tex': parse}
CONTENT_PLUGINS = {'tsg': parse}

2
patacrep/songbook/__main__.py

@ -153,7 +153,7 @@ def main():
# Command line options
datadirs += [item[0] for item in options.datadir]
if 'datadir' in songbook:
# .sg file
# .tsg file
if isinstance(songbook['datadir'], str):
songbook['datadir'] = [songbook['datadir']]
datadirs += [

6
patacrep/songs/latex/__init__.py

@ -49,9 +49,9 @@ class Latex2LatexSong(Song):
self.lang = custom_lang
SONG_RENDERERS = {
"latex": {
'is': Latex2LatexSong,
'sg': Latex2LatexSong,
"tsg": {
'tis': Latex2LatexSong,
'tsg': Latex2LatexSong,
},
}

30
test/test_compilation/datadir.tex.control

@ -90,12 +90,7 @@ guitar,
\begin{songs}{titleidx,authidx}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% songs/./datadir.sg
\import{@TEST_FOLDER@/datadir_datadir/songs/}{datadir.sg}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% songs/./datadir.sgc
%% songs/./datadir.csg
\selectlanguage{english}
@ -117,12 +112,12 @@ Chordpro}[
\endsong
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% songs/./datadir2.sg
%% songs/./datadir.tsg
\import{@TEST_FOLDER@/datadir_datadir/songs/}{datadir2.sg}
\import{@TEST_FOLDER@/datadir_datadir/songs/}{datadir.tsg}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% songs/./datadir2.sgc
%% songs/./datadir2.csg
\selectlanguage{english}
@ -144,12 +139,12 @@ Chordpro}[
\endsong
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% songs/./relative.sg
%% songs/./datadir2.tsg
\import{@TEST_FOLDER@/datadir_datadir/songs/}{relative.sg}
\import{@TEST_FOLDER@/datadir_datadir/songs/}{datadir2.tsg}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% songs/./relative.sgc
%% songs/./relative.csg
\selectlanguage{english}
@ -171,12 +166,12 @@ Chordpro}[
\endsong
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% songs/./subdir/subdir.sg
%% songs/./relative.tsg
\import{@TEST_FOLDER@/datadir_datadir/songs/subdir/}{subdir.sg}
\import{@TEST_FOLDER@/datadir_datadir/songs/}{relative.tsg}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% songs/./subdir/subdir.sgc
%% songs/./subdir/subdir.csg
\selectlanguage{english}
@ -197,6 +192,11 @@ Chordpro}[
\endsong
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% songs/./subdir/subdir.tsg
\import{@TEST_FOLDER@/datadir_datadir/songs/subdir/}{subdir.tsg}
\end{songs}

0
test/test_compilation/datadir_datadir/songs/datadir.sgc → test/test_compilation/datadir_datadir/songs/datadir.csg

0
test/test_compilation/datadir_datadir/songs/datadir.sg → test/test_compilation/datadir_datadir/songs/datadir.tsg

0
test/test_compilation/datadir_datadir/songs/datadir2.sgc → test/test_compilation/datadir_datadir/songs/datadir2.csg

0
test/test_compilation/datadir_datadir/songs/datadir2.sg → test/test_compilation/datadir_datadir/songs/datadir2.tsg

0
test/test_compilation/datadir_datadir/songs/relative.sgc → test/test_compilation/datadir_datadir/songs/relative.csg

0
test/test_compilation/datadir_datadir/songs/relative.sg → test/test_compilation/datadir_datadir/songs/relative.tsg

0
test/test_compilation/datadir_datadir/songs/subdir/subdir.sgc → test/test_compilation/datadir_datadir/songs/subdir/subdir.csg

0
test/test_compilation/datadir_datadir/songs/subdir/subdir.sg → test/test_compilation/datadir_datadir/songs/subdir/subdir.tsg

10
test/test_compilation/languages.tex.control

@ -91,7 +91,7 @@ guitar,
\begin{songs}{titleidx,authidx}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% songs/./language.sgc
%% songs/./language.csg
\selectlanguage{english}
@ -110,7 +110,7 @@ guitar,
\endsong
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% songs/./language_location.sgc
%% songs/./language_location.csg
\selectlanguage{french}
@ -129,7 +129,7 @@ guitar,
\endsong
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% songs/./no_language.sgc
%% songs/./no_language.csg
\selectlanguage{english}
@ -148,7 +148,7 @@ guitar,
\endsong
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% songs/./wrong_language.sgc
%% songs/./wrong_language.csg
\selectlanguage{english}
@ -167,7 +167,7 @@ guitar,
\endsong
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% songs/./wrong_location.sgc
%% songs/./wrong_location.csg
\selectlanguage{spanish}

0
test/test_compilation/languages_datadir/songs/language.sgc → test/test_compilation/languages_datadir/songs/language.csg

0
test/test_compilation/languages_datadir/songs/language_location.sgc → test/test_compilation/languages_datadir/songs/language_location.csg

0
test/test_compilation/languages_datadir/songs/no_language.sgc → test/test_compilation/languages_datadir/songs/no_language.csg

0
test/test_compilation/languages_datadir/songs/wrong_language.sgc → test/test_compilation/languages_datadir/songs/wrong_language.csg

0
test/test_compilation/languages_datadir/songs/wrong_location.sgc → test/test_compilation/languages_datadir/songs/wrong_location.csg

2
test/test_compilation/syntax.tex.control

@ -88,7 +88,7 @@ guitar,
\begin{songs}{titleidx,authidx}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% songs/./musicnote.sgc
%% songs/./musicnote.csg
\selectlanguage{english}

0
test/test_compilation/syntax_datadir/songs/musicnote.sgc → test/test_compilation/syntax_datadir/songs/musicnote.csg

2
test/test_compilation/unicode.tex.control

@ -88,7 +88,7 @@ guitar,
\begin{songs}{titleidx,authidx}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% songs/./nonbreak.sgc
%% songs/./nonbreak.csg
\selectlanguage{english}

0
test/test_compilation/unicode_datadir/songs/nonbreak.sgc → test/test_compilation/unicode_datadir/songs/nonbreak.csg

Loading…
Cancel
Save