Skip to content

Commit ac4a13b

Browse files
committed
Use String.concat to concatenate command line arguments
1 parent f422dc3 commit ac4a13b

File tree

3 files changed

+35
-35
lines changed

3 files changed

+35
-35
lines changed

src/fsharp/FSharp.Build/Fsc.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -589,7 +589,7 @@ type public Fsc () as this =
589589

590590
override fsc.GenerateResponseFileCommands() =
591591
let builder = generateCommandLineBuilder ()
592-
builder.GetCapturedArguments() |> Seq.fold(fun acc f -> acc + f + Environment.NewLine) ""
592+
builder.GetCapturedArguments() |> String.concat Environment.NewLine
593593

594594
// expose this to internal components (for nunit testing)
595595
member internal fsc.InternalGenerateCommandLineCommands() =

src/fsharp/FSharp.Build/Fsi.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ type public Fsi () as this =
322322

323323
override fsi.GenerateResponseFileCommands() =
324324
let builder = generateCommandLineBuilder ()
325-
builder.GetCapturedArguments() |> Seq.fold(fun acc f -> acc + f + Environment.NewLine) ""
325+
builder.GetCapturedArguments() |> String.concat Environment.NewLine
326326

327327
// expose this to internal components (for nunit testing)
328328
member internal fsi.InternalGenerateCommandLineCommands() =

vsintegration/tests/UnitTests/Tests.Build.fs

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ type Build() =
9393
"--fullpaths" + Environment.NewLine +
9494
"--flaterrors" + Environment.NewLine +
9595
"--highentropyva-" + Environment.NewLine +
96-
"--nocopyfsharpcore" + Environment.NewLine)
96+
"--nocopyfsharpcore")
9797
cmd
9898

9999
[<Test>]
@@ -109,7 +109,7 @@ type Build() =
109109
"--fullpaths" + Environment.NewLine +
110110
"--flaterrors" + Environment.NewLine +
111111
"--highentropyva-" + Environment.NewLine +
112-
"--nocopyfsharpcore" + Environment.NewLine)
112+
"--nocopyfsharpcore")
113113
cmd
114114

115115
[<Test>]
@@ -125,7 +125,7 @@ type Build() =
125125
"--fullpaths" + Environment.NewLine +
126126
"--flaterrors" + Environment.NewLine +
127127
"--highentropyva-" + Environment.NewLine +
128-
"--nocopyfsharpcore" + Environment.NewLine)
128+
"--nocopyfsharpcore")
129129
cmd
130130

131131
[<Test>]
@@ -143,7 +143,7 @@ type Build() =
143143
"--fullpaths" + Environment.NewLine +
144144
"--flaterrors" + Environment.NewLine +
145145
"--highentropyva-" + Environment.NewLine +
146-
"--nocopyfsharpcore" + Environment.NewLine)
146+
"--nocopyfsharpcore")
147147
cmd
148148

149149
[<Test>]
@@ -159,7 +159,7 @@ type Build() =
159159
"--fullpaths" + Environment.NewLine +
160160
"--flaterrors" + Environment.NewLine +
161161
"--highentropyva-" + Environment.NewLine +
162-
"--nocopyfsharpcore" + Environment.NewLine)
162+
"--nocopyfsharpcore")
163163
cmd
164164

165165
[<Test>]
@@ -174,7 +174,7 @@ type Build() =
174174
"--fullpaths" + Environment.NewLine +
175175
"--flaterrors" + Environment.NewLine +
176176
"--highentropyva-" + Environment.NewLine +
177-
"--nocopyfsharpcore" + Environment.NewLine)
177+
"--nocopyfsharpcore")
178178
cmd
179179

180180
[<Test>]
@@ -190,7 +190,7 @@ type Build() =
190190
"--fullpaths" + Environment.NewLine +
191191
"--flaterrors" + Environment.NewLine +
192192
"--highentropyva-" + Environment.NewLine +
193-
"--nocopyfsharpcore" + Environment.NewLine)
193+
"--nocopyfsharpcore")
194194
cmd
195195

196196
[<Test>]
@@ -206,7 +206,7 @@ type Build() =
206206
"--fullpaths" + Environment.NewLine +
207207
"--flaterrors" + Environment.NewLine +
208208
"--highentropyva-" + Environment.NewLine +
209-
"--nocopyfsharpcore" + Environment.NewLine)
209+
"--nocopyfsharpcore")
210210
cmd
211211

212212
[<Test>]
@@ -222,7 +222,7 @@ type Build() =
222222
"--fullpaths" + Environment.NewLine +
223223
"--flaterrors" + Environment.NewLine +
224224
"--highentropyva-" + Environment.NewLine +
225-
"--nocopyfsharpcore" + Environment.NewLine)
225+
"--nocopyfsharpcore")
226226
cmd
227227

228228
[<Test>]
@@ -238,7 +238,7 @@ type Build() =
238238
"--fullpaths" + Environment.NewLine +
239239
"--flaterrors" + Environment.NewLine +
240240
"--highentropyva-" + Environment.NewLine +
241-
"--nocopyfsharpcore" + Environment.NewLine)
241+
"--nocopyfsharpcore")
242242
cmd
243243

244244
[<Test>]
@@ -254,7 +254,7 @@ type Build() =
254254
"--fullpaths" + Environment.NewLine +
255255
"--flaterrors" + Environment.NewLine +
256256
"--highentropyva-" + Environment.NewLine +
257-
"--nocopyfsharpcore" + Environment.NewLine)
257+
"--nocopyfsharpcore")
258258
cmd
259259

260260
[<Test>]
@@ -270,7 +270,7 @@ type Build() =
270270
"--fullpaths" + Environment.NewLine +
271271
"--flaterrors" + Environment.NewLine +
272272
"--highentropyva-" + Environment.NewLine +
273-
"--nocopyfsharpcore" + Environment.NewLine)
273+
"--nocopyfsharpcore")
274274
cmd
275275

276276
[<Test>]
@@ -285,7 +285,7 @@ type Build() =
285285
"--fullpaths" + Environment.NewLine +
286286
"--flaterrors" + Environment.NewLine +
287287
"--highentropyva-" + Environment.NewLine +
288-
"--nocopyfsharpcore" + Environment.NewLine)
288+
"--nocopyfsharpcore")
289289
cmd
290290

291291
[<Test>]
@@ -301,7 +301,7 @@ type Build() =
301301
"--fullpaths" + Environment.NewLine +
302302
"--flaterrors" + Environment.NewLine +
303303
"--highentropyva-" + Environment.NewLine +
304-
"--nocopyfsharpcore" + Environment.NewLine)
304+
"--nocopyfsharpcore")
305305
cmd
306306

307307
[<Test>]
@@ -318,7 +318,7 @@ type Build() =
318318
"--highentropyva-" + Environment.NewLine +
319319
"--nocopyfsharpcore" + Environment.NewLine +
320320
"--yadda" + Environment.NewLine +
321-
"yadda" + Environment.NewLine)
321+
"yadda")
322322
cmd
323323

324324
[<Test>]
@@ -334,7 +334,7 @@ type Build() =
334334
"--fullpaths" + Environment.NewLine +
335335
"--flaterrors" + Environment.NewLine +
336336
"--highentropyva-" + Environment.NewLine +
337-
"--nocopyfsharpcore" + Environment.NewLine)
337+
"--nocopyfsharpcore")
338338
cmd
339339

340340
[<Test>]
@@ -350,7 +350,7 @@ type Build() =
350350
"--fullpaths" + Environment.NewLine +
351351
"--flaterrors" + Environment.NewLine +
352352
"--highentropyva-" + Environment.NewLine +
353-
"--nocopyfsharpcore" + Environment.NewLine)
353+
"--nocopyfsharpcore")
354354
cmd
355355

356356
[<Test>]
@@ -366,7 +366,7 @@ type Build() =
366366
"--fullpaths" + Environment.NewLine +
367367
"--flaterrors" + Environment.NewLine +
368368
"--highentropyva-" + Environment.NewLine +
369-
"--nocopyfsharpcore" + Environment.NewLine)
369+
"--nocopyfsharpcore")
370370
cmd
371371

372372
[<Test>]
@@ -382,7 +382,7 @@ type Build() =
382382
"--fullpaths" + Environment.NewLine +
383383
"--flaterrors" + Environment.NewLine +
384384
"--highentropyva-" + Environment.NewLine +
385-
"--nocopyfsharpcore" + Environment.NewLine)
385+
"--nocopyfsharpcore")
386386
cmd
387387

388388
[<Test>]
@@ -399,7 +399,7 @@ type Build() =
399399
"--fullpaths" + Environment.NewLine +
400400
"--flaterrors" + Environment.NewLine +
401401
"--highentropyva-" + Environment.NewLine +
402-
"--nocopyfsharpcore" + Environment.NewLine)
402+
"--nocopyfsharpcore")
403403
cmd
404404

405405
[<Test>]
@@ -416,7 +416,7 @@ type Build() =
416416
"--fullpaths" + Environment.NewLine +
417417
"--flaterrors" + Environment.NewLine +
418418
"--highentropyva-" + Environment.NewLine +
419-
"--nocopyfsharpcore" + Environment.NewLine)
419+
"--nocopyfsharpcore")
420420
cmd
421421

422422
[<Test>]
@@ -433,7 +433,7 @@ type Build() =
433433
"--fullpaths" + Environment.NewLine +
434434
"--flaterrors" + Environment.NewLine +
435435
"--highentropyva-" + Environment.NewLine +
436-
"--nocopyfsharpcore" + Environment.NewLine)
436+
"--nocopyfsharpcore")
437437
cmd
438438

439439
[<Test>]
@@ -449,7 +449,7 @@ type Build() =
449449
"--fullpaths" + Environment.NewLine +
450450
"--flaterrors" + Environment.NewLine +
451451
"--highentropyva-" + Environment.NewLine +
452-
"--nocopyfsharpcore" + Environment.NewLine)
452+
"--nocopyfsharpcore")
453453
cmd
454454

455455
[<Test>]
@@ -468,7 +468,7 @@ type Build() =
468468
"--highentropyva-" + Environment.NewLine +
469469
"--nocopyfsharpcore" + Environment.NewLine +
470470
src + Environment.NewLine +
471-
src + Environment.NewLine)
471+
src)
472472
cmd
473473
()
474474

@@ -485,7 +485,7 @@ type Build() =
485485
"--fullpaths" + Environment.NewLine +
486486
"--flaterrors" + Environment.NewLine +
487487
"--highentropyva-" + Environment.NewLine +
488-
"--nocopyfsharpcore" + Environment.NewLine)
488+
"--nocopyfsharpcore")
489489
cmd
490490

491491
[<Test>]
@@ -501,7 +501,7 @@ type Build() =
501501
"--fullpaths" + Environment.NewLine +
502502
"--flaterrors" + Environment.NewLine +
503503
"--highentropyva-" + Environment.NewLine +
504-
"--nocopyfsharpcore" + Environment.NewLine)
504+
"--nocopyfsharpcore")
505505
cmd
506506

507507
[<Test>]
@@ -517,7 +517,7 @@ type Build() =
517517
"--fullpaths" + Environment.NewLine +
518518
"--flaterrors" + Environment.NewLine +
519519
"--highentropyva-" + Environment.NewLine +
520-
"--nocopyfsharpcore" + Environment.NewLine)
520+
"--nocopyfsharpcore")
521521
cmd
522522

523523
[<Test>]
@@ -532,7 +532,7 @@ type Build() =
532532
"--fullpaths" + Environment.NewLine +
533533
"--flaterrors" + Environment.NewLine +
534534
"--highentropyva-" + Environment.NewLine +
535-
"--nocopyfsharpcore" + Environment.NewLine)
535+
"--nocopyfsharpcore")
536536
cmd
537537

538538
[<Test>]
@@ -547,7 +547,7 @@ type Build() =
547547
"--fullpaths" + Environment.NewLine +
548548
"--flaterrors" + Environment.NewLine +
549549
"--highentropyva-" + Environment.NewLine +
550-
"--nocopyfsharpcore" + Environment.NewLine)
550+
"--nocopyfsharpcore")
551551
cmd
552552

553553
[<Test>]
@@ -562,7 +562,7 @@ type Build() =
562562
"--fullpaths" + Environment.NewLine +
563563
"--flaterrors" + Environment.NewLine +
564564
"--highentropyva-" + Environment.NewLine +
565-
"--nocopyfsharpcore" + Environment.NewLine)
565+
"--nocopyfsharpcore")
566566
cmd
567567

568568
[<Test>]
@@ -576,7 +576,7 @@ type Build() =
576576
"--fullpaths" + Environment.NewLine +
577577
"--flaterrors" + Environment.NewLine +
578578
"--highentropyva+" + Environment.NewLine +
579-
"--nocopyfsharpcore" + Environment.NewLine)
579+
"--nocopyfsharpcore")
580580
cmd
581581

582582
[<Test>]
@@ -591,7 +591,7 @@ type Build() =
591591
"--flaterrors" + Environment.NewLine +
592592
"--subsystemversion:6.02" + Environment.NewLine +
593593
"--highentropyva-" + Environment.NewLine +
594-
"--nocopyfsharpcore" + Environment.NewLine)
594+
"--nocopyfsharpcore")
595595
cmd
596596

597597
[<Test>]
@@ -710,4 +710,4 @@ type Build() =
710710
"blah" |]
711711
AssertEqual expectedFlags hostObject.Flags
712712
let expectedSources = [| "foo.fs"; "C:\\Program Files\\spaces.fs" |]
713-
AssertEqual expectedSources hostObject.Sources
713+
AssertEqual expectedSources hostObject.Sources

0 commit comments

Comments
 (0)