testbincue.c.in: set @srcdir@. Make gcc 2.95 compatible.

This commit is contained in:
rocky
2006-03-07 02:38:44 +00:00
parent 2977ab7c50
commit 577774dd7b
3 changed files with 16 additions and 11 deletions

View File

@@ -19,7 +19,7 @@ define(RELEASE_NUM, 77)
define(CDIO_VERSION_STR, 0.$1cvs)
AC_PREREQ(2.52)
AC_REVISION([$Id: configure.ac,v 1.187 2006/03/06 22:34:13 rocky Exp $])dnl
AC_REVISION([$Id: configure.ac,v 1.188 2006/03/07 02:38:44 rocky Exp $])dnl
AC_INIT(libcdio, CDIO_VERSION_STR(RELEASE_NUM))
AC_CONFIG_SRCDIR(src/cd-info.c)
@@ -670,6 +670,7 @@ AC_CONFIG_FILES([ \
src/cd-paranoia/doc/jp/cd-paranoia.1 \
src/cd-paranoia/doc/jp/Makefile \
src/Makefile \
test/testbincue.c \
test/check_common_fn \
test/Makefile \
])

View File

@@ -1,4 +1,4 @@
# $Id: Makefile.am,v 1.51 2005/04/30 02:04:50 rocky Exp $
# $Id: Makefile.am,v 1.52 2006/03/07 02:38:44 rocky Exp $
#
# Copyright (C) 2003, 2004, 2005 Rocky Bernstein <rocky@panix.com>
#
@@ -76,7 +76,8 @@ check_DATA = vcd_demo.right vcd_demo_vcdinfo.right \
joliet.iso joliet.right joliet-nojoliet.right
EXTRA_DIST = $(check_SCRIPTS) $(check_DATA) \
check_common_fn check_cue.sh.in check_nrg.sh.in check_iso.sh.in
check_common_fn check_cue.sh.in check_nrg.sh.in \
testbincue.c.in check_iso.sh.in
TESTS = $(check_PROGRAMS) $(check_SCRIPTS)
XFAIL_TESTS = testassert

View File

@@ -1,5 +1,5 @@
/*
$Id: testbincue.c,v 1.8 2006/03/07 00:06:20 rocky Exp $
/* -*- C -*-
$Id: testbincue.c.in,v 1.1 2006/03/07 02:38:44 rocky Exp $
Copyright (C) 2004, 2006 Rocky Bernstein <rocky@panix.com>
@@ -39,7 +39,7 @@
#include <string.h>
#ifndef TEST_DIR
#define TEST_DIR "."
#define TEST_DIR "@srcdir@"
#endif
#define NUM_GOOD_CUES 2
@@ -99,22 +99,25 @@ main(int argc, const char *argv[])
break;
}
}
{
CdIo_t *p_cdio;
snprintf(psz_cuefile, sizeof(psz_cuefile)-1,
"%s/%s", TEST_DIR, "cdda.cue");
CdIo_t *p_cdio = cdio_open (psz_cuefile, DRIVER_UNKNOWN);
p_cdio = cdio_open (psz_cuefile, DRIVER_UNKNOWN);
if (!p_cdio) {
printf("Can't open cdda.cue\n");
ret = 77;
} else {
/* Just test performing some operations. */
driver_return_code_t drc = cdio_set_blocksize(p_cdio, 2048);
char *psz_device = cdio_get_default_device(p_cdio);
/* Could chdir to srcdir to hedge the bet? */
if (psz_device)
free(psz_device);
else
ret = -2;
else {
/* Unless we do the chdir, will fail. So don't set as an error. */
printf("Can't get default device\n");
}
drc = cdio_set_speed(p_cdio, 5);
}
}