|
11 | 11 | :from_arguments => ["--angry", "foo"],
|
12 | 12 | :expects => "foo"
|
13 | 13 | )
|
| 14 | + expect(@logs).to be_empty |
14 | 15 | end
|
15 | 16 |
|
16 | 17 | it "parses a 'long' option with a value and converts '-' to '_' & warns" do
|
|
19 | 20 | :from_arguments => ["--an-gry", "foo"],
|
20 | 21 | :expects => "foo"
|
21 | 22 | )
|
22 |
| - expect(@logs).to have_matching_log(/Partial argument match detected: --an-gry. Partial argument matching will be deprecated in Puppet 9./) |
| 23 | + expect(@logs).to have_matching_log(/Partial argument match detected: correct argument is --an_gry, got --an-gry. Partial argument matching is deprecated and will be removed in a future release./) |
23 | 24 | end
|
24 | 25 |
|
25 | 26 | it "parses a 'long' option with a value and converts '_' to '-' & warns" do
|
|
28 | 29 | :from_arguments => ["--an_gry", "foo"],
|
29 | 30 | :expects => "foo"
|
30 | 31 | )
|
31 |
| - expect(@logs).to have_matching_log(/Partial argument match detected: --an_gry. Partial argument matching will be deprecated in Puppet 9./) |
| 32 | + expect(@logs).to have_matching_log(/Partial argument match detected: correct argument is --an-gry, got --an_gry. Partial argument matching is deprecated and will be removed in a future release./) |
32 | 33 | end
|
33 | 34 |
|
34 | 35 | it "parses a 'short' option with a value" do
|
|
37 | 38 | :from_arguments => ["-a", "foo"],
|
38 | 39 | :expects => "foo"
|
39 | 40 | )
|
| 41 | + expect(@logs).to be_empty |
40 | 42 | end
|
41 | 43 |
|
42 | 44 | it "overrides a previous argument with a later one" do
|
|
45 | 47 | :from_arguments => ["--later", "tomorrow", "--later", "morgen"],
|
46 | 48 | :expects => "morgen"
|
47 | 49 | )
|
| 50 | + expect(@logs).to be_empty |
48 | 51 | end
|
49 | 52 | end
|
50 | 53 |
|
|
63 | 66 | :from_arguments => ["--an_gry"],
|
64 | 67 | :expects => true
|
65 | 68 | )
|
66 |
| - expect(@logs).to have_matching_log(/Partial argument match detected: --an_gry. Partial argument matching will be deprecated in Puppet 9./) |
| 69 | + expect(@logs).to have_matching_log(/Partial argument match detected: correct argument is --an-gry, got --an_gry. Partial argument matching is deprecated and will be removed in a future release./) |
67 | 70 | end
|
68 | 71 |
|
69 | 72 | it "converts '-' to '_' with a 'long' option & warns" do
|
|
72 | 75 | :from_arguments => ["--an-gry"],
|
73 | 76 | :expects => true
|
74 | 77 | )
|
75 |
| - expect(@logs).to have_matching_log(/Partial argument match detected: --an-gry. Partial argument matching will be deprecated in Puppet 9./) |
| 78 | + expect(@logs).to have_matching_log(/Partial argument match detected: correct argument is --an_gry, got --an-gry. Partial argument matching is deprecated and will be removed in a future release./) |
76 | 79 | end
|
77 | 80 |
|
78 | 81 | it "parses a 'short' option" do
|
|
89 | 92 | :from_arguments => ["--no-rage"],
|
90 | 93 | :expects => false
|
91 | 94 | )
|
| 95 | + expect(@logs).to be_empty |
92 | 96 | end
|
93 | 97 |
|
94 | 98 | it "resolves '-' to '_' with '--no-blah' syntax" do
|
|
97 | 101 | :from_arguments => ["--no-an-gry"],
|
98 | 102 | :expects => false
|
99 | 103 | )
|
100 |
| - expect(@logs).to have_matching_log(/Partial argument match detected: --no-an-gry. Partial argument matching will be deprecated in Puppet 9./) |
| 104 | + expect(@logs).to have_matching_log(/Partial argument match detected: correct argument is --\[no-\]an_gry, got --no-an-gry. Partial argument matching is deprecated and will be removed in a future release./) |
101 | 105 | end
|
102 | 106 |
|
103 | 107 | it "resolves '_' to '-' with '--no-blah' syntax" do
|
|
106 | 110 | :from_arguments => ["--no-an_gry"],
|
107 | 111 | :expects => false
|
108 | 112 | )
|
109 |
| - expect(@logs).to have_matching_log(/Partial argument match detected: --no-an_gry. Partial argument matching will be deprecated in Puppet 9./) |
| 113 | + expect(@logs).to have_matching_log(/Partial argument match detected: correct argument is --\[no-\]an-gry, got --no-an_gry. Partial argument matching is deprecated and will be removed in a future release./) |
110 | 114 | end
|
111 | 115 |
|
112 | 116 | it "resolves '-' to '_' & warns when option is defined with '--no-blah syntax' but argument is given in '--option' syntax" do
|
|
115 | 119 | :from_arguments => ["--rag_e"],
|
116 | 120 | :expects => true
|
117 | 121 | )
|
118 |
| - expect(@logs).to have_matching_log(/Partial argument match detected: --rag_e. Partial argument matching will be deprecated in Puppet 9./) |
| 122 | + expect(@logs).to have_matching_log(/Partial argument match detected: correct argument is --\[no-\]rag-e, got --rag_e. Partial argument matching is deprecated and will be removed in a future release./) |
119 | 123 | end
|
120 | 124 |
|
121 | 125 | it "resolves '_' to '-' & warns when option is defined with '--no-blah syntax' but argument is given in '--option' syntax" do
|
|
124 | 128 | :from_arguments => ["--rag-e"],
|
125 | 129 | :expects => true
|
126 | 130 | )
|
127 |
| - expect(@logs).to have_matching_log(/Partial argument match detected: --rag-e. Partial argument matching will be deprecated in Puppet 9./) |
| 131 | + expect(@logs).to have_matching_log(/Partial argument match detected: correct argument is --\[no-\]rag_e, got --rag-e. Partial argument matching is deprecated and will be removed in a future release./) |
128 | 132 | end
|
129 | 133 |
|
130 | 134 | it "overrides a previous argument with a later one" do
|
|
133 | 137 | :from_arguments => ["--rage", "--no-rage"],
|
134 | 138 | :expects => false
|
135 | 139 | )
|
| 140 | + expect(@logs).to be_empty |
136 | 141 | end
|
137 | 142 | end
|
138 | 143 |
|
|
0 commit comments