Skip to content

Commit

Permalink
basic manifest-only pkg create test
Browse files Browse the repository at this point in the history
  • Loading branch information
cgull authored and bapt committed Dec 7, 2020
1 parent d9d925b commit c9b88d4
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions tests/frontend/create.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ tests_init \
create_from_plist_fflags create_from_plist_bad_fflags \
create_from_plist_with_keyword_arguments \
create_from_manifest_and_plist \
create_from_manifest \
create_from_plist_pkg_descr \
create_from_plist_hash \
create_from_plist_with_keyword_and_message \
Expand Down Expand Up @@ -498,6 +499,48 @@ EOF
pkg info -R --raw-format=ucl -F test-1.txz
}

create_from_manifest_body() {
genmanifest
cat <<EOF >> +MANIFEST
files: {
/testfile: {perm: 0644}
}
EOF
touch testfile
atf_check \
-o empty \
-e empty \
-s exit:0 \
pkg create -M ./+MANIFEST -r ${TMPDIR}

cat << EOF > output.ucl
name = "test";
origin = "test";
version = "1";
comment = "a test";
maintainer = "test";
www = "http://test";
abi = "*";
arch = "*";
prefix = "/";
flatsize = 0;
desc = "Yet another test";
categories [
"test",
]
files {
/testfile = "1\$e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";
}
EOF

atf_check \
-o file:output.ucl \
-e empty \
-s exit:0 \
pkg info -R --raw-format=ucl -F test-1.txz
}

create_from_plist_pkg_descr_body() {
genmanifest
cat << EOF > ./+DISPLAY
Expand Down

0 comments on commit c9b88d4

Please sign in to comment.