Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
etersoft-build-utils
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
korinf
etersoft-build-utils
Commits
465a350b
Commit
465a350b
authored
Mar 07, 2026
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tests: add version_to_tag roundtrip tests
parent
9bd7bf6c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
0 deletions
+27
-0
test_version_to_tag.sh
tests/test_version_to_tag.sh
+27
-0
No files found.
tests/test_version_to_tag.sh
0 → 100644
View file @
465a350b
#!/bin/sh
.
`
dirname
$0
`
/../share/eterbuild/functions/common
load_mod git
check
()
{
[
"
$2
"
!=
"
$3
"
]
&&
echo
"FATAL with '
$1
': result '
$2
' do not match with '
$3
'"
||
echo
"OK for '
$1
' with '
$2
'"
}
# version_to_tag
check
"tilde"
"
$(
version_to_tag
"1.0~rc1-alt1"
)
"
"1.0.tilde.rc1-alt1"
check
"plus"
"
$(
version_to_tag
"1.0+dfsg-alt1"
)
"
"1.0.plus.dfsg-alt1"
check
"both"
"
$(
version_to_tag
"1.0~rc1+dfsg-alt1"
)
"
"1.0.tilde.rc1.plus.dfsg-alt1"
check
"no special"
"
$(
version_to_tag
"1.0-alt1"
)
"
"1.0-alt1"
check
"multiple tilde"
"
$(
version_to_tag
"1.0~alpha~1-alt1"
)
"
"1.0.tilde.alpha.tilde.1-alt1"
# tag_to_version
check
"tilde back"
"
$(
tag_to_version
"1.0.tilde.rc1-alt1"
)
"
"1.0~rc1-alt1"
check
"plus back"
"
$(
tag_to_version
"1.0.plus.dfsg-alt1"
)
"
"1.0+dfsg-alt1"
check
"both back"
"
$(
tag_to_version
"1.0.tilde.rc1.plus.dfsg-alt1"
)
"
"1.0~rc1+dfsg-alt1"
check
"no special back"
"
$(
tag_to_version
"1.0-alt1"
)
"
"1.0-alt1"
# roundtrip
for
ver
in
"1.0~rc1-alt1"
"2.3+dfsg-alt2"
"1.0~beta1+repack-alt1"
"3.14-alt1"
;
do
check
"roundtrip
$ver
"
"
$(
tag_to_version
"
$(
version_to_tag
"
$ver
"
)
"
)
"
"
$ver
"
done
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment