Class OsAdapterTest


  • public class OsAdapterTest
    extends java.lang.Object
    Unit tests for the OS (operating system) adapter.

    Also please run the following tests manually, from your shell:

    • ./sqlsh select \* from du
    • ./sqlsh select \* from files
    • ./sqlsh select \* from git_commits
    • ./sqlsh select \* from ps
    • (echo cats; echo and dogs) | ./sqlsh select \* from stdin
    • ./sqlsh select \* from vmstat
    • Constructor Detail

      • OsAdapterTest

        public OsAdapterTest()
    • Method Detail

      • isWindows

        private static boolean isWindows()
      • hasGit

        private static boolean hasGit()
        Returns whether there is a ".git" directory in this directory or in a directory between this directory and root.
      • assumeToolExists

        private static void assumeToolExists​(java.lang.String command)
      • checkProcessExists

        private static boolean checkProcessExists​(java.lang.String command)
      • testDu

        public void testDu()
      • testDuFilterSortLimit

        public void testDuFilterSortLimit()
      • testFiles

        public void testFiles()
      • testPs

        public void testPs()
      • testPsDistinct

        public void testPsDistinct()
      • testGitCommits

        public void testGitCommits()
      • testGitCommitsTop

        public void testGitCommitsTop()
      • testVmstat

        public void testVmstat()
      • testStdin

        public void testStdin()
                       throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • testStdinExplain

        public void testStdinExplain()
      • testSqlShellFormat

        public void testSqlShellFormat()
                                throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • foo

        private java.lang.String foo​(java.lang.String... args)
                              throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • testSqlShellHelp

        public void testSqlShellHelp()
                              throws java.sql.SQLException
        Throws:
        java.sql.SQLException