about summary refs log tree commit homepage
path: root/t/reopen-logs.ru
diff options
context:
space:
mode:
Diffstat (limited to 't/reopen-logs.ru')
-rw-r--r--t/reopen-logs.ru14
1 files changed, 14 insertions, 0 deletions
diff --git a/t/reopen-logs.ru b/t/reopen-logs.ru
new file mode 100644
index 0000000..488da85
--- /dev/null
+++ b/t/reopen-logs.ru
@@ -0,0 +1,14 @@
+# frozen_string_literal: false
+use Rack::ContentLength
+use Rack::ContentType, "text/plain"
+run lambda { |env|
+
+  # our File objects for stderr/stdout should always have #path
+  # and be sync=true
+  ok = $stderr.sync &&
+       $stdout.sync &&
+       String === $stderr.path &&
+       String === $stdout.path
+
+  [ 200, {}, [ "#{ok}\n" ] ]
+}