Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crop extension #1666

Merged
merged 28 commits into from
Oct 27, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
b708921
Always use FSharp.Core not fsharp.core (#1610)
dsyme Oct 14, 2016
79430d2
simplify use of if-defs (#1614)
dsyme Oct 14, 2016
8b434e0
Don't try to deploy vsix during OSS build. Specify prereq in vsixman…
KevinRansom Oct 14, 2016
2a9b5ef
Add fsx files to workspaces (#1612)
OmarTawfik Oct 15, 2016
00bab99
(Nugetize F# templates. Ensure value tuple installed on create templ…
KevinRansom Oct 15, 2016
749ba2d
Don't match braces at the end of the caret (#1619)
OmarTawfik Oct 15, 2016
e0318a8
FSharp ms build task to support new xommand line options (#1616)
KevinRansom Oct 15, 2016
2fe5a3b
Add support for generating sourcelink record in portable pdbs. Fixes…
KevinRansom Oct 15, 2016
d648787
Ensure that portable libraries have correct hintpath for preview 5
KevinRansom Oct 16, 2016
39480c4
Ensure that portable libraries have correct hintpath for preview 5 (#…
KevinRansom Oct 16, 2016
edfc77c
Merge https://github.com/Microsoft/visualfsharp
KevinRansom Oct 16, 2016
d64ff35
cleanup build and test scripts (#1615)
dsyme Oct 16, 2016
7d7033a
Merge https://github.com/Microsoft/visualfsharp
KevinRansom Oct 16, 2016
513f6e2
Replaced missed file
KevinRansom Oct 16, 2016
5ce7be0
merge from microsoft.master
KevinRansom Oct 20, 2016
560ba92
Fix merge issue
KevinRansom Oct 20, 2016
53adf55
fix merge error
KevinRansom Oct 20, 2016
4c08919
Merge https://github.com/Microsoft/visualfsharp
KevinRansom Oct 22, 2016
e01c62d
Merge branch 'master' of https://github.com/Microsoft/visualfsharp
KevinRansom Oct 25, 2016
30a7e2f
Update to nunit 3.5
KevinRansom Oct 26, 2016
7728b8c
Merge branch 'master' of https://github.com/Microsoft/visualfsharp
KevinRansom Oct 26, 2016
57cead1
Merge https://github.com/Microsoft/visualfsharp
KevinRansom Oct 26, 2016
fbe0980
Merge https://github.com/Microsoft/visualfsharp
KevinRansom Oct 26, 2016
e5c3723
revert unit runner to 3.0.0
KevinRansom Oct 26, 2016
24ea78c
Reduce number of times check path for illegal chars occurs in cropext…
KevinRansom Oct 26, 2016
8613b33
Merge branch 'master' of https://github.com/KevinRansom/visualfsharp
KevinRansom Oct 26, 2016
81d2962
Merge branch 'master' into cropextension
KevinRansom Oct 26, 2016
ffc9664
Merge branch 'revertnunitrunner' into cropextension
KevinRansom Oct 26, 2016
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions build.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -525,8 +525,8 @@ if '%BUILD_NET40%' == '1' (
call src\update.cmd %BUILD_CONFIG% -ngen
)

@echo set NUNITPATH=packages\NUnit.ConsoleRunner.3.5.0\tools\
set NUNITPATH=packages\NUnit.ConsoleRunner.3.5.0\tools\
@echo set NUNITPATH=packages\NUnit.Console.3.0.0\tools\
set NUNITPATH=packages\NUnit.Console.3.0.0\tools\
if not exist %NUNITPATH% echo Error: Could not find %NUNITPATH% && goto :failure

@echo xcopy "%NUNITPATH%*.*" "%~dp0tests\fsharpqa\testenv\bin\nunit\*.*" /S /Q /Y
Expand Down Expand Up @@ -596,7 +596,7 @@ setlocal enableDelayedExpansion


set NUNITPATH=%~dp0tests\fsharpqa\testenv\bin\nunit\
set NUNIT3_CONSOLE=%~dp0packages\NUnit.ConsoleRunner.3.5.0\tools\nunit3-console.exe
set NUNIT3_CONSOLE=%~dp0packages\NUnit.Console.3.0.0\tools\nunit3-console.exe
set link_exe=%~dp0packages\VisualCppTools.14.0.24519-Pre\lib\native\bin\link.exe
if not exist "%link_exe%" (
echo Error: failed to find '%link_exe%' use nuget to restore the VisualCppTools package
Expand Down
2 changes: 1 addition & 1 deletion packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<!-- Testing -->
<package id="FsCheck" version="2.0.3" />
<package id="NUnit" version="3.5.0" targetFramework="net45" />
<package id="NUnit.ConsoleRunner" version="3.5.0" targetFramework="net45" />
<package id="NUnit.Console" version="3.0.0" targetFramework="net45" />
<package id="NUnitLite" version="3.5.0" targetFramework="net45" />
<package id="NUnit3TestAdapter" version="3.0.8-ctp-8" targetFramework="net45" />
<package id="BenchmarkDotNet" version="0.9.8"/>
Expand Down
8 changes: 5 additions & 3 deletions src/utils/filename.fs
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,18 @@ let checkPathForIllegalChars (path:string) =
// Case sensitive (original behaviour preserved).
let checkSuffix (x:string) (y:string) = x.EndsWith(y,System.StringComparison.Ordinal)

let hasExtension (s:string) =
checkPathForIllegalChars s
let hasExtensionWithValidate (validate:bool) (s:string) =
if validate then (checkPathForIllegalChars s) |> ignore
let sLen = s.Length
(sLen >= 1 && s.[sLen - 1] = '.' && s <> ".." && s <> ".")
|| Path.HasExtension(s)

let hasExtension (s:string) = hasExtensionWithValidate true s

let chopExtension (s:string) =
checkPathForIllegalChars s
if s = "." then "" else // for OCaml compatibility
if not (hasExtension s) then
if not (hasExtensionWithValidate false s) then
raise (System.ArgumentException("chopExtension")) // message has to be precisely this, for OCaml compatibility, and no argument name can be set
Path.Combine (Path.GetDirectoryName s,Path.GetFileNameWithoutExtension(s))

Expand Down