summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xtest/autoprepend.t31
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"
+);