def testCompleteOrgTableNotation(self):
        source = ["Command  |  Key  |  Description"]
        target = ["|Command  |  Key  |  Description|"]

        result = orgOutput.completeOrgTableNotation(source)

        self.assertEqual(result, target)
    def testCompleteOrgTableNotationHeader(self):
        source = ["---|---|---"]
        target = ["|---+---+---|"]

        result = orgOutput.completeOrgTableNotation(source)

        self.assertEqual(result, target)
    def testCompleteOrgTableNotationEmptyLine(self):
        source = ["|Command  |  Key  |  Description", "", "|Test | A | nothing", ""]
        target = ["|Command  |  Key  |  Description|", "|Test | A | nothing|", ""]

        result = orgOutput.completeOrgTableNotation(source)

        self.assertEqual(result, target)
    def testCompleteOrgTableNotationNoLine(self):
        source = ["This is a normal line"]
        target = ["This is a normal line"]

        result = orgOutput.completeOrgTableNotation(source)

        self.assertEqual(result, target)
def ever2org(pSourceFile, pDestinationFile):
    vCache = cacheFile(pSourceFile)
    if isOrgModeFile(vCache):
        vCache = removeEmptyLines(vCache)
        vCache = orgOutput.completeOrgTableNotation(vCache)
        vCache = unescapeCharsFile(vCache, fEscapeChars)
        vCache = orgOutput.convertToOrgLinkNotation(pSource=vCache)
        vCache = orgOutput.convertDoneToOrg(pCache = vCache)
        vCache = orgOutput.convertTodoToOrg(pCache = vCache)
        writeFile(pDestinationFile, vCache)