LCOV - code coverage report
Current view: top level - libreoffice/workdir/unxlngi6.pro/UnpackedTarball/langtag/tests - grandfathered-db.c (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 13 0.0 %
Date: 2012-12-17 Functions: 0 1 0.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
       2             : /* 
       3             :  * grandfathered.c
       4             :  * Copyright (C) 2011-2012 Akira TAGOH
       5             :  * 
       6             :  * Authors:
       7             :  *   Akira TAGOH  <akira@tagoh.org>
       8             :  * 
       9             :  * You may distribute under the terms of either the GNU
      10             :  * Lesser General Public License or the Mozilla Public
      11             :  * License, as specified in the README file.
      12             :  */
      13             : #ifdef HAVE_CONFIG_H
      14             : #include "config.h"
      15             : #endif
      16             : 
      17             : #include <stdio.h>
      18             : #include <locale.h>
      19             : #include "langtag.h"
      20             : #include "lt-utils.h"
      21             : 
      22             : int
      23           0 : main(int    argc,
      24             :      char **argv)
      25             : {
      26             :         lt_grandfathered_db_t *grandfathereddb;
      27             : 
      28           0 :         setlocale(LC_ALL, "");
      29             : 
      30           0 :         lt_db_set_datadir(TEST_DATADIR);
      31           0 :         grandfathereddb = lt_grandfathered_db_new();
      32             : 
      33           0 :         if (lt_strcmp0(argv[1], "list") == 0) {
      34           0 :         } else if (lt_strcmp0(argv[1], "lookup") == 0) {
      35           0 :                 lt_grandfathered_t *grandfathered = lt_grandfathered_db_lookup(grandfathereddb, argv[2]);
      36             : 
      37           0 :                 if (grandfathered) {
      38           0 :                         printf("desc: %s\n", lt_grandfathered_get_name(grandfathered));
      39           0 :                         lt_grandfathered_unref(grandfathered);
      40             :                 } else {
      41           0 :                         printf("no such grandfathered: %s\n", argv[2]);
      42             :                 }
      43             :         }
      44             : 
      45           0 :         lt_grandfathered_db_unref(grandfathereddb);
      46             : 
      47           0 :         return 0;
      48             : }

Generated by: LCOV version 1.10