Arch Linux helpers and parsers
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

186 lines
3.7 KiB

package archlinux
import (
"bytes"
"testing"
)
func TestReadPackageDesc(t *testing.T) {
pkg, err := ReadPackageDesc(bytes.NewBufferString(testReadPackageDesc))
if err != nil {
t.Fatal(err)
}
// TODO(maze): checks
_ = pkg
}
var (
testReadPackageDesc = `%FILENAME%
perl-5.26.0-4-x86_64.pkg.tar.xz
%NAME%
perl
%VERSION%
5.26.0-4
%DESC%
A highly capable, feature-rich programming language
%GROUPS%
base
%CSIZE%
14343632
%ISIZE%
54492160
%MD5SUM%
08a8b1fcab42ec43fdf07c4a5b1b2f50
%SHA256SUM%
ab958e0796650557a227f7eff56924ea8d03160803f8d061717b6013ee0045c1
%PGPSIG%
iQEzBAABCAAdFiEEhs/8qRjPOvRxR1iAUeixSKmZnDQFAlmew3MACgkQUeixSKmZnDRRhwf/Q0Ve+pIQAxknR0v3p2FyWgfuanwYCpWhIZgTCKGCmCntayBKZ0U9v41Mac7PJ11AJvntNWJ9vhmR3dqpj6AOw6lXa4AGXUCHOmo21FMYEPltcp27zRCk/7FHFHwxDd+8y0cU8x4l7QVmTq4odMjAQiimMEcxY/jXsoUX084SzOQ02ix2DA67spFLAD7BC9z6tmdH9ABXaRA8QL51uQxGaQ+fxc8FKXFjOhbNyPcjOZasiwvrLboB/nQRfygf0baBSzzbM/hOnHVgqc3WfAqE1y4Qve8cE1L+2hhXXHaFCj9/v6vI1JZGQlMYisbhYMuK0n4kM4RbX7N6I78IHuRuyg==
%URL%
http://www.perl.org
%LICENSE%
GPL
PerlArtistic
%ARCH%
x86_64
%BUILDDATE%
1503575763
%PACKAGER%
Evangelos Foutras <evangelos@foutrelis.com>
%PROVIDES%
perl-archive-tar=2.24
perl-attribute-handlers=0.99
perl-autodie=2.29
perl-autoloader=5.74
perl-autouse=1.11
perl-b-debug=1.24
perl-base=2.25
perl-bignum=0.47
perl-carp=1.42
perl-compress-raw-bzip2=2.074
perl-compress-raw-zlib=2.074
perl-config-perl-v=0.28
perl-constant=1.33
perl-cpan-meta-requirements=2.140
perl-cpan-meta-yaml=0.018
perl-cpan-meta=2.150010
perl-cpan=2.18
perl-data-dumper=2.167
perl-db_file=1.840
perl-devel-ppport=3.35
perl-devel-selfstubber=1.06
perl-digest-md5=2.55
perl-digest-sha=5.96
perl-digest=1.17_01
perl-dumpvalue=1.18
perl-encode=2.88
perl-encoding-warnings=0.13
perl-env=1.04
perl-experimental=0.016
perl-exporter=5.72
perl-extutils-cbuilder=0.280225
perl-extutils-constant=0.23
perl-extutils-install=2.04
perl-extutils-makemaker=7.24
perl-extutils-manifest=1.70
perl-extutils-parsexs=3.34
perl-file-fetch=0.52
perl-file-path=2.12_01
perl-file-temp=0.2304
perl-filter-simple=0.93
perl-filter-util-call=1.55
perl-getopt-long=2.49
perl-http-tiny=0.070
perl-i18n-collate=1.02
perl-i18n-langtags=0.42
perl-if=0.0606
perl-io-compress=2.074
perl-io-socket-ip=0.38
perl-io-zlib=1.10
perl-io=1.38
perl-ipc-cmd=0.96
perl-ipc-sysv=2.07
perl-json-pp=2.27400_02
perl-lib=0.64
perl-libnet=3.10
perl-locale-codes=3.42
perl-locale-maketext-simple=0.21_01
perl-locale-maketext=1.28
perl-math-bigint-fastcalc=0.5005
perl-math-bigint=1.999806
perl-math-bigrat=0.2611
perl-math-complex=1.5901
perl-memoize=1.03_01
perl-mime-base64=3.15
perl-module-corelist=5.20170530
perl-module-load-conditional=0.68
perl-module-load=0.32
perl-module-loaded=0.08
perl-module-metadata=1.000033
perl-net-ping=2.55
perl-params-check=0.38
perl-parent=0.236
perl-pathtools=3.67
perl-perl-ostype=1.010
perl-perlfaq=5.021011
perl-perlio-via-quotedprint=0.08
perl-pod-checker=1.73
perl-pod-escapes=1.07
perl-pod-parser=1.63
perl-pod-perldoc=3.28
perl-pod-simple=3.35
perl-pod-usage=1.69
perl-podlators=5.006
perl-safe=2.40
perl-scalar-list-utils=1.46_02
perl-search-dict=1.07
perl-selfloader=1.23
perl-socket=2.020_03
perl-storable=2.62
perl-sys-syslog=0.35
perl-term-ansicolor=4.06
perl-term-cap=1.17
perl-term-complete=1.403
perl-term-readline=1.16
perl-test-harness=3.38
perl-test-simple=1.302073
perl-test=1.30
perl-text-abbrev=1.02
perl-text-balanced=2.03
perl-text-parsewords=3.30
perl-text-tabs=2013.0523
perl-thread-queue=3.12
perl-thread-semaphore=2.13
perl-threads-shared=1.56
perl-threads=2.15
perl-tie-file=1.02
perl-tie-refhash=1.39
perl-time-hires=1.9741
perl-time-local=1.25
perl-time-piece=1.31
perl-unicode-collate=1.19
perl-unicode-normalize=1.25
perl-version=0.9917
perl-xsloader=0.27
%DEPENDS%
gdbm
db
glibc
`
)