diff options
author | Brendan Taylor <whateley@gmail.com> | 2009-07-09 17:37:46 -0600 |
---|---|---|
committer | Brendan Taylor <whateley@gmail.com> | 2009-07-09 17:37:46 -0600 |
commit | 7aad409f8623ea8f881bef1020641cb87b800950 (patch) | |
tree | 0dd48ff0175ab62966b7aa203be5b6affa7b91ef /tests | |
parent | df924bde8429a2decf025ed57acd3412aa5355b0 (diff) |
test nested expansions
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test-expand.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/test-expand.c b/tests/test-expand.c index 72aef23..dcbe7e3 100644 --- a/tests/test-expand.c +++ b/tests/test-expand.c @@ -195,6 +195,16 @@ test_escape_expansion (void) { g_assert_cmpstr(expand("\\@<\"hi\">\\@", 0, FALSE), ==, "@<\"hi\">@"); } +void +test_nested (void) { + uzbl.gui.sbar.msg = "xxx"; + g_assert_cmpstr(expand("@<\"..@MSG..\">@", 0, FALSE), ==, "..xxx.."); + g_assert_cmpstr(expand("@<\"..\\@MSG..\">@", 0, FALSE), ==, "..@MSG.."); + + g_assert_cmpstr(expand("@(echo ..@MSG..)@", 0, FALSE), ==, "..xxx.."); + g_assert_cmpstr(expand("@(echo ..\\@MSG..)@", 0, FALSE), ==, "..@MSG.."); +} + int main (int argc, char *argv[]) { g_type_init(); @@ -218,6 +228,7 @@ main (int argc, char *argv[]) { g_test_add_func("/test-expand/escape_markup", test_escape_markup); g_test_add_func("/test-expand/escape_expansion", test_escape_expansion); + g_test_add_func("/test-expand/nested", test_nested); initialize(argc, argv); |