-
Notifications
You must be signed in to change notification settings - Fork 782
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
25560f4
commit 070be18
Showing
11 changed files
with
55 additions
and
156 deletions.
There are no files selected for viewing
21 changes: 0 additions & 21 deletions
21
tests/fsharpqa/Source/CompilerOptions/fsc/gccerrors/comparer.fsx
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1 @@ | ||
ReqENU SOURCE=gccerrors01.fs COMPILE_ONLY=1 SCFLAGS="--gccerrors --nologo gccerrors01.fs >gccerrors01.txt" POSTCMD="\$FSI_PIPE --nologo --quiet --exec comparer.fsx gccerrors01.txt gccerrors01.bsl" | ||
|
||
|
||
ReqENU SOURCE=gccerrors01.fs COMPILE_ONLY=1 SCFLAGS="--gccerrors --nologo gccerrors01.fs >gccerrors01.txt" POSTCMD="\$FSI_PIPE --nologo --quiet --exec ..\\..\\..\\comparer.fsx gccerrors01.txt gccerrors01.bsl" |
32 changes: 0 additions & 32 deletions
32
tests/fsharpqa/Source/CompilerOptions/fsc/help/comparer.fsx
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# ReqENU means that the test is non-localized | ||
|
||
ReqENU SOURCE=dummy.fsx COMPILE_ONLY=1 PRECMD="\$FSC_PIPE >help40.txt -? 2>&1" POSTCMD="\$FSI_PIPE --nologo --quiet --exec comparer.fsx help40.txt help40.437.1033.bsl" # -? | ||
ReqENU SOURCE=dummy.fsx COMPILE_ONLY=1 PRECMD="\$FSC_PIPE >help40.txt --help 2>&1" POSTCMD="\$FSI_PIPE --nologo --quiet --exec comparer.fsx help40.txt help40.437.1033.bsl" # --help | ||
ReqENU SOURCE=dummy.fsx COMPILE_ONLY=1 PRECMD="\$FSC_PIPE >help40.txt /? 2>&1" POSTCMD="\$FSI_PIPE --nologo --quiet --exec comparer.fsx help40.txt help40.437.1033.bsl" # /? | ||
ReqENU SOURCE=dummy.fsx COMPILE_ONLY=1 PRECMD="\$FSC_PIPE >help40.txt -? 2>&1" POSTCMD="\$FSI_PIPE --nologo --quiet --exec ..\\..\\..\\comparer.fsx help40.txt help40.437.1033.bsl" # -? | ||
ReqENU SOURCE=dummy.fsx COMPILE_ONLY=1 PRECMD="\$FSC_PIPE >help40.txt --help 2>&1" POSTCMD="\$FSI_PIPE --nologo --quiet --exec ..\\..\\..\\comparer.fsx help40.txt help40.437.1033.bsl" # --help | ||
ReqENU SOURCE=dummy.fsx COMPILE_ONLY=1 PRECMD="\$FSC_PIPE >help40.txt /? 2>&1" POSTCMD="\$FSI_PIPE --nologo --quiet --exec ..\\..\\..\\comparer.fsx help40.txt help40.437.1033.bsl" # /? | ||
|
33 changes: 0 additions & 33 deletions
33
tests/fsharpqa/Source/CompilerOptions/fsc/nologo/comparer.fsx
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
# Not really related to the --nologo option | ||
|
||
ReqENU SOURCE=dummy.fsx COMPILE_ONLY=1 PRECMD="\$FSC_PIPE >logo.txt 2>&1 || time /t" POSTCMD="\$FSI_PIPE --nologo --quiet --exec comparer.fsx logo.txt logo.437.1033.bsl" # fsc | ||
ReqENU SOURCE=dummy.fsx COMPILE_ONLY=1 PRECMD="\$FSC_PIPE >nologo.txt --nologo 2>&1 || time /t" POSTCMD="\$FSI_PIPE --nologo --quiet --exec comparer.fsx nologo.txt nologo.437.1033.bsl" # fsc --nologo | ||
ReqENU SOURCE=dummy.fsx COMPILE_ONLY=1 PRECMD="\$FSC_PIPE >logo.txt 2>&1 || time /t" POSTCMD="\$FSI_PIPE --nologo --quiet --exec ..\\..\\..\\comparer.fsx logo.txt logo.437.1033.bsl" # fsc | ||
ReqENU SOURCE=dummy.fsx COMPILE_ONLY=1 PRECMD="\$FSC_PIPE >nologo.txt --nologo 2>&1 || time /t" POSTCMD="\$FSI_PIPE --nologo --quiet --exec ..\\..\\..\\comparer.fsx nologo.txt nologo.437.1033.bsl" # fsc --nologo | ||
|
||
|
||
|
21 changes: 0 additions & 21 deletions
21
tests/fsharpqa/Source/CompilerOptions/fsi/exename/comparer.fsx
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
|
||
ReqENU SOURCE=dummy.fsx COMPILE_ONLY=1 SCFLAGS="--nologo --exename:fsharpi --help >help.txt" FSIMODE=EXEC POSTCMD="\$FSI_PIPE --nologo --quiet --exec comparer.fsx help.txt help40.437.1033.bsl" # -?-40 | ||
ReqENU SOURCE=dummy.fsx COMPILE_ONLY=1 SCFLAGS="--nologo --exename:fsharpi --help >help.txt" FSIMODE=EXEC POSTCMD="\$FSI_PIPE --nologo --quiet --exec ..\\..\\..\\comparer.fsx help.txt help40.437.1033.bsl" # -?-40 | ||
|
||
|
||
|
36 changes: 0 additions & 36 deletions
36
tests/fsharpqa/Source/CompilerOptions/fsi/help/comparer.fsx
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
|
||
ReqENU SOURCE=dummy.fsx COMPILE_ONLY=1 SCFLAGS="--nologo" FSIMODE=EXEC PRECMD="\$FSI_PIPE >help.txt -? 2>&1" POSTCMD="\$FSI_PIPE --nologo --quiet --exec comparer.fsx help.txt help40.437.1033.bsl" # -?-40 | ||
ReqENU SOURCE=dummy.fsx COMPILE_ONLY=1 SCFLAGS="--nologo" FSIMODE=EXEC PRECMD="\$FSI_PIPE >help.txt -? 2>&1" POSTCMD="\$FSI_PIPE --nologo --quiet --exec ..\\..\\..\\comparer.fsx help.txt help40.437.1033.bsl" # -?-40 | ||
|
||
ReqENU SOURCE=dummy.fsx COMPILE_ONLY=1 SCFLAGS="--nologo" FSIMODE=EXEC PRECMD="\$FSI_PIPE >help.txt --help 2>&1" POSTCMD="\$FSI_PIPE --nologo --quiet --exec comparer.fsx help.txt help40.437.1033.bsl" # --help-40 | ||
ReqENU SOURCE=dummy.fsx COMPILE_ONLY=1 SCFLAGS="--nologo" FSIMODE=EXEC PRECMD="\$FSI_PIPE >help.txt --help 2>&1" POSTCMD="\$FSI_PIPE --nologo --quiet --exec ..\\..\\..\\comparer.fsx help.txt help40.437.1033.bsl" # --help-40 | ||
|
||
ReqENU SOURCE=dummy.fsx COMPILE_ONLY=1 SCFLAGS="--nologo" FSIMODE=EXEC PRECMD="\$FSI_PIPE >help.txt /? 2>&1" POSTCMD="\$FSI_PIPE --nologo --quiet --exec comparer.fsx help.txt help40.437.1033.bsl" # /?-40 | ||
ReqENU SOURCE=dummy.fsx COMPILE_ONLY=1 SCFLAGS="--nologo" FSIMODE=EXEC PRECMD="\$FSI_PIPE >help.txt /? 2>&1" POSTCMD="\$FSI_PIPE --nologo --quiet --exec ..\\..\\..\\comparer.fsx help.txt help40.437.1033.bsl" # /?-40 | ||
|
||
# With --nologo | ||
ReqENU SOURCE=dummy.fsx COMPILE_ONLY=1 SCFLAGS="--nologo" FSIMODE=EXEC PRECMD="\$FSI_PIPE >help.txt --nologo -? 2>&1" POSTCMD="\$FSI_PIPE --nologo --quiet --exec comparer.fsx help.txt help40-nologo.437.1033.bsl" # -? --nologo-40 | ||
ReqENU SOURCE=dummy.fsx COMPILE_ONLY=1 SCFLAGS="--nologo" FSIMODE=EXEC PRECMD="\$FSI_PIPE >help.txt --nologo -? 2>&1" POSTCMD="\$FSI_PIPE --nologo --quiet --exec ..\\..\\..\\comparer.fsx help.txt help40-nologo.437.1033.bsl" # -? --nologo-40 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
// #NoMT #CompilerOptions #RequiresENU | ||
#light | ||
open System | ||
open System.IO | ||
open System.Text.RegularExpressions | ||
|
||
let arg0 = Environment.GetCommandLineArgs().[0] | ||
let path = Environment.GetEnvironmentVariable("PATH") | ||
let fn1 = fsi.CommandLineArgs.[1] | ||
let fn2 = fsi.CommandLineArgs.[2] | ||
|
||
// Read file into an array | ||
let File2List (filename:string) = File.ReadAllLines(filename) | ||
|
||
let f1 = File2List fn1 | ||
let f2 = File2List fn2 | ||
|
||
let mutable i = 0 | ||
let compare (f1:string[]) (f2:string[]) = | ||
if f1.Length <> f2.Length then failwithf "Help text did not match. f1.Length = %d, f2.Length = %d, Check you have right fsi on path. fsi = %s, PATH=%s" f1.Length f2.Length arg0 path | ||
(f1, f2) ||> Array.forall2 (fun (a:string) (b:string) -> | ||
|
||
let replace (sourcepattern:string) (replacement:string) (str:string) : string = | ||
Regex.Replace(str, sourcepattern, replacement) | ||
|
||
let normalizeText (str:string) = | ||
str |> replace @"F# Interactive version .+" "F# Interactive" | ||
|> replace @"F# Compiler version .+" "F# Compiler" | ||
|> replace "fsiAnyCpu.exe" "fsi.exe" | ||
|
||
let aa = normalizeText a | ||
let bb = normalizeText b | ||
|
||
i <- i+1 | ||
if (aa = bb) then | ||
true | ||
else | ||
printfn "Files differ at line %d:" i | ||
printfn "\t>> %s" a | ||
printfn "\t<< %s" b | ||
false | ||
) | ||
|
||
exit (if compare f1 f2 then 0 else 1) |