about summary refs log tree commit homepage
path: root/test/test_player_client_handler.rb
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2013-09-01 22:31:08 +0000
committerEric Wong <normalperson@yhbt.net>2013-09-01 22:31:08 +0000
commit8c77e3311e28cc73ff9959b3477d7028081940f3 (patch)
treed604e36759e7f2df2c79beb30880487b6e135c0d /test/test_player_client_handler.rb
parenta3fe4eabd4b3f1eaefb2589061e09787c000690d (diff)
downloaddtas-8c77e3311e28cc73ff9959b3477d7028081940f3.tar.gz
This allows users to display the current env value for introspection
Diffstat (limited to 'test/test_player_client_handler.rb')
-rw-r--r--test/test_player_client_handler.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/test_player_client_handler.rb b/test/test_player_client_handler.rb
index 21d8489..edcb35d 100644
--- a/test/test_player_client_handler.rb
+++ b/test/test_player_client_handler.rb
@@ -82,4 +82,16 @@ class TestPlayerClientHandler < Minitest::Unit::TestCase
     sink_handler(@io, %W(ls))
     assert_equal expect, Shellwords.split(@io[0])
   end
+
+  def test_env
+    env_handler(@io, [])
+    res = @io[0]
+    result = {}
+    Shellwords.split(res).each do |kv|
+      k, v = kv.split(/=/, 2)
+      result[k] = v
+    end
+    expect = ENV.to_hash
+    assert_equal expect, result
+  end
 end