[DRE-commits] [ruby-aruba] 59/74: Moved output features to command

Hideki Yamane henrich at moszumanska.debian.org
Sat Nov 28 01:16:44 UTC 2015


This is an automated email from the git hooks/post-receive script.

henrich pushed a commit to branch debian/sid
in repository ruby-aruba.

commit 790822e0578486a2d241876a79bb734d153b2e96
Author: Dennis Günnewig <dg1 at ratiodata.de>
Date:   Fri Nov 27 09:02:22 2015 +0100

    Moved output features to command
---
 .../command/output.feature}                        | 71 ++++++++++++++++++++++
 .../output => steps/command}/stdout.feature        |  0
 2 files changed, 71 insertions(+)

diff --git a/features/commands/output/all_output.feature b/features/steps/command/output.feature
similarity index 84%
rename from features/commands/output/all_output.feature
rename to features/steps/command/output.feature
index da63add..2d3408b 100644
--- a/features/commands/output/all_output.feature
+++ b/features/steps/command/output.feature
@@ -444,3 +444,74 @@ Feature: All output of commands which were executed
     """
     When I run `cucumber`
     Then the features should all pass
+
+  Scenario: Handle little output
+    Given an executable named "bin/cli" with:
+    """bash
+    #!/usr/bin/env bash
+
+    for ((c=0; c<256; c = c+1)); do 
+      echo -n "a"
+    done
+    """
+    And a file named "features/flushing.feature" with:
+    """cucumber
+    Feature: Flushing output
+      Scenario: Run command
+        When I run `cli`
+        Then the output should contain "a"
+        And the output should be 256 bytes long
+        And the exit status should be 0
+    """
+    When I run `cucumber`
+    Then the features should all pass
+
+  Scenario: Handle tons of output
+
+    In order to test processes that output a lot of data
+    As a developer using Aruba
+    I want to make sure that large amounts of output aren't buffered
+
+    Given the default aruba exit timeout is 10 seconds
+    And an executable named "bin/cli" with:
+    """bash
+    #!/usr/bin/env bash
+
+    for ((c=0; c<65536; c = c+1)); do
+      echo -n "a"
+    done
+    """
+    And a file named "features/flushing.feature" with:
+    """cucumber
+    Feature: Flushing output
+      Scenario: Run command
+        When I run `cli`
+        Then the output should contain "a"
+        And the output should be 65536 bytes long
+        And the exit status should be 0
+    """
+    When I run `cucumber`
+    Then the features should all pass
+
+  Scenario: Handle tons of interactive output
+    Given the default aruba exit timeout is 10 seconds
+    And an executable named "bin/cli" with:
+    """bash
+    #!/usr/bin/env bash
+
+    read size; for ((c=0; c<$size; c = c+1)); do
+      echo -n "a"
+    done
+    """
+    And a file named "features/flushing.feature" with:
+    """cucumber
+    Feature: Flushing output
+      Scenario: Run command
+        When I run `cli` interactively
+        And I type "65536"
+        Then the output should contain "a"
+        And the output should be 65536 bytes long
+        And the exit status should be 0
+    """
+    When I run `cucumber`
+    Then the features should all pass
diff --git a/features/commands/output/stdout.feature b/features/steps/command/stdout.feature
similarity index 100%
rename from features/commands/output/stdout.feature
rename to features/steps/command/stdout.feature

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-aruba.git



More information about the Pkg-ruby-extras-commits mailing list