Tags have to be printed in alphabetical order.

main
Olivier Mangin 11 years ago
parent 0479636393
commit f2125b4c19

@ -83,12 +83,12 @@ def command(args):
rp = Repository(config())
if citekeyOrTag is None:
ui.print_(color.dye(' '.join(rp.get_tags()), color=color.blue))
ui.print_(color.dye(' '.join(sorted(rp.get_tags())), color=color.blue))
else:
if rp.databroker.exists(citekeyOrTag):
p = rp.pull_paper(citekeyOrTag)
if tags == []:
ui.print_(color.dye(' '.join(p.tags),
ui.print_(color.dye(' '.join(sorted(p.tags)),
color=color.blue))
else:
add_tags, remove_tags = _tag_groups(_parse_tags(tags))

@ -56,6 +56,6 @@ def paper_oneliner(p, citekey_only = False):
return u'[{citekey}] {descr} {tags}'.format(
citekey=color.dye(p.citekey, color.purple),
descr=bibdesc,
tags=color.dye(' '.join(p.tags),
tags=color.dye(' '.join(sorted(p.tags)),
color.tag, bold=False),
)

@ -246,13 +246,13 @@ class TestList(DataCommandTestCase):
class TestUsecase(DataCommandTestCase):
def test_first(self):
correct = [b'Initializing pubs in /paper_first\n',
b'',
b'[Page99] Page, Lawrence et al. "The PageRank Citation Ranking: Bringing Order to the Web." (1999) \n',
b'\n',
b'',
b'search network\n',
b'[Page99] Page, Lawrence et al. "The PageRank Citation Ranking: Bringing Order to the Web." (1999) search network\n'
correct = ['Initializing pubs in /paper_first\n',
'',
'[Page99] Page, Lawrence et al. "The PageRank Citation Ranking: Bringing Order to the Web." (1999) \n',
'\n',
'',
'network search\n',
'[Page99] Page, Lawrence et al. "The PageRank Citation Ranking: Bringing Order to the Web." (1999) network search\n'
]
cmds = ['pubs init -p paper_first/',

Loading…
Cancel
Save