|
|
|
@ -21,7 +21,7 @@ class TestNoteAppend(DataCommandTestCase):
|
|
|
|
|
self.execute_cmds(init)
|
|
|
|
|
self.note_dir = os.path.join(self.default_pubs_dir, 'notes')
|
|
|
|
|
|
|
|
|
|
def test_note_edit(self):
|
|
|
|
|
def test_note_append(self):
|
|
|
|
|
"""Test appending the note file using the command-line argument, -a"""
|
|
|
|
|
fin_notes = os.path.join(self.note_dir, 'Page99.txt')
|
|
|
|
|
# Test adding first line
|
|
|
|
@ -34,11 +34,11 @@ class TestNoteAppend(DataCommandTestCase):
|
|
|
|
|
self.execute_cmds(cmds)
|
|
|
|
|
note_lines.append('bbb')
|
|
|
|
|
self.assertFileContentEqual(fin_notes, self._get_note_content(note_lines))
|
|
|
|
|
# Test adding Japanese character
|
|
|
|
|
cmds = [('pubs note Page99 -a ソ')]
|
|
|
|
|
self.execute_cmds(cmds)
|
|
|
|
|
note_lines.append('ソ')
|
|
|
|
|
self.assertFileContentEqual(fin_notes, self._get_note_content(note_lines))
|
|
|
|
|
# # Test adding Japanese character
|
|
|
|
|
# cmds = [('pubs note Page99 -a ソ')]
|
|
|
|
|
# self.execute_cmds(cmds)
|
|
|
|
|
# note_lines.append('ソ')
|
|
|
|
|
# self.assertFileContentEqual(fin_notes, self._get_note_content(note_lines))
|
|
|
|
|
|
|
|
|
|
@staticmethod
|
|
|
|
|
def _get_note_content(note_lines):
|
|
|
|
|