2 * Unit tests for C library environment routines
4 * Copyright 2004 Mike Hearn <mh@codeweavers.com>
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 #include "wine/test.h"
26 ok( _putenv("cat=") == 0, "_putenv failed on deletion of nonexistent environment variable\n" );
27 ok( _putenv("cat=dog") == 0, "failed setting cat=dog\n" );
28 ok( strcmp(getenv("cat"), "dog") == 0, "getenv did not return 'dog'\n" );
29 ok( _putenv("cat=") == 0, "failed deleting cat\n" );
31 ok( _putenv("=") == -1, "should not accept '=' as input\n" );
32 ok( _putenv("=dog") == -1, "should not accept '=dog' as input\n" );
34 ok( getenv("nonexistent") == NULL, "getenv should fail with nonexistent var name\n" );