diff options
author | Luke Shumaker <lukeshu@lukeshu.com> | 2018-09-29 15:00:21 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@lukeshu.com> | 2018-10-01 20:31:54 -0400 |
commit | f2294c82afae36bbd5772a86c6689fd4c12c50f0 (patch) | |
tree | 76c4b79054cdc8d58430db4d932cb94ebe49e290 /test/fixtures | |
parent | 872b692162a44307161aa98a3c5edaccc3c7b61a (diff) |
(BATS) test: Move files around
But don't edit them yet.
This directory structure is based on that of dbscripts.
Diffstat (limited to 'test/fixtures')
44 files changed, 594 insertions, 0 deletions
diff --git a/test/fixtures/librechroot/PKGBUILD-arches b/test/fixtures/librechroot/PKGBUILD-arches new file mode 100644 index 0000000..6116ad9 --- /dev/null +++ b/test/fixtures/librechroot/PKGBUILD-arches @@ -0,0 +1,22 @@ +pkgname='libretools-hello' +pkgver=1.0 +license=('GPL') +url='https://parabola.nu' + +pkgrel=1 +arch=(i686 x86_64) +depends=(sh) +depends_i686=('lsof') +depends_x86_64=('lsof') + +build() { + cd "$srcdir" + echo '#!/bin/sh' > hello.sh + echo 'echo Hello, world!' >> hello.sh + echo 'lsof' >> hello.sh +} + +package() { + cd "$srcdir" + install -Dm755 hello.sh "$pkgdir"/usr/bin/libretools-hello +} diff --git a/test/fixtures/librechroot/PKGBUILD-libretools b/test/fixtures/librechroot/PKGBUILD-libretools new file mode 100644 index 0000000..dcc0f61 --- /dev/null +++ b/test/fixtures/librechroot/PKGBUILD-libretools @@ -0,0 +1,20 @@ +pkgname='libretools-hello' +pkgver=1.0 +license=('GPL') +url='https://parabola.nu' + +pkgrel=1 +arch=(any) +depends=(libretools) + +build() { + cd "$srcdir" + echo '#!/bin/sh' > hello.sh + echo 'echo Hello, world!' >> hello.sh + echo 'lsof' >> hello.sh +} + +package() { + cd "$srcdir" + install -Dm755 hello.sh "$pkgdir"/usr/bin/libretools-hello +} diff --git a/test/fixtures/libredbdiff/expected-explicit.txt b/test/fixtures/libredbdiff/expected-explicit.txt new file mode 100644 index 0000000..8fb89bf --- /dev/null +++ b/test/fixtures/libredbdiff/expected-explicit.txt @@ -0,0 +1 @@ +p linux-libre linux 4.10.12_gnu-2 | 4.10.13-1 diff --git a/test/fixtures/libredbdiff/expected-implicit.txt b/test/fixtures/libredbdiff/expected-implicit.txt new file mode 100644 index 0000000..afc2689 --- /dev/null +++ b/test/fixtures/libredbdiff/expected-implicit.txt @@ -0,0 +1,2 @@ +[libre] +p linux-libre linux 4.10.12_gnu-2 | 4.10.13-1 diff --git a/test/fixtures/libredbdiff/statedir/pacman.archlinux/local/ALPM_DB_VERSION b/test/fixtures/libredbdiff/statedir/pacman.archlinux/local/ALPM_DB_VERSION new file mode 100644 index 0000000..ec63514 --- /dev/null +++ b/test/fixtures/libredbdiff/statedir/pacman.archlinux/local/ALPM_DB_VERSION @@ -0,0 +1 @@ +9 diff --git a/test/fixtures/libredbdiff/statedir/pacman.archlinux/sync/core.db b/test/fixtures/libredbdiff/statedir/pacman.archlinux/sync/core.db Binary files differnew file mode 100644 index 0000000..b0f737b --- /dev/null +++ b/test/fixtures/libredbdiff/statedir/pacman.archlinux/sync/core.db diff --git a/test/fixtures/libredbdiff/statedir/pacman.conf.archlinux b/test/fixtures/libredbdiff/statedir/pacman.conf.archlinux new file mode 100644 index 0000000..d4a9c8d --- /dev/null +++ b/test/fixtures/libredbdiff/statedir/pacman.conf.archlinux @@ -0,0 +1,6 @@ +[options] +DBPath = ./pacman.archlinux +Architecture = x86_64 + +[core] +Server = https://mirrors.kernel.org/archlinux/$repo/os/$arch diff --git a/test/fixtures/libredbdiff/statedir/pacman.conf.parabola b/test/fixtures/libredbdiff/statedir/pacman.conf.parabola new file mode 100644 index 0000000..7b553dd --- /dev/null +++ b/test/fixtures/libredbdiff/statedir/pacman.conf.parabola @@ -0,0 +1,6 @@ +[options] +DBPath = ./pacman.parabola +Architecture = x86_64 + +[libre] +Server = https://repomirror.parabola.nu/$repo/os/$arch diff --git a/test/fixtures/libredbdiff/statedir/pacman.parabola/local/ALPM_DB_VERSION b/test/fixtures/libredbdiff/statedir/pacman.parabola/local/ALPM_DB_VERSION new file mode 100644 index 0000000..ec63514 --- /dev/null +++ b/test/fixtures/libredbdiff/statedir/pacman.parabola/local/ALPM_DB_VERSION @@ -0,0 +1 @@ +9 diff --git a/test/fixtures/libredbdiff/statedir/pacman.parabola/sync/libre.db b/test/fixtures/libredbdiff/statedir/pacman.parabola/sync/libre.db Binary files differnew file mode 100644 index 0000000..1bd5065 --- /dev/null +++ b/test/fixtures/libredbdiff/statedir/pacman.parabola/sync/libre.db diff --git a/test/fixtures/librefetch/PKGBUILD-mksource b/test/fixtures/librefetch/PKGBUILD-mksource new file mode 100644 index 0000000..74489de --- /dev/null +++ b/test/fixtures/librefetch/PKGBUILD-mksource @@ -0,0 +1,19 @@ +pkgname=testpkg +pkgver=1.0 +pkgrel=1 +pkgdesc=foo +arch=(any) +source=("libre://$pkgname-$pkgver.tar.gz"{,.sig}) +backup=(etc/testpkg.conf) + +mksource() { + mkdir "$srcdir/bar" + local file + for file in '~foo' '~a' a A; do + touch "$srcdir/bar/$file" + done +} + +package() { + :; +} diff --git a/test/fixtures/librefetch/PKGBUILD-recurse b/test/fixtures/librefetch/PKGBUILD-recurse new file mode 100644 index 0000000..fad5976 --- /dev/null +++ b/test/fixtures/librefetch/PKGBUILD-recurse @@ -0,0 +1,18 @@ +pkgname=testpkg +pkgver=1.0 +pkgrel=1 +pkgdesc=foo +arch=(any) +source=("libre://$pkgname-$pkgver.tar.gz.sig") + +mksource() { + mkdir "$srcdir/bar" + local file + for file in '~foo' '~a' a A; do + touch "$srcdir/bar/$file" + done +} + +package() { + :; +} diff --git a/test/fixtures/librefetch/PKGBUILD-srcbuild b/test/fixtures/librefetch/PKGBUILD-srcbuild new file mode 100644 index 0000000..40c5c79 --- /dev/null +++ b/test/fixtures/librefetch/PKGBUILD-srcbuild @@ -0,0 +1,10 @@ +pkgname=testpkg +pkgver=1.0 +pkgrel=1 +pkgdesc=foo +arch=(any) +source=("libre://$pkgname-$pkgver.tar.gz"{,.sig}) + +package() { + :; +} diff --git a/test/fixtures/librefetch/SRCBUILD-srcbuild b/test/fixtures/librefetch/SRCBUILD-srcbuild new file mode 100644 index 0000000..6f172c5 --- /dev/null +++ b/test/fixtures/librefetch/SRCBUILD-srcbuild @@ -0,0 +1,21 @@ +pkgname=testpkg +pkgver=1.0 +pkgrel=1 +pkgdesc=foo +arch=(any) +source=() + +PKGDEST=$SRCDEST +PKGEXT=$SRCEXT + +build() { + mkdir "$srcdir/bar" + local file + for file in '~foo' '~a' a A; do + touch "$srcdir/bar/$file" + done +} + +package() { + cp -a -t "$pkgdir" "$srcdir"/* +} diff --git a/test/fixtures/librefetch/list.txt b/test/fixtures/librefetch/list.txt new file mode 100644 index 0000000..9bd32f4 --- /dev/null +++ b/test/fixtures/librefetch/list.txt @@ -0,0 +1,5 @@ +bar/ +bar/A +bar/a +bar/~a +bar/~foo diff --git a/test/fixtures/libremakepkg/PKGBUILD-distcc b/test/fixtures/libremakepkg/PKGBUILD-distcc new file mode 100644 index 0000000..5127ae6 --- /dev/null +++ b/test/fixtures/libremakepkg/PKGBUILD-distcc @@ -0,0 +1,23 @@ +pkgname='libretools-distcc' +pkgver=1.0 +license=('GPL') +url='https://parabola.nu' + +pkgrel=1 +arch=(any) +depends=(sh) + +build() { + cd "$srcdir" + echo '#!/bin/sh' > hello.sh + echo 'echo Hello, world!' >> hello.sh + # I don't like hard-coding in an implementation detail, but + # this is the simplest way to verify that `distcc-tool + # odaemon` started correctly. + [[ -S /socket ]] +} + +package() { + cd "$srcdir" + install -Dm755 hello.sh "$pkgdir"/usr/bin/libretools-hello +} diff --git a/test/fixtures/libremakepkg/PKGBUILD-hello b/test/fixtures/libremakepkg/PKGBUILD-hello new file mode 100644 index 0000000..5f320fe --- /dev/null +++ b/test/fixtures/libremakepkg/PKGBUILD-hello @@ -0,0 +1,19 @@ +pkgname='libretools-hello' +pkgver=1.0 +license=('GPL') +url='https://parabola.nu' + +pkgrel=1 +arch=(any) +depends=(sh) + +build() { + cd "$srcdir" + echo '#!/bin/sh' > hello.sh + echo 'echo Hello, world!' >> hello.sh +} + +package() { + cd "$srcdir" + install -Dm755 hello.sh "$pkgdir"/usr/bin/libretools-hello +} diff --git a/test/fixtures/libremakepkg/PKGBUILD-netbuild b/test/fixtures/libremakepkg/PKGBUILD-netbuild new file mode 100644 index 0000000..4db1274 --- /dev/null +++ b/test/fixtures/libremakepkg/PKGBUILD-netbuild @@ -0,0 +1,17 @@ +pkgname='libretools-netbuild' +pkgver=1.0 +license=('GPL') +url='https://parabola.nu' + +pkgrel=1 +arch=(any) + +build() { + cd "$srcdir" + curl https://repo.parabola.nu/ > index.html +} + +package() { + cd "$srcdir" + install -Dm644 index.html "$pkgdir"/usr/share/$pkgname/index.html +} diff --git a/test/fixtures/libremakepkg/PKGBUILD-netpackage b/test/fixtures/libremakepkg/PKGBUILD-netpackage new file mode 100644 index 0000000..6cadcf8 --- /dev/null +++ b/test/fixtures/libremakepkg/PKGBUILD-netpackage @@ -0,0 +1,12 @@ +pkgname='libretools-netpackage' +pkgver=1.0 +license=('GPL') +url='https://parabola.nu' + +pkgrel=1 +arch=(any) + +package() { + install -d "$pkgdir"/usr/share/$pkgname + curl https://repo.parabola.nu/ > "$pkgdir"/usr/share/$pkgname/index.html +} diff --git a/test/fixtures/libremakepkg/PKGBUILD-netprepare b/test/fixtures/libremakepkg/PKGBUILD-netprepare new file mode 100644 index 0000000..efb7a43 --- /dev/null +++ b/test/fixtures/libremakepkg/PKGBUILD-netprepare @@ -0,0 +1,17 @@ +pkgname='libretools-netprepare' +pkgver=1.0 +license=('GPL') +url='https://parabola.nu' + +pkgrel=1 +arch=(any) + +prepare() { + cd "$srcdir" + curl https://repo.parabola.nu/ > index.html +} + +package() { + cd "$srcdir" + install -Dm644 index.html "$pkgdir"/usr/share/$pkgname/index.html +} diff --git a/test/fixtures/libremakepkg/PKGBUILD-pkgver b/test/fixtures/libremakepkg/PKGBUILD-pkgver new file mode 100644 index 0000000..6b92d84 --- /dev/null +++ b/test/fixtures/libremakepkg/PKGBUILD-pkgver @@ -0,0 +1,23 @@ +pkgname='libretools-pkgver' +pkgver=1 +license=('GPL') +url='https://parabola.nu' + +pkgrel=1 +arch=(any) +depends=(sh) + +pkgver() { + echo 2 +} + +build() { + cd "$srcdir" + echo '#!/bin/sh' > hello.sh + echo 'echo Hello, world!' >> hello.sh +} + +package() { + cd "$srcdir" + install -Dm755 hello.sh "$pkgdir"/usr/bin/libretools-hello +} diff --git a/test/fixtures/libremakepkg/PKGBUILD-signed b/test/fixtures/libremakepkg/PKGBUILD-signed new file mode 100644 index 0000000..0979a85 --- /dev/null +++ b/test/fixtures/libremakepkg/PKGBUILD-signed @@ -0,0 +1,17 @@ +pkgname='libretools-signed' +pkgver=1.0 +license=('GPL') +url='https://parabola.nu' + +source=(hello.sh{,.sig}) +sha256sums=('1e70cef0dfe5ce1120ccde5e1551c7277bcddaa75a1808f49512f404e6b8aec8' + 'SKIP') + +pkgrel=1 +arch=(any) +depends=(sh) + +package() { + cd "$srcdir" + install -Dm755 hello.sh "$pkgdir"/usr/bin/libretools-hello +} diff --git a/test/fixtures/libremakepkg/PKGBUILD-testpkg1 b/test/fixtures/libremakepkg/PKGBUILD-testpkg1 new file mode 100644 index 0000000..8da1f14 --- /dev/null +++ b/test/fixtures/libremakepkg/PKGBUILD-testpkg1 @@ -0,0 +1,19 @@ +pkgname='libretools-testpkg1' +pkgver=1.0 +license=('GPL') +url='https://parabola.nu' + +pkgrel=1 +arch=(any) +depends=(sh) + +build() { + cd "$srcdir" + echo '#!/bin/sh' > testpkg1.sh + echo 'echo testpkg1' >> testpkg1.sh +} + +package() { + cd "$srcdir" + install -Dm755 testpkg1.sh "$pkgdir"/usr/bin/libretools-testpkg1 +} diff --git a/test/fixtures/libremakepkg/PKGBUILD-testpkg2 b/test/fixtures/libremakepkg/PKGBUILD-testpkg2 new file mode 100644 index 0000000..65d558e --- /dev/null +++ b/test/fixtures/libremakepkg/PKGBUILD-testpkg2 @@ -0,0 +1,19 @@ +pkgname='libretools-testpkg2' +pkgver=1.0 +license=('GPL') +url='https://parabola.nu' + +pkgrel=1 +arch=(any) +depends=(sh libretools-testpkg1) + +build() { + cd "$srcdir" + echo '#!/bin/sh' > testpkg2.sh + echo 'libretools-testpkg1' >> testpkg2.sh +} + +package() { + cd "$srcdir" + install -Dm755 testpkg2.sh "$pkgdir"/usr/bin/libretools-testpkg2 +} diff --git a/test/fixtures/libremakepkg/hello.sh b/test/fixtures/libremakepkg/hello.sh new file mode 100644 index 0000000..79a32fd --- /dev/null +++ b/test/fixtures/libremakepkg/hello.sh @@ -0,0 +1,2 @@ +#!/bin/sh +echo "Hello, world!" diff --git a/test/fixtures/librestage/PKGBUILD-hello b/test/fixtures/librestage/PKGBUILD-hello new file mode 100644 index 0000000..5f320fe --- /dev/null +++ b/test/fixtures/librestage/PKGBUILD-hello @@ -0,0 +1,19 @@ +pkgname='libretools-hello' +pkgver=1.0 +license=('GPL') +url='https://parabola.nu' + +pkgrel=1 +arch=(any) +depends=(sh) + +build() { + cd "$srcdir" + echo '#!/bin/sh' > hello.sh + echo 'echo Hello, world!' >> hello.sh +} + +package() { + cd "$srcdir" + install -Dm755 hello.sh "$pkgdir"/usr/bin/libretools-hello +} diff --git a/test/fixtures/librexgettext/.gitignore b/test/fixtures/librexgettext/.gitignore new file mode 100644 index 0000000..f0febc8 --- /dev/null +++ b/test/fixtures/librexgettext/.gitignore @@ -0,0 +1 @@ +!/*.pot diff --git a/test/fixtures/librexgettext/combine.pot b/test/fixtures/librexgettext/combine.pot new file mode 100644 index 0000000..80d066f --- /dev/null +++ b/test/fixtures/librexgettext/combine.pot @@ -0,0 +1,15 @@ +#: librexgettext.d/combine1.sh:4 +msgid "Flag a" +msgstr "" + +#: librexgettext.d/combine1.sh:5 +msgid "Flag b" +msgstr "" + +#: librexgettext.d/combine2.sh:4 +msgid "Flag 1" +msgstr "" + +#: librexgettext.d/combine2.sh:5 +msgid "Flag 2" +msgstr "" diff --git a/test/fixtures/librexgettext/combine1.sh b/test/fixtures/librexgettext/combine1.sh new file mode 100644 index 0000000..9946076 --- /dev/null +++ b/test/fixtures/librexgettext/combine1.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env bash +. libremessages + +flag -a 'Flag a' \ + -b 'Flag b' diff --git a/test/fixtures/librexgettext/combine2.sh b/test/fixtures/librexgettext/combine2.sh new file mode 100644 index 0000000..441e87a --- /dev/null +++ b/test/fixtures/librexgettext/combine2.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env bash +. libremessages + +flag -1 'Flag 1' \ + -2 'Flag 2' diff --git a/test/fixtures/librexgettext/test_librexgettext_fails_on_missing_final_flag_description.sh b/test/fixtures/librexgettext/test_librexgettext_fails_on_missing_final_flag_description.sh new file mode 100644 index 0000000..1c9fc23 --- /dev/null +++ b/test/fixtures/librexgettext/test_librexgettext_fails_on_missing_final_flag_description.sh @@ -0,0 +1,4 @@ +#!/usr/bin/env bash +. libremessages + +flag -a diff --git a/test/fixtures/librexgettext/test_librexgettext_fails_on_subshell_flag_descriptions.sh b/test/fixtures/librexgettext/test_librexgettext_fails_on_subshell_flag_descriptions.sh new file mode 100644 index 0000000..f6be764 --- /dev/null +++ b/test/fixtures/librexgettext/test_librexgettext_fails_on_subshell_flag_descriptions.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +. libremessages + +flag '-a' \ + "$(echo foo)" \ + '-h' \ + help diff --git a/test/fixtures/librexgettext/test_librexgettext_handles_librefetch_flags.pot b/test/fixtures/librexgettext/test_librexgettext_handles_librefetch_flags.pot new file mode 100644 index 0000000..0d76a49 --- /dev/null +++ b/test/fixtures/librexgettext/test_librexgettext_handles_librefetch_flags.pot @@ -0,0 +1,40 @@ +#: librexgettext.d/it_handles_librefetch_flags.sh:4 +msgid "Settings:" +msgstr "" + +#: librexgettext.d/it_handles_librefetch_flags.sh:5 +msgid "Force create mode (don't download)" +msgstr "" + +#: librexgettext.d/it_handles_librefetch_flags.sh:6 +msgid "Force download mode (don't create)" +msgstr "" + +#: librexgettext.d/it_handles_librefetch_flags.sh:7 +msgid "FILE" +msgstr "" + +#: librexgettext.d/it_handles_librefetch_flags.sh:7 +msgid "Use an alternate build script (instead of 'PKGBUILD'). If an " + "SRCBUILD exists in the same directory, it is used instead" +msgstr "" + +#: librexgettext.d/it_handles_librefetch_flags.sh:10 +msgid "Alternate modes:" +msgstr "" + +#: librexgettext.d/it_handles_librefetch_flags.sh:11 +msgid "Generate integrity checks for source files" +msgstr "" + +#: librexgettext.d/it_handles_librefetch_flags.sh:12 +msgid "Print the effective build script (SRCBUILD)" +msgstr "" + +#: librexgettext.d/it_handles_librefetch_flags.sh:13 +msgid "Generate and print the location of the effective makepkg script" +msgstr "" + +#: librexgettext.d/it_handles_librefetch_flags.sh:15 +msgid "Show this message" +msgstr "" diff --git a/test/fixtures/librexgettext/test_librexgettext_handles_librefetch_flags.sh b/test/fixtures/librexgettext/test_librexgettext_handles_librefetch_flags.sh new file mode 100644 index 0000000..579ca96 --- /dev/null +++ b/test/fixtures/librexgettext/test_librexgettext_handles_librefetch_flags.sh @@ -0,0 +1,15 @@ +#!/usr/bin/env bash +. libremessages + +flag 'Settings:' \ + "-C" "Force create mode (don't download)" \ + "-D" "Force download mode (don't create)" \ + "-p <$(_ FILE)>" "Use an alternate build script (instead of + 'PKGBUILD'). If an SRCBUILD exists in the same + directory, it is used instead" \ + 'Alternate modes:' \ + "-g, --geninteg" "Generate integrity checks for source files" \ + "-S, --srcbuild" "Print the effective build script (SRCBUILD)" \ + "-M, --makepkg" "Generate and print the location of the + effective makepkg script" \ + "-h, --help" "Show this message" diff --git a/test/fixtures/librexgettext/test_librexgettext_handles_multiple_skipped_flags.pot b/test/fixtures/librexgettext/test_librexgettext_handles_multiple_skipped_flags.pot new file mode 100644 index 0000000..cae2a17 --- /dev/null +++ b/test/fixtures/librexgettext/test_librexgettext_handles_multiple_skipped_flags.pot @@ -0,0 +1,58 @@ +#: librexgettext.d/it_handles_multiple_skipped_flags.sh:4 +msgid "Flag 1" +msgstr "" + +#: librexgettext.d/it_handles_multiple_skipped_flags.sh:4 +#: librexgettext.d/it_handles_multiple_skipped_flags.sh:6 +#: librexgettext.d/it_handles_multiple_skipped_flags.sh:7 +#: librexgettext.d/it_handles_multiple_skipped_flags.sh:8 +#: librexgettext.d/it_handles_multiple_skipped_flags.sh:9 +#: librexgettext.d/it_handles_multiple_skipped_flags.sh:10 +#: librexgettext.d/it_handles_multiple_skipped_flags.sh:11 +#: librexgettext.d/it_handles_multiple_skipped_flags.sh:13 +msgid "OPTARG" +msgstr "" + +#: librexgettext.d/it_handles_multiple_skipped_flags.sh:5 +msgid "Flag 2" +msgstr "" + +#: librexgettext.d/it_handles_multiple_skipped_flags.sh:6 +msgid "Flag 3" +msgstr "" + +#: librexgettext.d/it_handles_multiple_skipped_flags.sh:7 +msgid "Flag 4" +msgstr "" + +#: librexgettext.d/it_handles_multiple_skipped_flags.sh:8 +msgid "Flag 5" +msgstr "" + +#: librexgettext.d/it_handles_multiple_skipped_flags.sh:9 +msgid "Flag 6" +msgstr "" + +#: librexgettext.d/it_handles_multiple_skipped_flags.sh:10 +msgid "Flag 7" +msgstr "" + +#: librexgettext.d/it_handles_multiple_skipped_flags.sh:11 +msgid "Flag 8" +msgstr "" + +#: librexgettext.d/it_handles_multiple_skipped_flags.sh:13 +msgid "FLAG 1" +msgstr "" + +#: librexgettext.d/it_handles_multiple_skipped_flags.sh:14 +msgid "FLAG 2" +msgstr "" + +#: librexgettext.d/it_handles_multiple_skipped_flags.sh:16 +msgid "FLAG A" +msgstr "" + +#: librexgettext.d/it_handles_multiple_skipped_flags.sh:17 +msgid "FLAG B" +msgstr "" diff --git a/test/fixtures/librexgettext/test_librexgettext_handles_multiple_skipped_flags.sh b/test/fixtures/librexgettext/test_librexgettext_handles_multiple_skipped_flags.sh new file mode 100644 index 0000000..3b4dcee --- /dev/null +++ b/test/fixtures/librexgettext/test_librexgettext_handles_multiple_skipped_flags.sh @@ -0,0 +1,17 @@ +#!/usr/bin/env bash +. libremessages + +flag "-a $(_ OPTARG)" 'Flag 1' \ + '-b' 'Flag 2' \ + "-c $(_ OPTARG)" 'Flag 3' \ + "-d $(_ OPTARG)" 'Flag 4' \ + "-e $(_ OPTARG)" 'Flag 5' \ + "-f $(_ OPTARG)" 'Flag 6' \ + "-g $(_ OPTARG)" 'Flag 7' \ + "-h $(_ OPTARG)" 'Flag 8' + +flag "-A $(_ OPTARG)" 'FLAG 1' \ + '-B' 'FLAG 2' + +flag '-1' 'FLAG A' \ + '-2' 'FLAG B' diff --git a/test/fixtures/librexgettext/test_librexgettext_handles_zero_flags.pot b/test/fixtures/librexgettext/test_librexgettext_handles_zero_flags.pot new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/test/fixtures/librexgettext/test_librexgettext_handles_zero_flags.pot diff --git a/test/fixtures/librexgettext/test_librexgettext_handles_zero_flags.sh b/test/fixtures/librexgettext/test_librexgettext_handles_zero_flags.sh new file mode 100644 index 0000000..2b6369c --- /dev/null +++ b/test/fixtures/librexgettext/test_librexgettext_handles_zero_flags.sh @@ -0,0 +1,4 @@ +#!/usr/bin/env bash +. libremessages + +flag diff --git a/test/fixtures/pkgbuild-check-nonfree/PKGBUILD.free b/test/fixtures/pkgbuild-check-nonfree/PKGBUILD.free new file mode 100644 index 0000000..4b8f0dd --- /dev/null +++ b/test/fixtures/pkgbuild-check-nonfree/PKGBUILD.free @@ -0,0 +1,18 @@ +pkgname=wmii +pkgver=3.9.2 +pkgrel=3 +pkgdesc="A small, dynamic window manager for X11" +arch=('i686' 'x86_64') +license=('MIT') +url="http://wmii.suckless.org/" +depends=('libxft' 'libxrandr' 'libxinerama' 'dash') +source=() +md5sums=() + +build() { + : +} + +package() { + : +} diff --git a/test/fixtures/pkgbuild-check-nonfree/PKGBUILD.nonfree b/test/fixtures/pkgbuild-check-nonfree/PKGBUILD.nonfree new file mode 100644 index 0000000..3a7afa4 --- /dev/null +++ b/test/fixtures/pkgbuild-check-nonfree/PKGBUILD.nonfree @@ -0,0 +1,18 @@ +pkgname=wmii +pkgver=3.9.2 +pkgrel=3 +pkgdesc="A small, dynamic window manager for X11" +arch=('i686' 'x86_64') +license=('MIT') +url="http://wmii.suckless.org/" +depends=('skype') # random non-free package with no other information +source=() +md5sums=() + +build() { + : +} + +package() { + : +} diff --git a/test/fixtures/pkgbuild-check-nonfree/PKGBUILD.nonfree-replacement b/test/fixtures/pkgbuild-check-nonfree/PKGBUILD.nonfree-replacement new file mode 100644 index 0000000..7855bdc --- /dev/null +++ b/test/fixtures/pkgbuild-check-nonfree/PKGBUILD.nonfree-replacement @@ -0,0 +1,18 @@ +pkgname=wmii +pkgver=3.9.2 +pkgrel=3 +pkgdesc="A small, dynamic window manager for X11" +arch=('i686' 'x86_64') +license=('MIT') +url="http://wmii.suckless.org/" +depends=('linux') # random non-free package with a replacement +source=() +md5sums=() + +build() { + : +} + +package() { + : +} diff --git a/test/fixtures/toru/libre/simple/PKGBUILD b/test/fixtures/toru/libre/simple/PKGBUILD new file mode 100644 index 0000000..e2d44d1 --- /dev/null +++ b/test/fixtures/toru/libre/simple/PKGBUILD @@ -0,0 +1,11 @@ +pkgname='simple' +pkgver=1.0 +license=('GPL') +url='https://parabola.nu' + +pkgrel=1 +arch=(any) + +package() { + : +} diff --git a/test/fixtures/toru/libre/split-base/PKGBUILD b/test/fixtures/toru/libre/split-base/PKGBUILD new file mode 100644 index 0000000..ce547c5 --- /dev/null +++ b/test/fixtures/toru/libre/split-base/PKGBUILD @@ -0,0 +1,20 @@ +pkgbase=split-base +pkgname=(FOO BAR BAZ) +pkgver=1.0 +license=('GPL') +url='https://parabola.nu' + +pkgrel=1 +arch=(any) + +package_FOO() { + : +} + +package_BAR() { + : +} + +package_BAZ() { + : +} diff --git a/test/fixtures/toru/libre/split/PKGBUILD b/test/fixtures/toru/libre/split/PKGBUILD new file mode 100644 index 0000000..fe25a94 --- /dev/null +++ b/test/fixtures/toru/libre/split/PKGBUILD @@ -0,0 +1,19 @@ +pkgname=(foo bar baz) +pkgver=1.0 +license=('GPL') +url='https://parabola.nu' + +pkgrel=1 +arch=(any) + +package_foo() { + : +} + +package_bar() { + : +} + +package_baz() { + : +} |