Add zznop, a small test program to help debug the Win32 port.
Also add check-build from libcaca to test that msvc/config.h is up to date.
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
|
||||
EXTRA_DIST = $(TESTS) functions.inc file-00 file-ff file-random file-text
|
||||
|
||||
noinst_PROGRAMS = zzcat zzero bug-overflow bug-memory bug-div0
|
||||
noinst_PROGRAMS = zzcat zzero zznop bug-overflow bug-memory bug-div0
|
||||
|
||||
TESTS = check-md5 check-overflow check-memory check-div0 check-rng check-utils
|
||||
TESTS = check-build check-md5 check-overflow check-memory check-div0 \
|
||||
check-rng check-utils
|
||||
|
||||
|
||||
23
test/check-build
Normal file
23
test/check-build
Normal file
@@ -0,0 +1,23 @@
|
||||
#!/bin/sh
|
||||
|
||||
failure=0
|
||||
|
||||
config_h_in=$(dirname "$0")/../config.h.in
|
||||
win32_config_h=$(dirname "$0")/../win32/config.h
|
||||
|
||||
for key in $(sed -ne 's/.*#undef *\([A-Za-z0-9_]*\).*/\1/p' "$config_h_in");
|
||||
do
|
||||
if ! grep '[ef] \<'"$key"'\>' "$win32_config_h" >/dev/null 2>&1; then
|
||||
echo "error: $key missing from win32/config.h"
|
||||
failure=1
|
||||
fi
|
||||
done
|
||||
|
||||
if test "$failure" != "0"; then
|
||||
exit 1
|
||||
else
|
||||
echo "0 errors in Win32 config.h"
|
||||
fi
|
||||
|
||||
exit 0
|
||||
|
||||
37
test/zznop.c
Normal file
37
test/zznop.c
Normal file
@@ -0,0 +1,37 @@
|
||||
/*
|
||||
* zznop - almost empty program that does almost nothing
|
||||
* Copyright (c) 2009 Sam Hocevar <sam@hocevar.net>
|
||||
* All Rights Reserved
|
||||
*
|
||||
* $Id$
|
||||
*
|
||||
* This program is free software. It comes without any warranty, to
|
||||
* the extent permitted by applicable law. You can redistribute it
|
||||
* and/or modify it under the terms of the Do What The Fuck You Want
|
||||
* To Public License, Version 2, as published by Sam Hocevar. See
|
||||
* http://sam.zoy.org/wtfpl/COPYING for more details.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#if defined HAVE_WINDOWS_H
|
||||
# include <windows.h>
|
||||
#endif
|
||||
|
||||
int main(void)
|
||||
{
|
||||
#if defined HAVE_WINDOWS_H
|
||||
AllocConsole();
|
||||
|
||||
fprintf(stderr, "About to call LoadLibraryA()\n");
|
||||
LoadLibraryA("whatever");
|
||||
fprintf(stderr, "Finished calling LoadLibraryA()\n");
|
||||
|
||||
getchar();
|
||||
#endif
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user