diff options
| author | Mark McLoughlin <markmc@redhat.com> | 2012-01-23 15:21:50 +0000 |
|---|---|---|
| committer | Mark McLoughlin <markmc@redhat.com> | 2012-01-23 15:23:41 +0000 |
| commit | 3ca8215426f8eb651174b6859e12e0a9f29d4494 (patch) | |
| tree | 0d23864433a0c152938c29dbdd5a40243765168c /tests | |
| parent | 35aa7a3485fe8ca19b4f7e4af6517b668404bc48 (diff) | |
Add cfg test case for recursive substitution
i.e. test that if blaa='blaa', foo='$blaa' and bar='$foo' that
the value of bar after substitutions is 'blaa'
Change-Id: I01d370832a871603b7cb47bfb3546f6aaad8c34d
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/unit/test_cfg.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/unit/test_cfg.py b/tests/unit/test_cfg.py index 2ca1182..0b5ee46 100644 --- a/tests/unit/test_cfg.py +++ b/tests/unit/test_cfg.py @@ -539,6 +539,14 @@ class TemplateSubstitutionTestCase(BaseTestCase): self._assert_str_sub() + def test_str_sub_default_from_default_recurse(self): + self.conf.register_cli_opt(StrOpt('blaa', default='blaa')) + self._prep_test_str_sub(foo_default='$blaa', bar_default='$foo') + + self.conf([]) + + self._assert_str_sub() + def test_str_sub_default_from_arg(self): self._prep_test_str_sub(bar_default='$foo') |
