Commit 8efb1636 authored by Javier Vegas-Regidor's avatar Javier Vegas-Regidor
Browse files

Support empty alias

parent 5d234115
......@@ -238,6 +238,7 @@ class Config(object):
" ".join(added_commands),
)
for add_command in added_commands:
if add_command:
self._real_commands.append(add_command)
else:
self._real_commands.append(command)
......
......@@ -745,6 +745,13 @@ class TestConfig(TestCase):
self._parse(config)
self.assertEqual(config.get_commands(), ["diag3", "diag2"])
def test_empty_alias(self):
"""Test alias parsing"""
config = Config()
self.mock_parser.add_value("ALIAS", "diag1", "")
self._parse(config)
self.assertEqual(config.get_commands(), ["diag2"])
def test_auto_clean_ram_disk(self):
"""Test that USE_RAMDISK forces AUTO_CLEAN to true"""
config = Config()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment