File: upload-and-download.test-sh

package info (click to toggle)
swiftlang 6.0.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,519,992 kB
  • sloc: cpp: 9,107,863; ansic: 2,040,022; asm: 1,135,751; python: 296,500; objc: 82,456; f90: 60,502; lisp: 34,951; pascal: 19,946; sh: 18,133; perl: 7,482; ml: 4,937; javascript: 4,117; makefile: 3,840; awk: 3,535; xml: 914; fortran: 619; cs: 573; ruby: 573
file content (52 lines) | stat: -rw-r--r-- 1,788 bytes parent folder | download
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
REQUIRES: sftp_server

RUN: %empty-directory(%t)
RUN: %empty-directory(%t-REMOTE)
RUN: touch %t/input %t/BAD
RUN: %debug-remote-run --output-prefix %t cp %t/input %t/output
RUN: ls %t/ | %FileCheck %s
RUN: ls %t-REMOTE/output/ | %FileCheck -check-prefix CHECK-REMOTE %s

CHECK: BAD
CHECK-NEXT: {{^input$}}
CHECK-NEXT: {{^output$}}

CHECK-REMOTE-NOT: BAD
CHECK-REMOTE: {{^input$}}
CHECK-REMOTE-NEXT: {{^output$}}
CHECK-REMOTE-NOT: BAD

RUN: %empty-directory(%t)
RUN: %empty-directory(%t/nested)
RUN: %empty-directory(%t-REMOTE)
RUN: touch %t/nested/input %t/nested/BAD
RUN: %debug-remote-run --output-prefix %t cp %t/nested/input %t/nested/output
RUN: ls %t/nested/ | %FileCheck %s
RUN: ls %t-REMOTE/output/nested/ | %FileCheck -check-prefix CHECK-REMOTE %s

RUN: %debug-remote-run -v --output-prefix %t cp %t/nested/input %t/nested/output 2>&1 >/dev/null | %FileCheck -check-prefix VERBOSE %s

VERBOSE: /usr/bin/env /bin/mkdir -p {{.+}}-REMOTE/output/nested
VERBOSE: /usr/bin/rsync
VERBOSE: /usr/bin/env {{.*}}cp
VERBOSE-NEXT: {{^}}/bin/mkdir -p {{.+}}
VERBOSE-NEXT: /usr/bin/rsync

RUN: %empty-directory(%t)
RUN: touch %t/xyz-1before
RUN: %debug-remote-run --output-prefix %t/xyz cp %t/xyz-1before %t/xyz-2after
RUN: ls %t | %FileCheck -check-prefix CHECK-PREFIXED %s
RUN: ls %t-REMOTE/output | %FileCheck -check-prefix CHECK-PREFIXED-REMOTE %s

CHECK-PREFIXED: {{^xyz-1before$}}
CHECK-PREFIXED: {{^xyz-2after$}}

CHECK-PREFIXED-REMOTE: {{^xyz-1before$}}
CHECK-PREFIXED-REMOTE: {{^xyz-2after$}}

RUN: %empty-directory(%t)
RUN: %empty-directory(%t-REMOTE)
RUN: touch %t/input %t/BAD
RUN: %debug-remote-run --output-prefix %t --remote-output-prefix custom-output cp %t/input %t/output
RUN: ls %t/ | %FileCheck %s
RUN: ls %t-REMOTE/custom-output/ | %FileCheck -check-prefix CHECK-REMOTE %s