~ubuntu-branches/debian/squeeze/sword/squeeze

« back to all changes in this revision

Viewing changes to tests/introtest.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Marsden, Jonathan Marsden, Dmitrijs Ledkovs, Closed Bugs
  • Date: 2009-05-30 11:55:55 UTC
  • mfrom: (1.3.1 upstream) (6.1.1 experimental)
  • Revision ID: james.westby@ubuntu.com-20090530115555-r427zsn3amivdpfu
Tags: 1.6.0+dfsg-1
[ Jonathan Marsden ]
* New upstream release. (Closes: #507960) (LP: #320558)
* debian/patches/02_libver.diff:
  - Bump SONAME to 8 -- SWORD 1.6 is not backward compatible with 1.5.11.
* debian/patches/series:
  - Remove 10_diatheke.diff -- included in upstream source.
* debian/patches/:
  - Remove several old unused .diff files.
  - Add 11_regex_only_when_needed.diff to conditionally include regex lib.
  - Add 12_fix_compiler_warnings.diff to remove all compiler warnings.
  - Add 13_fix_osis2mod_compression_default.diff from upstream svn.
  - Add 14_closing_section_not_chapter.diff from upstream svn.
* debian/libsword7.*: 
  - Rename to libsword8.*
  - Change libsword7 to libsword8 within files.
* debian/rules: 
  - SONAME bump to 8.
  - Set library version check to >= 1.6
* debian/control:
  - Change libsword7 to libsword8.
  - Add libsword7 to Conflicts.
  - Fix case of sword to SWORD in package descriptions.
  - Bump Standards-Version to 3.8.1 (no changes needed).
  - Fix section for libsword-dbg to avoid lintian warning.
* debian/rules:
  - Add DFSG get-orig-source target.
* debian/copyright:
  - Fix various mistakes in initial attempt to document copyrights.

[ Dmitrijs Ledkovs ]
* debian/rules: Added utils.mk to use missing-files target and call it on
  each build.
* debian/libsword-dev.install: Added libsword.la, previously missing.
* debian/libsword7.install: Added missing libicu translit files.
* debian/control:
  - Updated all uses of SWORD version to 1.6
  - Added libsword-dbg package
* debian/watch: Fixed a small mistake which was resulting in extra "."
  in final version name.
* debian/rules: simplified manpage processing.
* debian/libsword8.lintian-overrides: added override for module
  installation directory.
* debian/copyright: Updated with information about everyfile.
  Closes: #513448 LP: #322638
* debian/diatheke.examples: moved examples here from the diatheke.install
* debian/rules:
  - enabled shell script based testsuite
  - added commented out cppunit testsuite
* debian/patches/40_missing_includes.diff: 
  - added several missing stdio.h includes to prevent FTBFS of testsuite.

[ Closed Bugs ]
* FTBFS on intrepid (LP: #305172)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright 2009 CrossWire Bible Society (http://www.crosswire.org)
 
3
 *      CrossWire Bible Society
 
4
 *      P. O. Box 2528
 
5
 *      Tempe, AZ  85280-2528
 
6
 *
 
7
 * This program is free software; you can redistribute it and/or modify it
 
8
 * under the terms of the GNU General Public License as published by the
 
9
 * Free Software Foundation version 2.
 
10
 *
 
11
 * This program is distributed in the hope that it will be useful, but
 
12
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
14
 * General Public License for more details.
 
15
 *
 
16
 */
 
17
 
 
18
#include <swmgr.h>
 
19
#include <iostream>
 
20
#include <versekey.h>
 
21
#include <rawtext.h>
 
22
#ifndef NO_SWORD_NAMESPACE
 
23
using namespace sword;
 
24
#endif
 
25
 
 
26
int main(int argc, char **argv) {
 
27
        SWMgr mymgr;
 
28
 
 
29
        RawText::createModule(".");
 
30
        RawText mod(".");
 
31
 
 
32
        VerseKey vk;
 
33
        vk.Headings(1);
 
34
        vk.AutoNormalize(0);
 
35
        vk.Persist(1);
 
36
        mod.setKey(vk);
 
37
 
 
38
        vk.Verse(0);
 
39
        vk.Chapter(0);
 
40
        vk.Book(0);
 
41
        vk.Testament(0);
 
42
 
 
43
        mod << "Module heading text";
 
44
 
 
45
        vk.Verse(0);
 
46
        vk.Chapter(0);
 
47
        vk.Book(0);
 
48
        vk.Testament(1);
 
49
 
 
50
        mod << "OT heading text";
 
51
 
 
52
        vk.Testament(1);
 
53
        vk.Book(1);
 
54
        vk.Chapter(0);
 
55
        vk.Verse(0);
 
56
 
 
57
        mod << "Gen heading text";
 
58
 
 
59
        vk.Testament(1);
 
60
        vk.Book(1);
 
61
        vk.Chapter(1);
 
62
        vk.Verse(0);
 
63
 
 
64
        mod << "Gen 1 heading text";
 
65
 
 
66
        vk.Testament(1);
 
67
        vk.Book(1);
 
68
        vk.Chapter(1);
 
69
        vk.Verse(1);
 
70
 
 
71
        mod << "Gen 1:1 text";
 
72
 
 
73
        
 
74
        vk.Testament(0);
 
75
        vk.Book(0);
 
76
        vk.Chapter(0);
 
77
        vk.Verse(0);
 
78
 
 
79
        std::cout << "Module heading text ?= " << (const char*)mod << std::endl;
 
80
 
 
81
        vk.Testament(1);
 
82
        vk.Book(0);
 
83
        vk.Chapter(0);
 
84
        vk.Verse(0);
 
85
 
 
86
        std::cout << "OT heading text ?= " << (const char*)mod << std::endl;
 
87
 
 
88
        vk.Testament(1);
 
89
        vk.Book(1);
 
90
        vk.Chapter(0);
 
91
        vk.Verse(0);
 
92
 
 
93
        std::cout << "Gen heading text ?= " << (const char*)mod << std::endl;
 
94
 
 
95
        vk.Testament(1);
 
96
        vk.Book(1);
 
97
        vk.Chapter(1);
 
98
        vk.Verse(0);
 
99
 
 
100
        std::cout << "Gen 1 heading text ?= " << (const char*)mod << std::endl;
 
101
 
 
102
        vk.Testament(1);
 
103
        vk.Book(1);
 
104
        vk.Chapter(1);
 
105
        vk.Verse(1);
 
106
 
 
107
        std::cout << "Gen 1:1 text ?= " << (const char*)mod << std::endl;
 
108
 
 
109
          /* old introtest
 
110
        SWModule *mhc = mymgr.Modules["MHC"];
 
111
 
 
112
        if (mhc) {
 
113
                VerseKey vk;
 
114
                vk.Headings(1);
 
115
                vk.AutoNormalize(0);
 
116
                vk.Persist(1);
 
117
                vk = "jas 0:0";
 
118
                std::cout << vk << ":\n";
 
119
                mhc->setKey(vk);
 
120
                std::cout << (const char *) mhc->Key() << ":\n";
 
121
                std::cout << (const char *) *mhc << "\n";
 
122
        }
 
123
          */
 
124
        return 0;
 
125
}
 
126
 
 
127