lint: for tests with output, ensure that the output matches
This commit is contained in:
parent
e47165949c
commit
05e935016b
@ -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_compound_literal_comma.c
|
||||
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_cast_typeof.c
|
||||
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_extension.c
|
||||
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
|
||||
|
1
tests/usr.bin/xlint/lint1/d_constant_conv1.exp
Normal file
1
tests/usr.bin/xlint/lint1/d_constant_conv1.exp
Normal file
@ -0,0 +1 @@
|
||||
(11): warning: conversion of negative constant to unsigned type, arg #1 [296]
|
1
tests/usr.bin/xlint/lint1/d_constant_conv2.exp
Normal file
1
tests/usr.bin/xlint/lint1/d_constant_conv2.exp
Normal file
@ -0,0 +1 @@
|
||||
(11): warning: conversion to 'unsigned int' due to prototype, arg #1 [259]
|
1
tests/usr.bin/xlint/lint1/d_incorrect_array_size.exp
Normal file
1
tests/usr.bin/xlint/lint1/d_incorrect_array_size.exp
Normal file
@ -0,0 +1 @@
|
||||
(5): negative array dimension (-1) [20]
|
1
tests/usr.bin/xlint/lint1/d_long_double_int.exp
Normal file
1
tests/usr.bin/xlint/lint1/d_long_double_int.exp
Normal file
@ -0,0 +1 @@
|
||||
(9): warning: illegal pointer combination, op p == p [124]
|
1
tests/usr.bin/xlint/lint1/d_type_conv1.exp
Normal file
1
tests/usr.bin/xlint/lint1/d_type_conv1.exp
Normal file
@ -0,0 +1 @@
|
||||
(13): warning: conversion to 'unsigned int' due to prototype, arg #1 [259]
|
1
tests/usr.bin/xlint/lint1/d_type_conv2.exp
Normal file
1
tests/usr.bin/xlint/lint1/d_type_conv2.exp
Normal file
@ -0,0 +1 @@
|
||||
(13): warning: conversion to 'float' due to prototype, arg #1 [259]
|
2
tests/usr.bin/xlint/lint1/d_type_conv3.exp
Normal file
2
tests/usr.bin/xlint/lint1/d_type_conv3.exp
Normal file
@ -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]
|
@ -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_valid()
|
||||
|
||||
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()
|
||||
|
Loading…
Reference in New Issue
Block a user