diff options
author | Nathan Gass | 2022-09-22 17:36:28 +0200 |
---|---|---|
committer | Nathan Gass | 2022-09-22 17:36:28 +0200 |
commit | 2f68375409d55acb38a410ead7d07cb2c00aa417 (patch) | |
tree | 59c90ceb87c24d8d81bbe706a876b7858b006fbc /test | |
parent | d1522ded3aa85221d8f2671164564ea691aefecc (diff) | |
download | itools-2f68375409d55acb38a410ead7d07cb2c00aa417.tar.gz itools-2f68375409d55acb38a410ead7d07cb2c00aa417.tar.bz2 itools-2f68375409d55acb38a410ead7d07cb2c00aa417.zip |
basic tests for ED and D
Diffstat (limited to 'test')
-rwxr-xr-x | test/autoprepend.t | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/test/autoprepend.t b/test/autoprepend.t index 7cb33e5..beef5e0 100755 --- a/test/autoprepend.t +++ b/test/autoprepend.t @@ -36,3 +36,34 @@ is( "qux gna<bber", "T() with with language and quoted values" ); + +$var = "foo"; +$GLOBALS['debug_edplain'] = 1; +like( + D($var), + '\\$var=\'foo\'', + "D of a variable" +); +like( + D("bar"), + '\'bar\'', + "D of a string" +); + +putenv("IT_ED_STDERR=0"); + +ob_start(); +ED($var); +like( + ob_get_clean(), + '\\$var=\'foo\'', + "ED of a variable" +); + +ob_start(); +ED("bar"); +like( + ob_get_clean(), + '\'bar\'', + "ED of a variable" +); |