Skip to content

Commit

Permalink
* Fixes tests
Browse files Browse the repository at this point in the history
  • Loading branch information
njlr committed Sep 16, 2019
1 parent 33e4b71 commit 0af7877
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 18 deletions.
3 changes: 0 additions & 3 deletions buckaroo-tests/Manifest.fs
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
module Buckaroo.Tests.Manifest

open System
open Xunit
open FSharpx

open Buckaroo
open Buckaroo.Tests
open Buckaroo
open Buckaroo.Tests

Expand Down
29 changes: 14 additions & 15 deletions buckaroo-tests/Paths.fs
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,25 @@ open System.IO
open Xunit
open Buckaroo

let private sep = new String([| Path.DirectorySeparatorChar |])

let private sep = String [| Path.DirectorySeparatorChar |]

[<Fact>]
let ``Paths.normalize works correctly`` () =
let ``Paths.normalize works correctly`` () =
let cases = [
(".", "");
("a", "a");
("a" + sep + "", "a" + sep + "");
("" + sep + "a" + sep + "", "" + sep + "a" + sep + "");
("a" + sep + " " + sep + "b", "a" + sep + " " + sep + "b");
("" + sep + "a" + sep + "", "" + sep + "a" + sep + "");
("b", "a" + sep + ".." + sep + "b");
("c" + sep + "d", "a" + sep + ".." + sep + "b" + sep + ".." + sep + "c" + sep + "." + sep + "." + sep + "." + sep + "d");
(".." + sep + ".." + sep + ".." + sep + "a" + sep + "b" + sep + "c", ".." + sep + ".." + sep + ".." + sep + "a" + sep + "b" + sep + "c");
(".." + sep + ".." + sep + ".." + sep + "a", ".." + sep + ".." + sep + ".." + sep + "." + sep + "a");
(".", "");
("a", "a");
("a" + sep + "", "a" + sep + "");
("" + sep + "a" + sep + "", "" + sep + "a" + sep + "");
("a" + sep + " " + sep + "b", "a" + sep + " " + sep + "b");
("" + sep + "a" + sep + "", "" + sep + "a" + sep + "");
("b", "a" + sep + ".." + sep + "b");
("c" + sep + "d", "a" + sep + ".." + sep + "b" + sep + ".." + sep + "c" + sep + "." + sep + "." + sep + "." + sep + "d");
(".." + sep + ".." + sep + ".." + sep + "a" + sep + "b" + sep + "c", ".." + sep + ".." + sep + ".." + sep + "a" + sep + "b" + sep + "c");
(".." + sep + ".." + sep + ".." + sep + "a", ".." + sep + ".." + sep + ".." + sep + "." + sep + "a");
(
".." + sep + ".." + sep + ".." + sep + ".." + sep + ".." + sep + ".." + sep + "buckaroo" + sep + "github" + sep + "buckaroo-pm" + sep + "pkg-config-cairo",
".." + sep + ".." + sep + ".." + sep + ".." + sep + ".." + sep + ".." + sep + "buckaroo" + sep + "github" + sep + "buckaroo-pm" + sep + "pkg-config-cairo",
".." + sep + ".." + sep + ".." + sep + ".." + sep + ".." + sep + ".." + sep + "." + sep + "buckaroo" + sep + "github" + sep + "buckaroo-pm" + sep + "pkg-config-cairo"
);
);
]

for (expected, input) in cases do
Expand Down
1 change: 1 addition & 0 deletions buckaroo-tests/Solver.fs
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ let solve (partial : Solution) (cookBook : CookBook) (lockBookEntries : LockBook
let lockBook = lockBookOf lockBookEntries
let console = ConsoleManager (LoggingLevel.Silent)
let context : TaskContext = {
BuildSystem = BuildSystem.Bazel
Console = console
DownloadManager = DownloadManager(console, "/tmp")
GitManager = new GitManager(CacheFirst, console, new GitCli(console), "/tmp")
Expand Down

0 comments on commit 0af7877

Please sign in to comment.