mirror of
https://github.com/unisonweb/unison.git
synced 2024-09-11 10:35:57 +03:00
Clean up tests and transcripts
This commit is contained in:
parent
1b5c93da11
commit
1f90eb365e
@ -6,7 +6,6 @@ import System.IO
|
||||
import System.IO.CodePage (withCP65001)
|
||||
import Unison.Test.ClearCache qualified as ClearCache
|
||||
import Unison.Test.Cli.Monad qualified as Cli.Monad
|
||||
import Unison.Test.GitSync qualified as GitSync
|
||||
import Unison.Test.LSP qualified as LSP
|
||||
import Unison.Test.UriParser qualified as UriParser
|
||||
|
||||
@ -16,7 +15,6 @@ test =
|
||||
[ LSP.test,
|
||||
ClearCache.test,
|
||||
Cli.Monad.test,
|
||||
GitSync.test,
|
||||
UriParser.test
|
||||
]
|
||||
|
||||
|
@ -6,7 +6,7 @@ import Data.These (These (..))
|
||||
import Data.Void (Void)
|
||||
import EasyTest
|
||||
import Text.Megaparsec qualified as P
|
||||
import Unison.Codebase.Editor.RemoteRepo (ReadGitRepo (..), ReadRemoteNamespace (..), ShareCodeserver (..), ShareUserHandle (..), WriteGitRemoteNamespace (..), WriteGitRepo (..), WriteRemoteNamespace (..), WriteShareRemoteNamespace (..), pattern ReadGitRemoteNamespace, pattern ReadShareLooseCode)
|
||||
import Unison.Codebase.Editor.RemoteRepo (ReadRemoteNamespace (..), ShareCodeserver (..), ShareUserHandle (..), WriteRemoteNamespace (..), WriteShareRemoteNamespace (..), pattern ReadShareLooseCode)
|
||||
import Unison.Codebase.Editor.UriParser qualified as UriParser
|
||||
import Unison.Codebase.Path qualified as Path
|
||||
import Unison.Codebase.ShortCausalHash (ShortCausalHash (..))
|
||||
@ -23,22 +23,7 @@ test =
|
||||
[ ("unisonweb.base._releases.M4", looseR "unisonweb" ["base", "_releases", "M4"]),
|
||||
("project", branchR (This "project")),
|
||||
("/branch", branchR (That "branch")),
|
||||
("project/branch", branchR (These "project" "branch")),
|
||||
("git(/srv/git/project.git)", gitR "/srv/git/project.git" Nothing Nothing []),
|
||||
("git(/srv/git/project.git:abc)#def.hij.klm", gitR "/srv/git/project.git" (Just "abc") (sch "def") ["hij", "klm"]),
|
||||
("git(srv/git/project.git)", gitR "srv/git/project.git" Nothing Nothing []),
|
||||
("git(srv/git/project.git:abc)#def.hij.klm", gitR "srv/git/project.git" (Just "abc") (sch "def") ["hij", "klm"]),
|
||||
("git(file:///srv/git/project.git)", gitR "file:///srv/git/project.git" Nothing Nothing []),
|
||||
("git(file:///srv/git/project.git:abc)#def.hij.klm", gitR "file:///srv/git/project.git" (Just "abc") (sch "def") ["hij", "klm"]),
|
||||
("git(file://srv/git/project.git)", gitR "file://srv/git/project.git" Nothing Nothing []),
|
||||
("git(file://srv/git/project.git:abc)#def.hij.klm", gitR "file://srv/git/project.git" (Just "abc") (sch "def") ["hij", "klm"]),
|
||||
("git(https://example.com/git/project.git)", gitR "https://example.com/git/project.git" Nothing Nothing []),
|
||||
("git(https://user@example.com/git/project.git:abc)#def.hij.klm", gitR "https://user@example.com/git/project.git" (Just "abc") (sch "def") ["hij", "klm"]),
|
||||
("git(ssh://git@8.8.8.8:222/user/project.git)", gitR "ssh://git@8.8.8.8:222/user/project.git" Nothing Nothing []),
|
||||
("git(ssh://git@github.com/user/project.git:abc)#def.hij.klm", gitR "ssh://git@github.com/user/project.git" (Just "abc") (sch "def") ["hij", "klm"]),
|
||||
("git(git@github.com:user/project.git)", gitR "git@github.com:user/project.git" Nothing Nothing []),
|
||||
("git(github.com:user/project.git)", gitR "github.com:user/project.git" Nothing Nothing []),
|
||||
("git(git@github.com:user/project.git:abc)#def.hij.klm", gitR "git@github.com:user/project.git" (Just "abc") (sch "def") ["hij", "klm"])
|
||||
("project/branch", branchR (These "project" "branch"))
|
||||
]
|
||||
[".unisonweb.base"],
|
||||
parserTests
|
||||
@ -47,33 +32,12 @@ test =
|
||||
[ ("unisonweb.base._releases.M4", looseW "unisonweb" ["base", "_releases", "M4"]),
|
||||
("project", branchW (This "project")),
|
||||
("/branch", branchW (That "branch")),
|
||||
("project/branch", branchW (These "project" "branch")),
|
||||
("git(/srv/git/project.git)", gitW "/srv/git/project.git" Nothing []),
|
||||
("git(srv/git/project.git)", gitW "srv/git/project.git" Nothing []),
|
||||
("git(file:///srv/git/project.git)", gitW "file:///srv/git/project.git" Nothing []),
|
||||
("git(file://srv/git/project.git)", gitW "file://srv/git/project.git" Nothing []),
|
||||
("git(https://example.com/git/project.git)", gitW "https://example.com/git/project.git" Nothing []),
|
||||
("git(ssh://git@8.8.8.8:222/user/project.git)", gitW "ssh://git@8.8.8.8:222/user/project.git" Nothing []),
|
||||
("git(git@github.com:user/project.git)", gitW "git@github.com:user/project.git" Nothing []),
|
||||
("git(github.com:user/project.git)", gitW "github.com:user/project.git" Nothing [])
|
||||
("project/branch", branchW (These "project" "branch"))
|
||||
]
|
||||
[ ".unisonweb.base",
|
||||
"git(/srv/git/project.git:abc)#def.hij.klm",
|
||||
"git(srv/git/project.git:abc)#def.hij.klm",
|
||||
"git(file:///srv/git/project.git:abc)#def.hij.klm",
|
||||
"git(file://srv/git/project.git:abc)#def.hij.klm",
|
||||
"git(https://user@example.com/git/project.git:abc)#def.hij.klm",
|
||||
"git(ssh://git@github.com/user/project.git:abc)#def.hij.klm",
|
||||
"git(git@github.com:user/project.git:abc)#def.hij.klm"
|
||||
[ ".unisonweb.base"
|
||||
]
|
||||
]
|
||||
|
||||
gitR :: Text -> Maybe Text -> Maybe ShortCausalHash -> [NameSegment] -> ReadRemoteNamespace void
|
||||
gitR url ref sch path = ReadRemoteNamespaceGit (ReadGitRemoteNamespace (ReadGitRepo url ref) sch (Path.fromList path))
|
||||
|
||||
gitW :: Text -> Maybe Text -> [NameSegment] -> WriteRemoteNamespace void
|
||||
gitW url branch path = WriteRemoteNamespaceGit (WriteGitRemoteNamespace (WriteGitRepo url branch) (Path.fromList path))
|
||||
|
||||
looseR :: Text -> [NameSegment] -> ReadRemoteNamespace void
|
||||
looseR user path =
|
||||
ReadShare'LooseCode (ReadShareLooseCode DefaultCodeserver (ShareUserHandle user) (Path.fromList path))
|
||||
|
Loading…
Reference in New Issue
Block a user