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
0
Merge Requests
0
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
5707d7ef
Commit
5707d7ef
authored
Nov 08, 2017
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update tests
parent
2ae701b1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
1 deletion
+38
-1
test_isnumber.sh
tests/test_isnumber.sh
+35
-0
test_repl_find.sh
tests/test_repl_find.sh
+3
-1
No files found.
tests/test_isnumber.sh
0 → 100755
View file @
5707d7ef
#!/bin/sh
.
`
dirname
$0
`
/../share/eterbuild/functions/common
#load_mod spec
check
()
{
[
"
$2
"
!=
"
$3
"
]
&&
echo
"FATAL with '
$1
': result '
$2
' do not match with '
$3
'"
||
echo
"OK for '
$1
' with '
$2
'"
}
# TODO: move to lib
isnumber
()
{
#local num="$(("$*"))"
echo
"
$*
"
| filter_strip_spaces |
grep
-q
"^[0-9]
\+
$"
#[ "$num" != "0" ]
}
check_arg
()
{
check
"
$1
"
"
$(
isnumber
"
$1
"
;
echo
$?
)
"
"
$2
"
}
check_arg
""
"1"
check_arg
" "
"1"
check_arg
"5"
"0"
check_arg
" 6"
"0"
check_arg
"7 "
"0"
check_arg
"12"
"0"
check_arg
"12 5"
"1"
check_arg
"12 q"
"1"
check_arg
"q"
"1"
check_arg
"q w"
"1"
check_arg
"52q"
"1"
check_arg
"q52"
"1"
tests/test_repl_find.sh
View file @
5707d7ef
...
...
@@ -43,7 +43,8 @@ BUILDNAME=wine
DISTRNAME
=
Ubuntu
PKGVENDOR
=
ubuntu
PKGFORMAT
=
deb
DISTRVERSION
=
11.04
DISTRVERSION
=
16.04
BUILDARCH
=
x86_64
echo
"Replacement files for
$PKGVENDOR
/
$DISTRVERSION
(target
$PKGFORMAT
):"
...
...
@@ -52,6 +53,7 @@ print_pkgrepl_list
check_repl rpm-build-compat rpm-build-altlinux-compat
check_repl libusb-devel libusb-1.0-0-dev
check_repl libstdc++ libstdc++
check_repl perl-podlators perl
DISTRNAME
=
Mandriva
...
...
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