summaryrefslogtreecommitdiff
path: root/test/test_lib_driver_util.c
blob: e774acdddbdd0882af23e344260f5686f0b5bd9c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/* -*- C -*-
  Copyright (C) 2009 Rocky Bernstein <rocky@gnu.org>
  
  This program is free software: you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation, either version 3 of the License, or
  (at your option) any later version.

  This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.

  You should have received a copy of the GNU General Public License
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/
/* Unit test for lib/driver/util.c */

#include <cdio/version.h>

#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#ifdef HAVE_STDIO_H
#include <stdio.h>
#endif
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
#include <string.h>

int
main(int argc, const char *argv[])
{
    if (0 != strncmp(cdio_version_string, CDIO_VERSION,
		     strlen(CDIO_VERSION))) {
	fprintf(stderr, "CDIO VERSION string mismatch %s vs %s\n",
		cdio_version_string, CDIO_VERSION);
	exit(1);
    }
    if (libcdio_version_num != LIBCDIO_VERSION_NUM) {
	fprintf(stderr, "LIBCDIO_VERSION_NUM value mismatch %d vs %d\n",
		libcdio_version_num, LIBCDIO_VERSION_NUM);
	exit(2);
    }
    exit(0);
}