summaryrefslogtreecommitdiffstats
path: root/vendor/gix-glob/tests/fixtures
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 12:41:41 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 12:41:41 +0000
commit10ee2acdd26a7f1298c6f6d6b7af9b469fe29b87 (patch)
treebdffd5d80c26cf4a7a518281a204be1ace85b4c1 /vendor/gix-glob/tests/fixtures
parentReleasing progress-linux version 1.70.0+dfsg1-9~progress7.99u1. (diff)
downloadrustc-10ee2acdd26a7f1298c6f6d6b7af9b469fe29b87.tar.xz
rustc-10ee2acdd26a7f1298c6f6d6b7af9b469fe29b87.zip
Merging upstream version 1.70.0+dfsg2.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/gix-glob/tests/fixtures')
-rw-r--r--vendor/gix-glob/tests/fixtures/generated-archives/make_baseline.tar.xzbin0 -> 10428 bytes
-rw-r--r--vendor/gix-glob/tests/fixtures/make_baseline.sh158
2 files changed, 158 insertions, 0 deletions
diff --git a/vendor/gix-glob/tests/fixtures/generated-archives/make_baseline.tar.xz b/vendor/gix-glob/tests/fixtures/generated-archives/make_baseline.tar.xz
new file mode 100644
index 000000000..5fc9dfdf1
--- /dev/null
+++ b/vendor/gix-glob/tests/fixtures/generated-archives/make_baseline.tar.xz
Binary files differ
diff --git a/vendor/gix-glob/tests/fixtures/make_baseline.sh b/vendor/gix-glob/tests/fixtures/make_baseline.sh
new file mode 100644
index 000000000..5787ff64c
--- /dev/null
+++ b/vendor/gix-glob/tests/fixtures/make_baseline.sh
@@ -0,0 +1,158 @@
+#!/bin/bash
+set -eu -o pipefail
+
+git init -q
+git config core.autocrlf false
+git config core.ignorecase false
+
+while read -r pattern value; do
+ echo "$pattern" "$value"
+ echo "$pattern" > .gitignore
+ echo "$value" | git check-ignore -vn --stdin 2>&1 || :
+done <<EOF >git-baseline.nmatch
+/*foo bam/barfoo/baz/bam
+/*foo bar/bam/barfoo/baz/bam
+foo foobaz
+*/\' XXX/\'
+/*foo bar/foo
+/*foo bar/bazfoo
+foo*bar foo/baz/bar
+/*foo.txt hello/foo.txt
+bar/foo baz/bar/foo
+*hello.txt hello.txt-and-then-some
+*hello.txt goodbye.txt
+*some/path/to/hello.txt some/path/to/hello.txt-and-then-some
+*some/path/to/hello.txt some/other/path/to/hello.txt
+*some/path/to/hello.txt a/bigger/some/path/to/hello.txt
+abc?def abc/def
+a*b*c abcd
+abc*abc*abc abcabcabcabcabcabcabca
+a[0-9]b a_b
+a[!0-9]b a0b
+a[!0-9]b a9b
+[!-] -
+a[^0-9]b a0b
+a[^0-9]b a9b
+[^-] -
+{a,b} a
+{a,b} b
+{[}],foo} }
+{foo} foo
+{*.foo,*.bar,*.wat} test.foo
+{*.foo,*.bar,*.wat} test.bar
+{*.foo,*.bar,*.wat} test.wat
+abc*def abc/def
+aBcDeFg abcdefg
+aBcDeFg ABCDEFG
+aBcDeFg AbCdEfG
+some/**/needle.txt some/other/notthis.txt
+some/**/**/needle.txt some/other/notthis.txt
+/**/test one/notthis
+/**/test notthis
+**/.* ab.c
+**/.* abc/ab.c
+.*/** a.bc
+.*/** abc/a.bc
+./foo foo
+**/foo foofoo
+**/foo/bar foofoo/bar
+/*.c mozilla-sha1/sha1.c
+**/m4/ltoptions.m4 csharp/src/packages/repositories.config
+some/*/needle.txt some/needle.txt
+some/*/needle.txt some/one/two/needle.txt
+some/*/needle.txt some/one/two/three/needle.txt
+.*/** .abc
+foo/** foo
+{**/src/**,foo} abc/src/bar
+{**/src/**,foo} foo
+abc[/]def abc/def
+EOF
+
+while read -r pattern value; do
+ echo "$pattern" "$value"
+ echo "$pattern" > .gitignore
+ echo "$value" | git check-ignore -vn --stdin 2>&1 || :
+done <<EOF >git-baseline.match
+*/' XXX/'
+\a a
+\\\[a-z] \a
+\\\? \a
+\\\* \\
+/*foo.txt barfoo.txt
+*foo.txt bar/foo.txt
+*.c mozilla-sha1/sha1.c
+*.rs .rs
+*hello.txt hello.txt
+*hello.txt gareth_says_hello.txt
+*hello.txt some/path/to/hello.txt
+/*foo.txt foo.txt
+*hello.txt some\path\to\hello.txt
+*hello.txt an/absolute/path/to/hello.txt
+*some/path/to/hello.txt some/path/to/hello.txt
+a foo/a
+a a
+a*b a_b
+a*b*c abc
+a*b*c a_b_c
+a*b*c a___b___c
+abc*abc*abc abcabcabcabcabcabcabc
+a*a*a*a*a*a*a*a*a aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+a*b[xyz]c*d abxcdbxcddd
+☃ ☃
+** abcde
+** .asdf
+** x/.asdf
+a[0-9]b a0b
+a[0-9]b a9b
+a[!0-9]b a_b
+[a-z123] 1
+[1a-z23] 1
+[123a-z] 1
+[abc-] -
+[-abc] -
+[-a-c] b
+[a-c-] b
+[-] -
+a[^0-9]b a_b
+_[[]_[]]_[?]_[*]_!_ _[_]_?_*_!_
+a,b a,b
+\[ [
+\? ?
+\* *
+aBcDeFg aBcDeFg
+some/**/needle.txt some/needle.txt
+some/**/needle.txt some/one/needle.txt
+some/**/needle.txt some/one/two/needle.txt
+some/**/needle.txt some/other/needle.txt
+some/**/**/needle.txt some/needle.txt
+some/**/**/needle.txt some/one/needle.txt
+some/**/**/needle.txt some/one/two/needle.txt
+some/**/**/needle.txt some/other/needle.txt
+**/test one/two/test
+**/test one/test
+**/test test
+/**/test one/two/test
+/**/test one/test
+/**/test test
+**/.* .abc
+**/.* abc/.abc
+**/foo/bar foo/bar
+.*/** .abc/abc
+test/** test/
+test/** test/one
+test/** test/one/two
+some/*/needle.txt some/one/needle.txt
+abc/def abc/def
+EOF
+
+git config core.ignorecase true
+while read -r pattern value; do
+ echo "$pattern" "$value"
+ echo "$pattern" > .gitignore
+ echo "$value" | git check-ignore -vn --stdin 2>&1 || :
+done <<EOF >git-baseline.match-icase
+aBcDeFg aBcDeFg
+aBcDeFg abcdefg
+aBcDeFg ABCDEFG
+aBcDeFg AbCdEfG
+EOF