// Copyright 2025 The Gitea Authors. All rights reserved. // SPDX-License-Identifier: MIT package git import ( "testing" "github.com/stretchr/testify/assert" ) func TestArchiveType(t *testing.T) { name, archiveType := SplitArchiveNameType("test.tar.gz") assert.Equal(t, "test", name) assert.Equal(t, "tar.gz", archiveType.String()) name, archiveType = SplitArchiveNameType("a/b/test.zip") assert.Equal(t, "a/b/test", name) assert.Equal(t, "zip", archiveType.String()) name, archiveType = SplitArchiveNameType("1234.bundle") assert.Equal(t, "1234", name) assert.Equal(t, "bundle", archiveType.String()) name, archiveType = SplitArchiveNameType("test") assert.Equal(t, "test", name) assert.Equal(t, "unknown", archiveType.String()) name, archiveType = SplitArchiveNameType("test.xz") assert.Equal(t, "test.xz", name) assert.Equal(t, "unknown", archiveType.String()) } > Git with a cup of tea! Painless self-hosted all-in-one software development service, including Git hosting, code review, team collaboration, package registry and CI/CD: https://github.com/go-gitea/giteawww-data
aboutsummaryrefslogtreecommitdiffstats
path: root/poetry.toml
blob: 0299355b5ddada0664df6e4bf4bccac74ad6afa6 (plain)
1
2
3
4
[virtualenvs]
in-project = true
options.no-pip = true
options.no-setuptools = true