def test_commandForDeletedFiles(self):
        transaction = 'ax8'
        file = 'D  rippledown/trunk/src/rippledown/val/gui/CaseViewer.java'

        svnLook = SvnLookCatCommand(REPOSITORIES_DEV, transaction, file)

        self.assertEqual(None, svnLook.command())
    def test_commandForEmptyString(self):
        transaction = 'ax8'
        file = '   '

        svnLook = SvnLookCatCommand(REPOSITORIES_DEV, transaction, file)

        self.assertEqual(None, svnLook.command())
    def test_commandIgnoresJpegFiles(self):
        transaction = 'ax8'
        file = 'A  rippledown/trunk/src/rippledown/help/val/CaseViewer.jpeg'

        svnLook = SvnLookCatCommand(REPOSITORIES_DEV, transaction, file)

        self.assertEqual(None, svnLook.command())
    def test_commandForEmptyString(self):
        transaction = 'ax8'
        file = '   '

        svnLook = SvnLookCatCommand(REPOSITORIES_DEV, transaction, file)

        self.assertEqual(None, svnLook.command())
    def test_commandIgnoresJpegFiles(self):
        transaction = 'ax8'
        file = 'A  rippledown/trunk/src/rippledown/help/val/CaseViewer.jpeg'

        svnLook = SvnLookCatCommand(REPOSITORIES_DEV, transaction, file)

        self.assertEqual(None, svnLook.command())
    def test_commandForDeletedFiles(self):
        transaction = 'ax8'
        file = 'D  rippledown/trunk/src/rippledown/val/gui/CaseViewer.java'

        svnLook = SvnLookCatCommand(REPOSITORIES_DEV, transaction, file)

        self.assertEqual(None, svnLook.command())
    def test_commandForUpdatedFiles(self):
        transaction = 'ax8'
        file = 'U   rippledown/trunk/src/rippledown/val/gui/CaseViewer.java'

        svnLook = SvnLookCatCommand(REPOSITORIES_DEV, transaction, file)
        expected = 'svnlook cat -t ax8 D:\BackedUp\csvn\data\\repositories\dev rippledown/trunk/src/rippledown/val/gui/CaseViewer.java'

        self.assertEqual(expected, svnLook.command())
    def test_commandForAddedFiles(self):
        transaction = 'ax8'
        file = 'A  rippledown/trunk/src/rippledown/val/gui/CaseViewer.java'

        svnLook = SvnLookCatCommand(REPOSITORIES_DEV, transaction, file)
        expected = 'svnlook cat -t ax8 D:\BackedUp\csvn\data\\repositories\dev rippledown/trunk/src/rippledown/val/gui/CaseViewer.java'

        self.assertEqual(expected, svnLook.command())
    def test_commandWithUpperCase(self):
        transaction = 'ax8'
        file = 'A  rippledown/trunk/src/rippledown/attribute/Attribute.java'

        svnLook = SvnLookCatCommand(REPOSITORIES_DEV, transaction, file)

        self.assertEqual(
            'svnlook cat -t ax8 D:\BackedUp\csvn\data\\repositories\dev rippledown/trunk/src/rippledown/attribute/Attribute.java'
            , svnLook.command())
    def test_commandWithUpperCase(self):
        transaction = 'ax8'
        file = 'A  rippledown/trunk/src/rippledown/attribute/Attribute.java'

        svnLook = SvnLookCatCommand(REPOSITORIES_DEV, transaction, file)

        self.assertEqual(
            'svnlook cat -t ax8 D:\BackedUp\csvn\data\\repositories\dev rippledown/trunk/src/rippledown/attribute/Attribute.java',
            svnLook.command())
Esempio n. 11
0
 def main(self):
     exitCode = 0
     svnCommand = SvnLookChangedCommand(self.repositoryPath, self.transaction)
     stdOutCapture = StdOutCapture(svnCommand.command())
     changedFiles = stdOutCapture.linesFromStdOut()
     for changedFile in changedFiles:
         svnLookCatCommand = SvnLookCatCommand(self.repositoryPath, self.transaction, changedFile)
         cmd = svnLookCatCommand.command()
         if cmd is not None:
             stdOutCapture = StdOutCapture(cmd)
             lines = stdOutCapture.linesFromStdOut()
             result = self.checkFile(lines)
             if result is not None:
                 sys.stderr.write("\n" + result + svnLookCatCommand.filePath)
                 exitCode = -1
     return exitCode
Esempio n. 12
0
 def main(self):
     exitCode = 0
     svnCommand = SvnLookChangedCommand(self.repositoryPath,
                                        self.transaction)
     stdOutCapture = StdOutCapture(svnCommand.command())
     changedFiles = stdOutCapture.linesFromStdOut()
     for changedFile in changedFiles:
         svnLookCatCommand = SvnLookCatCommand(self.repositoryPath,
                                               self.transaction,
                                               changedFile)
         cmd = svnLookCatCommand.command()
         if cmd is not None:
             stdOutCapture = StdOutCapture(cmd)
             lines = stdOutCapture.linesFromStdOut()
             result = self.checkFile(lines)
             if result is not None:
                 sys.stderr.write("\n" + result +
                                  svnLookCatCommand.filePath)
                 exitCode = -1
     return exitCode