about summary refs log tree commit homepage
path: root/test
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2013-08-26 05:25:22 +0000
committerEric Wong <normalperson@yhbt.net>2013-08-26 05:25:22 +0000
commit2907cc6dd0b0d2d80d44ae292a157651d6e05ee7 (patch)
treeeba4f5253a37039acc8ec16cb0998ac2fe0a64b7 /test
parent3d96e3d4a3ad7fbf45b38c81478f04cffb329e25 (diff)
downloaddtas-2907cc6dd0b0d2d80d44ae292a157651d6e05ee7.tar.gz
We should be fully-capable of managing any number of options
to try sources in.
Diffstat (limited to 'test')
-rw-r--r--test/test_player_integration.rb17
-rw-r--r--test/test_rg_integration.rb2
2 files changed, 18 insertions, 1 deletions
diff --git a/test/test_player_integration.rb b/test/test_player_integration.rb
index 8f44b49..757ed35 100644
--- a/test/test_player_integration.rb
+++ b/test/test_player_integration.rb
@@ -188,4 +188,21 @@ class TestPlayerIntegration < Minitest::Unit::TestCase
 
     assert_equal "/", s.req("pwd")
   end
+
+  def test_source_ed
+    s = client_socket
+    assert_equal "sox av", s.req("source ls")
+    s.req_ok("source ed av tryorder=-1")
+    assert_equal "av sox", s.req("source ls")
+    s.req_ok("source ed av tryorder=")
+    assert_equal "sox av", s.req("source ls")
+
+    s.req_ok("source ed sox command=true")
+    sox = YAML.load(s.req("source cat sox"))
+    assert_equal "true", sox["command"]
+
+    s.req_ok("source ed sox command=")
+    sox = YAML.load(s.req("source cat sox"))
+    assert_equal DTAS::Source::Sox::SOX_DEFAULTS["command"], sox["command"]
+  end
 end
diff --git a/test/test_rg_integration.rb b/test/test_rg_integration.rb
index 3b78e07..b2e39cb 100644
--- a/test/test_rg_integration.rb
+++ b/test/test_rg_integration.rb
@@ -105,7 +105,7 @@ class TestRgIntegration < Minitest::Unit::TestCase
     pluck, _ = tmp_pluck
     cmd = DTAS::Source::Sox::SOX_DEFAULTS["command"]
     fifo = tmpfifo
-    s.req_ok("source ed command='env > #{fifo}; #{cmd}'")
+    s.req_ok("source ed sox command='env > #{fifo}; #{cmd}'")
     s.req_ok("sink ed default command='cat >/dev/null' active=true")
     s.req_ok(%W(enq #{pluck.path}))