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

Support empty alias

parent 5d234115
...@@ -238,7 +238,8 @@ class Config(object): ...@@ -238,7 +238,8 @@ class Config(object):
" ".join(added_commands), " ".join(added_commands),
) )
for add_command in added_commands: for add_command in added_commands:
self._real_commands.append(add_command) if add_command:
self._real_commands.append(add_command)
else: else:
self._real_commands.append(command) self._real_commands.append(command)
......
...@@ -745,6 +745,13 @@ class TestConfig(TestCase): ...@@ -745,6 +745,13 @@ class TestConfig(TestCase):
self._parse(config) self._parse(config)
self.assertEqual(config.get_commands(), ["diag3", "diag2"]) 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): def test_auto_clean_ram_disk(self):
"""Test that USE_RAMDISK forces AUTO_CLEAN to true""" """Test that USE_RAMDISK forces AUTO_CLEAN to true"""
config = Config() 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