Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/tests/usr.bin/xlint/lint1 lint: for tests with output, ensur...
details: https://anonhg.NetBSD.org/src/rev/e8d2d348ba08
branches: trunk
changeset: 948369:e8d2d348ba08
user: rillig <rillig%NetBSD.org@localhost>
date: Mon Dec 28 09:58:56 2020 +0000
description:
lint: for tests with output, ensure that the output matches
diffstat:
tests/usr.bin/xlint/lint1/Makefile | 11 +++++++++--
tests/usr.bin/xlint/lint1/d_constant_conv1.exp | 1 +
tests/usr.bin/xlint/lint1/d_constant_conv2.exp | 1 +
tests/usr.bin/xlint/lint1/d_incorrect_array_size.exp | 1 +
tests/usr.bin/xlint/lint1/d_long_double_int.exp | 1 +
tests/usr.bin/xlint/lint1/d_type_conv1.exp | 1 +
tests/usr.bin/xlint/lint1/d_type_conv2.exp | 1 +
tests/usr.bin/xlint/lint1/d_type_conv3.exp | 2 ++
tests/usr.bin/xlint/lint1/t_integration.sh | 9 ++++++---
9 files changed, 23 insertions(+), 5 deletions(-)
diffs (107 lines):
diff -r 1014bd0a7a4e -r e8d2d348ba08 tests/usr.bin/xlint/lint1/Makefile
--- a/tests/usr.bin/xlint/lint1/Makefile Mon Dec 28 09:57:14 2020 +0000
+++ b/tests/usr.bin/xlint/lint1/Makefile Mon Dec 28 09:58:56 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.16 2020/12/28 09:57:14 rillig Exp $
+# $NetBSD: Makefile,v 1.17 2020/12/28 09:58:56 rillig Exp $
NOMAN= # defined
@@ -19,7 +19,7 @@
FILES+= d_c99_decls_after_stmt.c
FILES+= d_c99_decls_after_stmt2.c
FILES+= d_c99_decls_after_stmt3.c
-FILES+= d_c99_flex_array_packed.c
+FILES+= d_c99_flex_array_packed.c
FILES+= d_c99_for_loops.c
FILES+= d_c99_func.c
FILES+= d_c99_nested_struct.c
@@ -40,7 +40,9 @@
FILES+= d_compound_literals1.c
FILES+= d_compound_literals2.c
FILES+= d_constant_conv1.c
+FILES+= d_constant_conv1.exp
FILES+= d_constant_conv2.c
+FILES+= d_constant_conv2.exp
FILES+= d_cvt_constant.c
FILES+= d_cvt_in_ternary.c
FILES+= d_ellipsis_in_switch.c
@@ -51,14 +53,19 @@
FILES+= d_gcc_func.c
FILES+= d_gcc_variable_array_init.c
FILES+= d_incorrect_array_size.c
+FILES+= d_incorrect_array_size.exp
FILES+= d_long_double_int.c
+FILES+= d_long_double_int.exp
FILES+= d_nested_structs.c
FILES+= d_nolimit_init.c
FILES+= d_packed_structs.c
FILES+= d_shift_to_narrower_type.c
FILES+= d_type_conv1.c
+FILES+= d_type_conv1.exp
FILES+= d_type_conv2.c
+FILES+= d_type_conv2.exp
FILES+= d_type_conv3.c
+FILES+= d_type_conv3.exp
FILES+= d_type_question_colon.c
FILES+= d_typefun.c
FILES+= d_typename_as_var.c
diff -r 1014bd0a7a4e -r e8d2d348ba08 tests/usr.bin/xlint/lint1/d_constant_conv1.exp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/usr.bin/xlint/lint1/d_constant_conv1.exp Mon Dec 28 09:58:56 2020 +0000
@@ -0,0 +1,1 @@
+(11): warning: conversion of negative constant to unsigned type, arg #1 [296]
diff -r 1014bd0a7a4e -r e8d2d348ba08 tests/usr.bin/xlint/lint1/d_constant_conv2.exp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/usr.bin/xlint/lint1/d_constant_conv2.exp Mon Dec 28 09:58:56 2020 +0000
@@ -0,0 +1,1 @@
+(11): warning: conversion to 'unsigned int' due to prototype, arg #1 [259]
diff -r 1014bd0a7a4e -r e8d2d348ba08 tests/usr.bin/xlint/lint1/d_incorrect_array_size.exp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/usr.bin/xlint/lint1/d_incorrect_array_size.exp Mon Dec 28 09:58:56 2020 +0000
@@ -0,0 +1,1 @@
+(5): negative array dimension (-1) [20]
diff -r 1014bd0a7a4e -r e8d2d348ba08 tests/usr.bin/xlint/lint1/d_long_double_int.exp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/usr.bin/xlint/lint1/d_long_double_int.exp Mon Dec 28 09:58:56 2020 +0000
@@ -0,0 +1,1 @@
+(9): warning: illegal pointer combination, op p == p [124]
diff -r 1014bd0a7a4e -r e8d2d348ba08 tests/usr.bin/xlint/lint1/d_type_conv1.exp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/usr.bin/xlint/lint1/d_type_conv1.exp Mon Dec 28 09:58:56 2020 +0000
@@ -0,0 +1,1 @@
+(13): warning: conversion to 'unsigned int' due to prototype, arg #1 [259]
diff -r 1014bd0a7a4e -r e8d2d348ba08 tests/usr.bin/xlint/lint1/d_type_conv2.exp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/usr.bin/xlint/lint1/d_type_conv2.exp Mon Dec 28 09:58:56 2020 +0000
@@ -0,0 +1,1 @@
+(13): warning: conversion to 'float' due to prototype, arg #1 [259]
diff -r 1014bd0a7a4e -r e8d2d348ba08 tests/usr.bin/xlint/lint1/d_type_conv3.exp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/usr.bin/xlint/lint1/d_type_conv3.exp Mon Dec 28 09:58:56 2020 +0000
@@ -0,0 +1,2 @@
+(12): warning: conversion to 'unsigned int' due to prototype, arg #1 [259]
+(12): warning: conversion of 'long long' to 'unsigned int' is out of range, arg #1 [295]
diff -r 1014bd0a7a4e -r e8d2d348ba08 tests/usr.bin/xlint/lint1/t_integration.sh
--- a/tests/usr.bin/xlint/lint1/t_integration.sh Mon Dec 28 09:57:14 2020 +0000
+++ b/tests/usr.bin/xlint/lint1/t_integration.sh Mon Dec 28 09:58:56 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: t_integration.sh,v 1.5 2020/06/25 11:12:03 jruoho Exp $
+# $NetBSD: t_integration.sh,v 1.6 2020/12/28 09:58:56 rillig Exp $
#
# Copyright (c) 2008, 2010 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -36,8 +36,11 @@
check_invalid()
{
- atf_check -s not-exit:0 -o ignore -e ignore ${LINT1} -g -S -w \
- "$(atf_get_srcdir)/$1" /dev/null
+ local src="$(atf_get_srcdir)/$1"
+ local exp="${src%.c}.exp"
+
+ atf_check -s not-exit:0 -o "file:${exp}" -e empty \
+ ${LINT1} -g -S -w "${src}" /dev/null
}
test_case()
Home |
Main Index |
Thread Index |
Old Index