diff options
author | harti <harti@FreeBSD.org> | 2005-06-01 11:26:47 +0000 |
---|---|---|
committer | harti <harti@FreeBSD.org> | 2005-06-01 11:26:47 +0000 |
commit | 54f37e8648c9633304fffa13845131ce5cce55e2 (patch) | |
tree | 92ca54e69b3f2cc1bd5bd8b12cec680fb39f017b /tools/regression/usr.bin | |
parent | 10c793046de38bb162917d5b683ccdb01dcc25a3 (diff) | |
download | FreeBSD-src-54f37e8648c9633304fffa13845131ce5cce55e2.zip FreeBSD-src-54f37e8648c9633304fffa13845131ce5cce55e2.tar.gz |
Add a test for escaped newline handling.
Diffstat (limited to 'tools/regression/usr.bin')
8 files changed, 45 insertions, 0 deletions
diff --git a/tools/regression/usr.bin/make/syntax/enl/Makefile b/tools/regression/usr.bin/make/syntax/enl/Makefile new file mode 100644 index 0000000..7b37e78 --- /dev/null +++ b/tools/regression/usr.bin/make/syntax/enl/Makefile @@ -0,0 +1,25 @@ +# $FreeBSD$ +# +# Test handling of escaped newlines. +# + +.ifmake test1 + +# This should succeed +\ +\ +\ +test1: + @echo ok + +.elifmake test2 + +# This should fail because the comment continues on the next lines leading +# to an unassociated shell command. +\ +#\ +\ +test2: + @echo ok + +.endif diff --git a/tools/regression/usr.bin/make/syntax/enl/expected.status.1 b/tools/regression/usr.bin/make/syntax/enl/expected.status.1 new file mode 100644 index 0000000..573541a --- /dev/null +++ b/tools/regression/usr.bin/make/syntax/enl/expected.status.1 @@ -0,0 +1 @@ +0 diff --git a/tools/regression/usr.bin/make/syntax/enl/expected.status.2 b/tools/regression/usr.bin/make/syntax/enl/expected.status.2 new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/tools/regression/usr.bin/make/syntax/enl/expected.status.2 @@ -0,0 +1 @@ +1 diff --git a/tools/regression/usr.bin/make/syntax/enl/expected.stderr.1 b/tools/regression/usr.bin/make/syntax/enl/expected.stderr.1 new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/tools/regression/usr.bin/make/syntax/enl/expected.stderr.1 diff --git a/tools/regression/usr.bin/make/syntax/enl/expected.stderr.2 b/tools/regression/usr.bin/make/syntax/enl/expected.stderr.2 new file mode 100644 index 0000000..ae504f9 --- /dev/null +++ b/tools/regression/usr.bin/make/syntax/enl/expected.stderr.2 @@ -0,0 +1,2 @@ +"Makefile", line 23: Unassociated shell command "@echo ok" +make: fatal errors encountered -- cannot continue diff --git a/tools/regression/usr.bin/make/syntax/enl/expected.stdout.1 b/tools/regression/usr.bin/make/syntax/enl/expected.stdout.1 new file mode 100644 index 0000000..9766475 --- /dev/null +++ b/tools/regression/usr.bin/make/syntax/enl/expected.stdout.1 @@ -0,0 +1 @@ +ok diff --git a/tools/regression/usr.bin/make/syntax/enl/expected.stdout.2 b/tools/regression/usr.bin/make/syntax/enl/expected.stdout.2 new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/tools/regression/usr.bin/make/syntax/enl/expected.stdout.2 diff --git a/tools/regression/usr.bin/make/syntax/enl/test.t b/tools/regression/usr.bin/make/syntax/enl/test.t new file mode 100644 index 0000000..de8bcfe --- /dev/null +++ b/tools/regression/usr.bin/make/syntax/enl/test.t @@ -0,0 +1,15 @@ +#!/bin/sh + +# $FreeBSD$ + +cd `dirname $0` +. ../../common.sh + +# Description +DESC="Test escaped new-lines handling." + +# Run +TEST_N=2 +TEST_2_TODO="bug in parser" + +eval_cmd $* |