Browse Source

Improve test

pull/220/head
Oliverpool 9 years ago
parent
commit
7ae80d5ab4
  1. 2
      patacrep/data/templates/songs/chordpro/chordpro/content_meta
  2. 2
      patacrep/data/templates/songs/chordpro/latex/content_meta
  3. 2
      patacrep/songs/chordpro/ast.py
  4. 5
      test/test_song/metacrep.csg
  5. 4
      test/test_song/metacrep.csg.source
  6. 6
      test/test_song/metacrep.tsg

2
patacrep/data/templates/songs/chordpro/chordpro/content_meta

@ -1 +1 @@
{meta: (( content.argument[0] )):(( content.argument[1] ))} {meta: (( content.argument[0] )):(( content.argument[2] ))}

2
patacrep/data/templates/songs/chordpro/latex/content_meta

@ -1 +1 @@
\metacrep{((- content.argument[0] -))}{((- content.argument[1] -))} \metacrep{((- content.argument[0] -))}{((- content.argument[2] -))}

2
patacrep/songs/chordpro/ast.py

@ -357,7 +357,7 @@ class Directive(AST):
super().__init__() super().__init__()
self.keyword = directive_name(keyword.strip()) self.keyword = directive_name(keyword.strip())
if keyword == 'meta': if keyword == 'meta':
argument = argument.split(':') argument = argument.partition(':')
self.argument = argument self.argument = argument
@property @property

5
test/test_song/metacrep.csg

@ -7,7 +7,10 @@
Let's sing and test a Let's sing and test a
{meta: undefined:} {meta: emptyarg:}
directive between verses directive between verses
{meta: and: with: more: arguments}

4
test/test_song/metacrep.csg.source

@ -4,6 +4,8 @@
Let's sing and test a Let's sing and test a
{meta: undefined} {meta: emptyarg}
directive between verses directive between verses
{meta: and: with: more: arguments}

6
test/test_song/metacrep.tsg

@ -15,7 +15,7 @@
\end{verse} \end{verse}
\metacrep{undefined}{} \metacrep{emptyarg}{}
@ -23,4 +23,8 @@
directive between verses directive between verses
\end{verse} \end{verse}
\metacrep{and}{ with: more: arguments}
\endsong \endsong

Loading…
Cancel
Save