Merge branch 'lowercase-toggle' of https://github.com/EliteTK/qutebrowser into EliteTK-lowercase-toggle

This commit is contained in:
Florian Bruhin 2016-06-08 22:39:19 +02:00
commit 4fe6935003
2 changed files with 3 additions and 3 deletions

View File

@ -734,7 +734,7 @@ class ConfigManager(QObject):
val = self.get(section_, option)
layer = 'temp' if temp else 'conf'
if isinstance(val, bool):
self.set(layer, section_, option, str(not val))
self.set(layer, section_, option, str(not val).lower())
else:
raise cmdexc.CommandError(
"set: Attempted inversion of non-boolean value.")

View File

@ -26,7 +26,7 @@ Feature: Setting settings.
Scenario: Toggling an option
When I run :set general auto-save-config false
And I run :set general auto-save-config!
Then general -> auto-save-config should be True
Then general -> auto-save-config should be true
Scenario: Toggling a non-bool option
When I run :set colors statusbar.bg!
@ -44,7 +44,7 @@ Feature: Setting settings.
Scenario: Using ! and -p
When I run :set general auto-save-config false
And I run :set -p general auto-save-config!
Then the message "general auto-save-config = True" should be shown
Then the message "general auto-save-config = true" should be shown
Scenario: Setting an invalid value
When I run :set general auto-save-config blah