def testConvertToEvernoteLinkNotationInTextNoLink(self):
        target = ["Here is some text and this is [Search](www.google.be) a link", "no link"]
        source = ["Here is some text and this is [[www.google.be][Search]] a link", "no link"]

        result = enmlOutput.convertToEvernoteLinkNotation(source)

        self.assertEqual(result, target)
    def testConvertToEvernoteLinkNotation(self):
        target = ["[Search](www.google.be)"]
        source = ["[[www.google.be][Search]]"]

        result = enmlOutput.convertToEvernoteLinkNotation(source)

        self.assertEqual(result, target)
    def testConvertToEvernoteLinkNotationDoubleInText(self):
        target = ["Here is some [emacs](www.emacs.org) text and this is [Search](www.google.be) a link"]
        source = ["Here is some [[www.emacs.org][emacs]] text and this is [[www.google.be][Search]] a link"]

        result = enmlOutput.convertToEvernoteLinkNotation(source)

        self.assertEqual(result, target)
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)