def testTranslateOrgToHTMLTables(self):

        vSource = ["Some randome text"
                   ,"this is -> something"
                   ,"| id | description |"
                   ,"|----+-------------|"
                   ,"| 1  | text        |"
                   ,"Some other lines * -> Hello"
                   ,"| id | XXxxxxxxxyy |"
                   ,"|----+-------------|"
                   ,"| 3  | None        |"
                   ,"Hellosdlsf. End."]

        vCache = utils.cacheFile(vSource)
        vResult = enmlOutput.translateOrgToHTMLTables(vCache)
    
        vTarget = ["Some randome text", "this is -> something"
                   ,"<TABLE>"
                   ,"<TR><TH>id</TH><TH>description</TH></TR>"
                   ,"<TR><TD>1</TD><TD>text</TD></TR>"
                   ,"</TABLE>"
                   ,"Some other lines * -> Hello"
                   ,"<TABLE>"
                   ,"<TR><TH>id</TH><TH>XXxxxxxxxyy</TH></TR>"
                   ,"<TR><TD>3</TD><TD>None</TD></TR>"
                   ,"</TABLE>"
                   ,"Hellosdlsf. End."
        ]

        self.assertEqual(vResult, vTarget)
def org2ever(pSourceFile, pDestinationFile):
    vCache = cacheFile(pSourceFile)
    if isOrgModeFile(vCache):
        vCache = enmlOutput.convertDoneToEvernote(pCache = vCache)
        vCache = enmlOutput.convertTodoToEvernote(pCache = vCache)
        vCache = enmlOutput.convertToEvernoteLinkNotation(pCache=vCache)
        vCache = escapeCharsFile(pSource=vCache, pChars=fEscapeChars)
        vCache =  enmlOutput.translateOrgToHTMLTables(pCache = vCache)
        writeFile(pDestinationFile, vCache)