@@ -187,24 +187,24 @@ func TestParsing(t *testing.T) {
187
187
parseAndCompare (t , "FOO= bar" , "FOO" , "bar" )
188
188
189
189
// parses double quoted values
190
- parseAndCompare (t , " FOO=\ " bar\" " , "FOO" , "bar" )
190
+ parseAndCompare (t , ` FOO="bar"` , "FOO" , "bar" )
191
191
192
192
// parses single quoted values
193
193
parseAndCompare (t , "FOO='bar'" , "FOO" , "bar" )
194
194
195
195
// parses escaped double quotes
196
- parseAndCompare (t , " FOO=escaped\\ \ " bar\" " , "FOO" , " escaped\ " bar" )
196
+ parseAndCompare (t , ` FOO=" escaped\"bar"` , "FOO" , ` escaped"bar` )
197
197
198
198
// parses yaml style options
199
199
parseAndCompare (t , "OPTION_A: 1" , "OPTION_A" , "1" )
200
200
201
201
// parses export keyword
202
202
parseAndCompare (t , "export OPTION_A=2" , "OPTION_A" , "2" )
203
- parseAndCompare (t , " export OPTION_B='\\ n'" , "OPTION_B" , "\n " )
203
+ parseAndCompare (t , ` export OPTION_B='\n'` , "OPTION_B" , "\n " )
204
204
205
205
// it 'expands newlines in quoted strings' do
206
206
// expect(env('FOO="bar\nbaz"')).to eql('FOO' => "bar\nbaz")
207
- parseAndCompare (t , " FOO=\ " bar\\ nbaz\" " , "FOO" , "bar\n baz" )
207
+ parseAndCompare (t , ` FOO="bar\nbaz"` , "FOO" , "bar\n baz" )
208
208
209
209
// it 'parses varibales with "." in the name' do
210
210
// expect(env('FOO.BAR=foobar')).to eql('FOO.BAR' => 'foobar')
@@ -224,14 +224,14 @@ func TestParsing(t *testing.T) {
224
224
225
225
// it 'allows # in quoted value' do
226
226
// expect(env('foo="bar#baz" # comment')).to eql('foo' => 'bar#baz')
227
- parseAndCompare (t , " FOO=\ " bar#baz\ " # comment" , "FOO" , "bar#baz" )
227
+ parseAndCompare (t , ` FOO="bar#baz" # comment` , "FOO" , "bar#baz" )
228
228
parseAndCompare (t , "FOO='bar#baz' # comment" , "FOO" , "bar#baz" )
229
- parseAndCompare (t , " FOO=\ " bar#baz#bang\ " # comment" , "FOO" , "bar#baz#bang" )
229
+ parseAndCompare (t , ` FOO="bar#baz#bang" # comment` , "FOO" , "bar#baz#bang" )
230
230
231
231
// it 'parses # in quoted values' do
232
232
// expect(env('foo="ba#r"')).to eql('foo' => 'ba#r')
233
233
// expect(env("foo='ba#r'")).to eql('foo' => 'ba#r')
234
- parseAndCompare (t , " FOO=\ " ba#r\" " , "FOO" , "ba#r" )
234
+ parseAndCompare (t , ` FOO="ba#r"` , "FOO" , "ba#r" )
235
235
parseAndCompare (t , "FOO='ba#r'" , "FOO" , "ba#r" )
236
236
237
237
// it 'throws an error if line format is incorrect' do
@@ -265,7 +265,7 @@ func TestLinesToIgnore(t *testing.T) {
265
265
}
266
266
267
267
// make sure we're not getting false positives
268
- if isIgnoredLine (" export OPTION_B='\\ n'" ) {
268
+ if isIgnoredLine (` export OPTION_B='\n'` ) {
269
269
t .Error ("ignoring a perfectly valid line to parse" )
270
270
}
271
271
}
0 commit comments