Browse Source

Add test and correct cwd

pull/179/head
Oliverpool 9 years ago
parent
commit
6135ea8c3e
  1. 3
      patacrep/content/cwd.py
  2. 1
      test/test_content/cwd.control
  3. 1
      test/test_content/cwd.source
  4. 1
      test/test_content/cwd_list.control
  5. 1
      test/test_content/cwd_list.source

3
patacrep/content/cwd.py

@ -25,8 +25,7 @@ def parse(keyword, config, argument, contentlist):
old_songdir = config['_songdir']
config['_songdir'] = (
[DataSubpath("", argument)] +
[path.clone().join(argument) for path in config['_songdir']] +
config['_songdir']
[path.clone().join(argument) for path in config['_songdir']]
)
processed_content = process_content(contentlist, config)
config['_songdir'] = old_songdir

1
test/test_content/cwd.control

@ -0,0 +1 @@
["subdir/chordpro.csg"]

1
test/test_content/cwd.source

@ -0,0 +1 @@
[["cwd(subdir)"]]

1
test/test_content/cwd_list.control

@ -0,0 +1 @@
["subdir/chordpro.csg"]

1
test/test_content/cwd_list.source

@ -0,0 +1 @@
[["cwd(subdir)", "exsong.sg", "intersong.is", "jsonlist.json", "texfile.tex", "texsong.tsg", "chordpro.csg", "subdir/chordpro.csg"]]
Loading…
Cancel
Save