Christian Couder
23681727e0
parse: fix parsing optional arg with stdin
...
License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2015-05-21 00:30:08 +02:00
Christian Couder
be3b7e13e3
parse_test: test command with optional arg
...
License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2015-05-20 22:47:14 +02:00
Lars Gierth
4e0ca860e9
parse_test: test unwanted stdin
2015-05-20 04:23:43 +02:00
Juan Batiz-Benet
c561c0980b
Merge pull request #1239 from rht/master
...
Add gofmt check
2015-05-19 04:03:23 -04:00
rht
ac7edddb94
Run 'gofmt -s -w' on these files
2015-05-19 06:11:15 +07:00
Christian Couder
275ec7c2a0
parse_test: test stdin enabled and not variadic arg
...
License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2015-05-18 00:24:13 +02:00
Christian Couder
c93d583f02
parse_test: add tests with 2 args and stdin
...
License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2015-05-17 23:48:56 +02:00
Christian Couder
5503c4cc89
parse_test: improve error messages
...
License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2015-05-17 23:14:08 +02:00
Christian Couder
97ab64af30
parse: don't use stdin if there are arguments
...
This should fix issue #1141 (ipfs cat "multihash too short"
error when using stdin) and perhaps others.
License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2015-05-17 21:19:12 +02:00
Christian Couder
ff9cb9ecf4
parse_test: test multiline stdin
...
License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2015-05-17 20:34:40 +02:00
Christian Couder
93f253e00b
parse_test: add testFail() to simplify tests
...
License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2015-05-03 20:18:40 +02:00
Christian Couder
47a88f8429
parse_test: improve existing tests
...
License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2015-05-03 20:10:28 +02:00
Christian Couder
c6dcfaaf5d
parse_test: use fileToSimulateStdin()
...
License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2015-05-03 12:09:13 +02:00
Christian Couder
58126c1c6c
parse_test: improve tests with stdin enabled arg
...
Now also check that we get the right arguments from
the parsing.
License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2015-05-02 23:35:24 +02:00
Christian Couder
d0752a714d
parse_test: add tests for stdin enabled arg
...
Let's document how stdin enabled arguments currently
work by adding some tests.
License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2015-05-02 23:02:57 +02:00
Christian Couder
3e4a06945f
parse_test: fix and test sameWords()
...
License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2015-05-02 23:02:57 +02:00
Christian Couder
2a5b2f2f4a
parse_test: move helper functions
...
License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2015-05-02 23:02:57 +02:00
Etienne Laurin
f168539030
Improve command line parsing
2015-04-27 17:19:38 +00:00
Ho-Sheng Hsiao
bf22aeec0a
Reorged imports from jbenet/go-ipfs to ipfs/go-ipfs
...
- Modified Godeps/Godeps.json by hand
- [TEST] Updated welcome docs hash to sharness
- [TEST] Updated contact doc
- [TEST] disabled breaking test (t0080-repo refs local)
2015-03-31 12:52:25 -07:00
Matt Bell
922f84878c
commands/cli: Added argument parse tests
2014-11-19 18:30:06 -08:00
Matt Bell
ae6f00d766
commands: Fixed tests
2014-11-19 00:36:42 -08:00
Matt Bell
6302356e15
commands: Fixed tests
2014-11-04 02:04:46 -08:00
Juan Batiz-Benet
184c25430b
go-vet friendly codebase
...
- distinguish log.Error and log.Errorf functions
- Initialize structs with field names
- A bit of unreachable code (defers)
2014-10-25 03:46:39 -07:00
Matt Bell
dd81bf630f
commands: Fixed tests
2014-10-21 18:07:49 -07:00
Juan Batiz-Benet
4986600e54
parsePath no err
2014-10-20 08:00:28 -07:00
Juan Batiz-Benet
7673ce6f65
fmt, lint, + vet commands/
2014-10-20 07:53:14 -07:00
Matt Bell
a9fa767b09
commands/cli: Added test for detecting duplicate options
2014-10-20 07:04:55 -07:00
Matt Bell
b48b12e425
commands/cli: Fixed test for new parsing
2014-10-20 07:04:55 -07:00
Matt Bell
86bc450b20
commands/cli: Pass option definitions as an argument to parseOptions
2014-10-20 07:04:53 -07:00
Matt Bell
97b8719075
commands/cli: Removed parser string handling since the go runtime handles it for us automatically
2014-10-20 07:04:53 -07:00
Matt Bell
5d9fa93c85
commands/cli: Added test for single-dash option value
2014-10-20 07:04:53 -07:00
Matt Bell
08885c0ced
commands/cli: Fixed tests for refactor
2014-10-20 07:04:52 -07:00
Matt Bell
66b0727de6
commands/cli: Renamed parse functions to parse*
2014-10-20 07:04:52 -07:00
Matt Bell
f437230d88
commands/cli: Added path/args test
2014-10-20 07:04:52 -07:00
Matt Bell
b3eecf4f64
commands/cli: Added simple option parser test
2014-10-20 07:04:52 -07:00