unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
blob 72cd9ed169526f4c3a1701cd410d8523a4526979 1257 bytes (raw)
name: tests/exclude-dir 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
 
#! /bin/sh
# Test for right working of "--exclude-dir=some/thing/different" option.
#
# Copyright (C) 2001, 2006, 2009-2023 Free Software Foundation, Inc.
#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.

. "${srcdir=.}/init.sh"; path_prepend_ ../src

failures=0

mkdir -p /tmp/grep-tests/first/second
mkdir -p /tmp/grep-tests/third/forth

cd ..
cat ./exclude-dir-contents.txt > /tmp/grep-tests/first/header.h
cat ./exclude-dir-contents.txt > /tmp/grep-tests/first/second/header.h
cat ./exclude-dir-contents.txt > /tmp/grep-tests/third/header.h
cat ./exclude-dir-contents.txt > /tmp/grep-tests/third/forth/header.h
cd /tmp/grep-tests

# check for only one '--exclude-dir' option
grep -rnI --color=auto --exclude-dir=first/second/ "resource" .
if test $? -ne 0 ; then
        echo "exclude-dir: one-option, test #1 failed"
	failures=1
fi

# check for more than just one 'exclude-dir' option
grep -rnI --color=auto --exclude-dir=first/second/ --exclude-dir=third/forth "resource" .
if test $? -ne 0 ; then
        echo "exclude-dir: multiple-option, test #2 failed"
	failures=1
fi

rm -rf /tmp/grep-tests
cd -

Exit $failures

debug log:

solving 72cd9ed ...
found 72cd9ed in https://yhetil.org/guix-patches/20230122172929.5840-1-todovirtual15@gmail.com/

applying [1/1] https://yhetil.org/guix-patches/20230122172929.5840-1-todovirtual15@gmail.com/
diff --git a/tests/exclude-dir b/tests/exclude-dir
new file mode 100755
index 0000000..72cd9ed

Checking patch tests/exclude-dir...
Applied patch tests/exclude-dir cleanly.

index at:
100755 72cd9ed169526f4c3a1701cd410d8523a4526979	tests/exclude-dir

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).