File: valid-shell.txt

package info (click to toggle)
llvm-toolchain-20 1%3A20.1.6-1~exp1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 2,111,304 kB
  • sloc: cpp: 7,438,677; ansic: 1,393,822; asm: 1,012,926; python: 241,650; f90: 86,635; objc: 75,479; lisp: 42,144; pascal: 17,286; sh: 10,027; ml: 5,082; perl: 4,730; awk: 3,523; makefile: 3,349; javascript: 2,251; xml: 892; fortran: 672
file content (87 lines) | stat: -rw-r--r-- 3,161 bytes parent folder | download | duplicates (4)
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
# Check rm file operations.
# Check force remove commands success whether the file does or doesn't exist.
#
# RUN: rm -f %t.write
# RUN: %{python} %S/../check_path.py file %t.write > %t.out
# RUN: FileCheck --check-prefix=REMOVE-FILE < %t.out %s
# RUN: echo "create a temp file" > %t.write
# RUN: %{python} %S/../check_path.py file %t.write > %t.out
# RUN: FileCheck --check-prefix=FILE-EXIST < %t.out %s
# RUN: rm -f %t.write
# RUN: %{python} %S/../check_path.py file %t.write > %t.out
# RUN: FileCheck --check-prefix=REMOVE-FILE < %t.out %s
#
# REMOVE-FILE: False
# FILE-EXIST: True
#
# Check mkdir and rm folder operations.
# Check force remove commands success whether the directory does or doesn't exist.
#
# Check the mkdir command with -p option.
# RUN: rm -f -r %T/test
# RUN: %{python} %S/../check_path.py dir %T/test > %t.out
# RUN: FileCheck --check-prefix=REMOVE-PARENT-DIR < %t.out %s
# RUN: mkdir -p %T/test
# RUN: %{python} %S/../check_path.py dir %T/test > %t.out
# RUN: FileCheck --check-prefix=MAKE-PARENT-DIR < %t.out %s
# RUN: rm -f %T/test || true
# RUN: rm -f -r %T/test
# RUN: %{python} %S/../check_path.py dir %T/test > %t.out
# RUN: FileCheck --check-prefix=REMOVE-PARENT-DIR < %t.out %s
#
# MAKE-PARENT-DIR: True
# REMOVE-PARENT-DIR: False
#
# Check the mkdir command without -p option.
#
# RUN: rm -rf %T/test1
# RUN: mkdir %T/test1
# RUN: %{python} %S/../check_path.py dir %T/test1 > %t.out
# RUN: FileCheck --check-prefix=MAKE-DIR < %t.out %s
# RUN: cd %T/test1 && mkdir foo
# RUN: %{python} %S/../check_path.py dir %T/test1 > %t.out
# RUN: FileCheck --check-prefix=MAKE-DIR < %t.out %s
# RUN: cd %T && rm -rf %T/test1
# RUN: %{python} %S/../check_path.py dir %T/test1 > %t.out
# RUN: FileCheck --check-prefix=REMOVE-DIR < %t.out %s
#
# MAKE-DIR: True
# REMOVE-DIR: False
#
# Check creating and removing multiple folders and rm * operation.
#
# RUN: rm -rf %T/test
# RUN: mkdir -p %T/test/test1 %T/test/test2
# RUN: %{python} %S/../check_path.py dir %T/test %T/test/test1 %T/test/test2 > %t.out
# RUN: FileCheck --check-prefix=DIRS-EXIST < %t.out %s
# RUN: mkdir %T/test || true
# RUN: echo "create a temp file" > %T/test/temp.write
# RUN: echo "create a temp1 file" > %T/test/test1/temp1.write
# RUN: echo "create a temp2 file" > %T/test/test2/temp2.write
# RUN: %{python} %S/../check_path.py file %T/test/temp.write %T/test/test1/temp1.write %T/test/test2/temp2.write> %t.out
# RUN: FileCheck --check-prefix=FILES-EXIST < %t.out %s
# RUN: rm -r -f %T/*
# RUN: %{python} %S/../check_path.py dir %T/test > %t.out
# RUN: FileCheck --check-prefix=REMOVE-ALL < %t.out %s
#
# DIRS-EXIST: True
# DIRS-EXIST-NEXT: True
# DIRS-EXIST-NEXT: True
# FILES-EXIST: True
# FILES-EXIST-NEXT: True
# FILES-EXIST-NEXT: True
# REMOVE-ALL: False
#
# Check diff operations.
#
# RUN: echo "hello" > %t.stdout
# RUN: echo "hello" > %t1.stdout
# RUN: diff %t.stdout %t1.stdout
# RUN: diff -u %t.stdout %t1.stdout
# RUN: echo "hello-2" > %t1.stdout
# RUN: diff %t.stdout %t1.stdout || true
#
# RUN: mkdir -p %T/dir1 %T/dir2
# RUN: cd %T/dir1 && echo "hello" > temp1.txt
# RUN: cd %T/dir2 && echo "hello" > temp2.txt
# RUN: diff temp2.txt ../dir1/temp1.txt