/*
* Copyright (c) 2000-2001 Sendmail, Inc. and its suppliers.
* All rights reserved.
*
* By using this file, you agree to the terms and conditions set
* forth in the LICENSE file which can be found at the top level of
* the sendmail distribution.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include <string.h>
{
"E:test1",
"i",
"test1 exception argv[0]=%0",
};
{
"E:test2",
"i",
"test2 exception argv[0]=%0",
};
int
int argc;
char **argv;
{
void *p;
int volatile x;
/*
** SM_TRY
*/
cant = "can't happen";
x = 0;
x = 1;
SM_TEST(x == 1);
/*
** SM_FINALLY-0
*/
x = 0;
x = 1;
x = 2;
SM_TEST(x == 2);
/*
** SM_FINALLY-1
*/
x = 0;
x = 1;
x = 2;
"got exception test2: can't happen\n");
{
"can't happen: x=%d argv[0]=%d\n",
}
{
unknown = "unknown exception: ";
}
x = 3;
x = 4;
x = 5;
{
unknown = "got exception test2: ";
}
{
"can't happen: x=%d argv[0]=%d\n",
}
{
unknown = "unknown exception: ";
}
#if DEBUG
"test 0 got an exception, as expected:\n");
#endif /* DEBUG */
return sm_test_end();
"sm_malloc_x unexpectedly succeeded, returning %p\n", p);
unknown = "sm_malloc_x unexpectedly succeeded";
return sm_test_end();
}