Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Kristian Klausen
aurweb
Commits
90ab7c7b
Commit
90ab7c7b
authored
Apr 25, 2017
by
Lukas Fleischer
Browse files
t1300: Factor out package dumping
Signed-off-by:
Lukas Fleischer
<
lfleischer@archlinux.org
>
parent
4be9aa63
Changes
1
Hide whitespace changes
Inline
Side-by-side
test/t1300-git-update.sh
View file @
90ab7c7b
...
...
@@ -4,6 +4,14 @@ test_description='git-update tests'
.
./setup.sh
dump_package_info
()
{
for
t
in
Packages Licenses PackageLicenses Groups PackageGroups
\
PackageDepends PackageRelations PackageSources
\
PackageNotifications
;
do
echo
"SELECT * FROM
$t
;"
| sqlite3 aur.db
done
}
test_expect_success
'Test update hook on a fresh repository.'
'
old=0000000000000000000000000000000000000000 &&
new=$(git -C aur.git rev-parse HEAD^) &&
...
...
@@ -16,12 +24,7 @@ test_expect_success 'Test update hook on a fresh repository.' '
1|1|python-pygit2||
1|1
EOF
>actual &&
for t in Packages Licenses PackageLicenses Groups PackageGroups \
PackageDepends PackageRelations PackageSources \
PackageNotifications; do
echo "SELECT * FROM $t;" | sqlite3 aur.db >>actual
done &&
dump_package_info >actual &&
test_cmp expected actual
'
...
...
@@ -44,12 +47,7 @@ test_expect_success 'Test update hook on another fresh repository.' '
1|1
2|1
EOF
>actual &&
for t in Packages Licenses PackageLicenses Groups PackageGroups \
PackageDepends PackageRelations PackageSources \
PackageNotifications; do
echo "SELECT * FROM $t;" | sqlite3 aur.db >>actual
done &&
dump_package_info >actual &&
test_cmp expected actual
'
...
...
@@ -70,12 +68,7 @@ test_expect_success 'Test update hook on an updated repository.' '
1|1
2|1
EOF
>actual &&
for t in Packages Licenses PackageLicenses Groups PackageGroups \
PackageDepends PackageRelations PackageSources \
PackageNotifications; do
echo "SELECT * FROM $t;" | sqlite3 aur.db >>actual
done &&
dump_package_info >actual &&
test_cmp expected actual
'
...
...
@@ -94,12 +87,7 @@ test_expect_success 'Test restore mode.' '
1|1
2|1
EOF
>actual &&
for t in Packages Licenses PackageLicenses Groups PackageGroups \
PackageDepends PackageRelations PackageSources \
PackageNotifications; do
echo "SELECT * FROM $t;" | sqlite3 aur.db >>actual
done &&
dump_package_info >actual &&
test_cmp expected actual
'
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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