Skip to content

Commit 2399ba0

Browse files
committed
Add negative tests: no such file, unreadable file
1 parent 0206afd commit 2399ba0

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// Test that input can't be redirected from non-existent file A.swift
2+
3+
// RUN: mkdir -p %t
4+
// RUN: cd %t
5+
// RUN: %lldb --repl < %s 2>&1 | FileCheck %s --check-prefix=LLDB
6+
7+
< A.swift
8+
// LLDB: no such file at path 'A.swift'
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// Test that input can't be redirected from unreadable A.swift
2+
3+
// RUN: mkdir -p %t
4+
// RUN: cp %S/Inputs/A.swift %t/A.swift
5+
// RUN: chmod -r %t/A.swift
6+
// RUN: cd %t
7+
// RUN: %lldb --repl < %s 2>&1 | FileCheck %s --check-prefix=LLDB
8+
9+
< A.swift
10+
// LLDB: could not read file at path 'A.swift'

0 commit comments

Comments
 (0)