This repository has been archived by the owner on Aug 20, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
/
docstring.feature
74 lines (72 loc) · 3.33 KB
/
docstring.feature
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
Feature: docstring parser
In order to have a reliable parser
As a test suite
I need to snapshot test the docstring
Scenario: should correctly parse the docstring
Given the docstring:
"""
usage: git clone [<options>] [--] <repo> [<dir>]
-v, --verbose be more verbose
-q, --quiet be more quiet
--progress force progress reporting
-n, --no-checkout don't create a checkout
--bare create a bare repository
--mirror create a mirror repository (implies bare)
-l, --local to clone from a local repository
--no-hardlinks don't use local hardlinks, always copy
-s, --shared setup as shared repository
--recurse-submodules[=<pathspec>] initialize submodules in the clone
-j, --jobs <n> number of submodules cloned in parallel
--template <template-directory> directory from which templates will be used
--reference <repo> reference repository
--reference-if-able <repo> reference repository
--dissociate use --reference only while cloning
-o, --origin <name> use <name> instead of 'origin' to track upstream
-b, --branch <branch> checkout <branch> instead of the remote's HEAD
-u, --upload-pack <path> path to git-upload-pack on the remote
--depth <depth> create a shallow clone of that depth
--shallow-since <time> create a shallow clone since a specific time
--shallow-exclude <revision> deepen history of shallow clone, excluding rev
--single-branch clone only one branch, HEAD or --branch
--no-tags don't clone any tags, and make later fetches not to follow them
--shallow-submodules any cloned submodules will be shallow
--separate-git-dir <gitdir> separate git dir from working tree
-c, --config <key=value> set config inside the new repository
-4, --ipv4 use IPv4 addresses only
-6, --ipv6 use IPv6 addresses only
--filter <args> object filtering
"""
When I call the parser
Then the returning value should be equal
"""
{[{
[{-v , } {--verbose }]} {
[{-q , } {--quiet }]} {
[{--progress }]} {
[{-n , } {--no-checkout }]} {
[{--bare }]} {
[{--mirror }]} {
[{-l , } {--local }]} {
[{--no-hardlinks }]} {
[{-s , } {--shared }]} {
[{--recurse-submodules }]} {
[{-j , } {--jobs }]} {
[{--template }]} {
[{--reference }]} {
[{--reference-if-able }]} {
[{--dissociate }]} {
[{-o , } {--origin }]} {
[{-b , } {--branch }]} {
[{-u , } {--upload-pack }]} {
[{--depth }]} {
[{--shallow-since }]} {
[{--shallow-exclude }]} {
[{--single-branch }]} {
[{--no-tags }]} {
[{--shallow-submodules }]} {
[{--separate-git-dir }]} {
[{-c , } {--config }]} {
[{-4 , } {--ipv4 }]} {
[{-6 , } {--ipv6 }]} {
[{--filter }]}] }
"""