changeset 2416:7ddb24a19c22

Merge branch 'master' of github.com:mxe/mxe
author Tony Theodore <tonyt@logyst.com>
date Mon, 16 Apr 2012 23:38:26 +1000
parents cbcb88df00f6 (current diff) d84bf9fcb368 (diff)
children f0342e9f2462
files src/hunspell-test.cxx
diffstat 5 files changed, 42 insertions(+), 44 deletions(-) [+]
line wrap: on
line diff
--- a/.gitignore	Mon Apr 16 22:26:19 2012 +1000
+++ b/.gitignore	Mon Apr 16 23:38:26 2012 +1000
@@ -1,5 +1,4 @@
-usr/
-log/
-pkg
-dist/
-wip/
+/usr/
+/log/
+/pkg
+/wip/
--- a/Makefile	Mon Apr 16 22:26:19 2012 +1000
+++ b/Makefile	Mon Apr 16 23:38:26 2012 +1000
@@ -23,7 +23,6 @@
 LOG_DIR    := $(PWD)/log
 TIMESTAMP  := $(shell date +%Y%m%d_%H%M%S)
 PKG_DIR    := $(PWD)/pkg
-DIST_DIR   := $(PWD)/dist
 TMP_DIR     = $(PWD)/tmp-$(1)
 MAKEFILE   := $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))
 TOP_DIR    := $(patsubst %/,%,$(dir $(MAKEFILE)))
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/hunspell-test.cpp	Mon Apr 16 23:38:26 2012 +1000
@@ -0,0 +1,37 @@
+/*
+ * This file is part of MXE.
+ * See index.html for further information.
+ */
+
+#include <iostream>
+#include <fstream>
+#include <hunspell.hxx>
+
+int main(int argc, char *argv[])
+{
+    (void)argc;
+    (void)argv;
+
+    std::ofstream dic ("hunspell-test.dic");
+    dic << "2\nHello\nWorld";
+    dic.close();
+    std::ofstream aff ("hunspell-test.aff");
+    aff << "SET UTF-8\nTRY loredWH\nMAXDIFF 1";
+    aff.close();
+    Hunspell h("hunspell-test.aff", "hunspell-test.dic");
+
+    if (h.spell("Hello") == 0)
+    {
+        std::cerr << "Error: hunspell marked correct word as wrong" << std::endl;
+    }
+    if (h.spell("wrld") != 0)
+    {
+        std::cerr << "Error: hunspell marked wrong word as correct" << std::endl;
+    }
+
+    char ** result;
+    int n = h.suggest(&result, "ell");
+    for (int i = 0; i < n; i++) std::cout << result[i];
+
+    return 0;
+}
--- a/src/hunspell-test.cxx	Mon Apr 16 22:26:19 2012 +1000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-/*
- * This file is part of MXE.
- * See index.html for further information.
- */
-
-#include <iostream>
-#include <fstream>
-#include <hunspell.hxx>
-
-int main(int argc, char *argv[])
-{
-    (void)argc;
-    (void)argv;
-
-    std::ofstream dic ("hunspell-test.dic");
-    dic << "2\nHello\nWorld";
-    dic.close();
-    std::ofstream aff ("hunspell-test.aff");
-    aff << "SET UTF-8\nTRY loredWH\nMAXDIFF 1";
-    aff.close();    
-    Hunspell h("hunspell-test.aff", "hunspell-test.dic");
-
-    if (h.spell("Hello") == 0)
-    {
-        std::cerr << "Error: hunspell marked correct word as wrong" << std::endl;
-    }
-    if (h.spell("wrld") != 0)
-    {
-        std::cerr << "Error: hunspell marked wrong word as correct" << std::endl;
-    }
-    
-    char ** result;
-    int n = h.suggest(&result, "ell");
-    for (int i = 0; i < n; i++) std::cout << result[i];
-    
-    return 0;
-}
--- a/src/hunspell.mk	Mon Apr 16 22:26:19 2012 +1000
+++ b/src/hunspell.mk	Mon Apr 16 23:38:26 2012 +1000
@@ -31,6 +31,6 @@
     # Test
     '$(TARGET)-g++' \
         -W -Wall -Werror -ansi -pedantic \
-        '$(2).cxx' -o '$(PREFIX)/$(TARGET)/bin/test-hunspell.exe' \
+        '$(2).cpp' -o '$(PREFIX)/$(TARGET)/bin/test-hunspell.exe' \
         `'$(TARGET)-pkg-config' hunspell --cflags --libs`
 endef