tst.strtok_null.d revision 2870:a343ed00e23c
1145287Snjl/*
2145287Snjl * CDDL HEADER START
3145287Snjl *
4145287Snjl * The contents of this file are subject to the terms of the
5145287Snjl * Common Development and Distribution License (the "License").
6145287Snjl * You may not use this file except in compliance with the License.
7145287Snjl *
8145287Snjl * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9145287Snjl * or http://www.opensolaris.org/os/licensing.
10145287Snjl * See the License for the specific language governing permissions
11145287Snjl * and limitations under the License.
12145287Snjl *
13145287Snjl * When distributing Covered Code, include this CDDL HEADER in each
14145287Snjl * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15145287Snjl * If applicable, add the following below this CDDL HEADER, with the
16145287Snjl * fields enclosed by brackets "[]" replaced with your own identifying
17145287Snjl * information: Portions Copyright [yyyy] [name of copyright owner]
18145287Snjl *
19145287Snjl * CDDL HEADER END
20145287Snjl */
21145287Snjl
22145287Snjl/*
23145287Snjl * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
24145287Snjl * Use is subject to license terms.
25145287Snjl */
26145287Snjl
27145287Snjl#pragma ident	"%Z%%M%	%I%	%E% SMI"
28145287Snjl
29145287Snjl/*
30145287Snjl * Test that a strtok(NULL, ...) without first calling strtok(string, ...)
31145287Snjl * produces an error
32145287Snjl */
33145287Snjl
34145287SnjlBEGIN
35145287Snjl{
36145287Snjl	trace(strtok(NULL, "!"));
37145287Snjl	exit(1);
38145287Snjl}
39145287Snjl
40145287SnjlERROR
41145287Snjl{
42145287Snjl	exit(0);
43145287Snjl}
44145287Snjl