Exemple #1
0
    def test_color_output_fallback(self):
        """Test fallback to using color.ui when color.review is not
        set
        """

        self._run_git("config", "color.ui", "always")
        self.assertTrue(cmd.check_use_color_output(),
                        "Failed to use fallback to color.ui when "
                        "color.review not present")
Exemple #2
0
    def test_color_output_fallback(self):
        """Test fallback to using color.ui when color.review is not
        set
        """

        self._run_git("config", "color.ui", "always")
        self.assertTrue(cmd.check_use_color_output(),
                        "Failed to use fallback to color.ui when "
                        "color.review not present")
Exemple #3
0
    def test_color_output_forced(self):
        """Test force enable of colour output when color.ui
        is defaulted to false
        """

        self._run_git("config", "color.ui", "never")

        self._run_git("config", "color.review", "always")
        self.assertTrue(cmd.check_use_color_output(),
                        "Failed to detect color output forcefully "
                        "enabled")
Exemple #4
0
    def test_color_output_disabled(self):
        """Test disabling of colour output color.ui defaults to enabled
        """

        # git versions < 1.8.4 default to 'color.ui' being false
        # so must be set to auto to correctly test
        self._run_git("config", "color.ui", "auto")

        self._run_git("config", "color.review", "never")
        self.assertFalse(cmd.check_use_color_output(),
                         "Failed to detect color output disabled")
Exemple #5
0
    def test_color_output_forced(self):
        """Test force enable of colour output when color.ui
        is defaulted to false
        """

        self._run_git("config", "color.ui", "never")

        self._run_git("config", "color.review", "always")
        self.assertTrue(cmd.check_use_color_output(),
                        "Failed to detect color output forcefully "
                        "enabled")
Exemple #6
0
    def test_color_output_disabled(self):
        """Test disabling of colour output color.ui defaults to enabled
        """

        # git versions < 1.8.4 default to 'color.ui' being false
        # so must be set to auto to correctly test
        self._run_git("config", "color.ui", "auto")

        self._run_git("config", "color.review", "never")
        self.assertFalse(cmd.check_use_color_output(),
                         "Failed to detect color output disabled")