diff options
author | Eric Wong <normalperson@yhbt.net> | 2013-08-24 20:58:25 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2013-08-24 20:58:25 +0000 |
commit | 09178fca7320ed4919b7c5e845598f9ad998d6d3 (patch) | |
tree | 6239d2783969d9fd10df1dadf02628e0d4f15b1a /test | |
parent | ef70b5de358a728caa105b91016433ad2e9eeece (diff) | |
download | dtas-09178fca7320ed4919b7c5e845598f9ad998d6d3.tar.gz |
Some effects may be easier to save/store with relative directory paths, so allow changing this at runtime.
Diffstat (limited to 'test')
-rw-r--r-- | test/test_player_integration.rb | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/test/test_player_integration.rb b/test/test_player_integration.rb index f7b1306..4ce0752 100644 --- a/test/test_player_integration.rb +++ b/test/test_player_integration.rb @@ -196,4 +196,25 @@ class TestPlayerIntegration < Minitest::Unit::TestCase assert(system("cmp", dump.path, expect.path), "files don't match #{dump.path} != #{expect.path}") end + + def test_cd_pwd + s = client_socket + pwd = Dir.pwd + + s.preq("pwd") + assert_equal pwd, s.readpartial(6666) + + s.preq("cd /") + assert_equal "OK", s.readpartial(6) + + s.preq("pwd") + assert_equal "/", s.readpartial(6) + + s.preq("cd /this-better-be-totally-non-existent-on-any-system-#{rand}") + err = s.readpartial(666) + assert_match(%r{\AERR }, err, err) + + s.preq("pwd") + assert_equal "/", s.readpartial(6) + end end |