pro1-tester 0.1.4 → 0.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1fdcca20d6872d51e87b65712952ce701dc9e75f
4
- data.tar.gz: 68f2b25604b2a98ec94ab0ed62f2890a48c64ce1
3
+ metadata.gz: 1abbc535664a8e672d685fca73d5bff9e755c7e4
4
+ data.tar.gz: a04a198ad4661b8bb1df38f95c3e3633a3ceb80b
5
5
  SHA512:
6
- metadata.gz: 8c4586d9302aa94a6df3824572095c815382cb17875578beb25e58e4579acbf04c531c70fa3a2c5ad0be3c0b5b7767ab13cd98c706ef1d44b83522269d398642
7
- data.tar.gz: 5e6fb0d0d60bc38d868806ef448283ac99c75d2073fd731ac3c6640083fe35e9ea4edc91ebf8a58cb0c2ced2bf16ca176d9654e9bc942fd6d5c919497b3bb425
6
+ metadata.gz: f66446057ecd764bbf4acd91e3dee56e37410d638e33acff3cb6e6092421d93713e04bdcb0c2b71aad3e515487460a795f38a94efbfcee8b7383dc8dad148171
7
+ data.tar.gz: 0b49c5a289171799b2ff6ec9447fa3eb7ac48f8d21e2e9e8101aff3240f1002bd6fea1a40b0c2f27748bf59bf32c018d0258c0a76ed121133c6740d3363fa2e1
data/README.md CHANGED
@@ -30,8 +30,6 @@ pro1-tester
30
30
  ```
31
31
  を実行するとテスト結果がでます。
32
32
 
33
- ※KO Unix では`pro1-tester`の前に`mkdir tmp`を実行しないとうまくいかないみたい
34
-
35
33
 
36
34
  |オプション|説明|
37
35
  |--:|:--|
@@ -55,8 +53,8 @@ vim ~/.bash_profile
55
53
  `PATH=$PATH:$HOME/bin`という行があると思うので、次のように`$HOME/.gem/ruby/2.3.0/bin`を追記します:
56
54
 
57
55
  ```
58
- # PATH=$PATH:$HOME/bin # 変更前
59
- PATH=$PATH:$HOME/bin:$HOME/.gem/ruby/2.3.0/bin #変更後
56
+ # 追記
57
+ PATH=$PATH:$HOME/.gem/ruby/2.3.0/bin
60
58
  ```
61
59
 
62
60
  `.bash_profile`を再読み込みします
@@ -97,6 +95,20 @@ docker run -it --rm -v "$PWD":/app/ -w /app/ my-ruby-image pro1-tester
97
95
  **YAML** の記法で書いていきます。
98
96
  基本的に雰囲気で書けばOKです。
99
97
 
98
+ ```
99
+ - target: a-01
100
+ testcase:
101
+ - input: |
102
+ stdin
103
+ args: |
104
+ command line args
105
+ expect: |
106
+ expectation of stdout
107
+ label: |
108
+ printed when this testcase raises error
109
+
110
+ ```
111
+
100
112
  - 出力だけ見るプログラムの場合、`input`は省略可能です。
101
113
  - `label`は`it`に渡すアレです。省略した場合はデフォルトのラベルが使われます。
102
114
  - `input`に特定の文字(`"`とか`\`とか)が含まれるときはエスケープが必要です。
data/lib/core.rb CHANGED
@@ -61,8 +61,8 @@ module Pro1Tester
61
61
  testcases = task["testcase"]
62
62
 
63
63
  testcases.each do |testcase|
64
- # Open3.popen3(File.join(DIR_BASE, DIST_DIR, src_file_identifer)) do |stdin, stdout, stderr, wait_thr|
65
- Open3.popen3(File.join(DIR_PWD, DIST_DIR, src_file_identifer)) do |stdin, stdout, stderr, wait_thr|
64
+ args = testcase.fetch('args', '')
65
+ Open3.popen3(File.join(DIR_PWD, DIST_DIR, src_file_identifer) + ' ' + args) do |stdin, stdout, stderr, wait_thr|
66
66
  if testcase.has_key? "input"
67
67
  stdin.write testcase["input"]
68
68
  stdin.close
@@ -1,3 +1,3 @@
1
1
  module Pro1Tester
2
- VERSION = "0.1.4"
2
+ VERSION = "0.1.5"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pro1-tester
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kumassy
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-06-28 00:00:00.000000000 Z
11
+ date: 2016-07-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler