From b5871fa5121b7b2d1d071152a761bc305b0ace8b Mon Sep 17 00:00:00 2001
From: Mike McCormack <mike@codeweavers.com>
Date: Tue, 15 Aug 2006 22:58:12 +0900
Subject: [PATCH] infosoft: Add a test for the language neutral word breaker.

---
 configure                       |   3 +-
 configure.ac                    |   1 +
 dlls/infosoft/Makefile.in       |   2 +
 dlls/infosoft/tests/Makefile.in |  13 ++
 dlls/infosoft/tests/infosoft.c  | 204 ++++++++++++++++++++++++++++++++
 programs/winetest/Makefile.in   |   3 +
 6 files changed, 225 insertions(+), 1 deletion(-)
 create mode 100644 dlls/infosoft/tests/Makefile.in
 create mode 100644 dlls/infosoft/tests/infosoft.c

diff --git a/configure b/configure
index b8d6b8bce58..c2e0a9c3729 100755
--- a/configure
+++ b/configure
@@ -23895,7 +23895,7 @@ MAKE_TEST_RULES=dlls/Maketest.rules
 MAKE_PROG_RULES=programs/Makeprog.rules
 
 
-ac_config_files="$ac_config_files Make.rules dlls/Makedll.rules dlls/Makeimplib.rules dlls/Maketest.rules programs/Makeprog.rules Makefile dlls/Makefile dlls/activeds/Makefile dlls/advapi32/Makefile dlls/advapi32/tests/Makefile dlls/advpack/Makefile dlls/advpack/tests/Makefile dlls/amstream/Makefile dlls/atl/Makefile dlls/avicap32/Makefile dlls/avifil32/Makefile dlls/cabinet/Makefile dlls/cabinet/tests/Makefile dlls/capi2032/Makefile dlls/cards/Makefile dlls/cfgmgr32/Makefile dlls/comcat/Makefile dlls/comcat/tests/Makefile dlls/comctl32/Makefile dlls/comctl32/tests/Makefile dlls/comdlg32/Makefile dlls/comdlg32/tests/Makefile dlls/compstui/Makefile dlls/crtdll/Makefile dlls/crypt32/Makefile dlls/crypt32/tests/Makefile dlls/cryptdll/Makefile dlls/cryptnet/Makefile dlls/ctl3d32/Makefile dlls/d3d8/Makefile dlls/d3d8/tests/Makefile dlls/d3d9/Makefile dlls/d3d9/tests/Makefile dlls/d3dim/Makefile dlls/d3drm/Makefile dlls/d3dx8/Makefile dlls/d3dxof/Makefile dlls/dbghelp/Makefile dlls/dciman32/Makefile dlls/ddraw/Makefile dlls/ddraw/tests/Makefile dlls/devenum/Makefile dlls/dinput/Makefile dlls/dinput/tests/Makefile dlls/dinput8/Makefile dlls/dmband/Makefile dlls/dmcompos/Makefile dlls/dmime/Makefile dlls/dmloader/Makefile dlls/dmscript/Makefile dlls/dmstyle/Makefile dlls/dmsynth/Makefile dlls/dmusic/Makefile dlls/dmusic32/Makefile dlls/dnsapi/Makefile dlls/dnsapi/tests/Makefile dlls/dplay/Makefile dlls/dplayx/Makefile dlls/dpnet/Makefile dlls/dpnhpast/Makefile dlls/dsound/Makefile dlls/dsound/tests/Makefile dlls/dswave/Makefile dlls/dxdiagn/Makefile dlls/dxerr8/Makefile dlls/dxerr9/Makefile dlls/dxguid/Makefile dlls/gdi/Makefile dlls/gdi/tests/Makefile dlls/glu32/Makefile dlls/glut32/Makefile dlls/gphoto2.ds/Makefile dlls/hhctrl.ocx/Makefile dlls/hid/Makefile dlls/hlink/Makefile dlls/hlink/tests/Makefile dlls/iccvid/Makefile dlls/icmp/Makefile dlls/ifsmgr.vxd/Makefile dlls/imaadp32.acm/Makefile dlls/imagehlp/Makefile dlls/imm32/Makefile dlls/infosoft/Makefile dlls/inseng/Makefile dlls/iphlpapi/Makefile dlls/iphlpapi/tests/Makefile dlls/itss/Makefile dlls/kernel/Makefile dlls/kernel/tests/Makefile dlls/lz32/Makefile dlls/lz32/tests/Makefile dlls/mapi32/Makefile dlls/mapi32/tests/Makefile dlls/mciavi32/Makefile dlls/mcicda/Makefile dlls/mciseq/Makefile dlls/mciwave/Makefile dlls/midimap/Makefile dlls/mlang/Makefile dlls/mlang/tests/Makefile dlls/mmdevldr.vxd/Makefile dlls/monodebg.vxd/Makefile dlls/mpr/Makefile dlls/mprapi/Makefile dlls/msacm32.drv/Makefile dlls/msacm32/Makefile dlls/msacm32/tests/Makefile dlls/msadp32.acm/Makefile dlls/mscms/Makefile dlls/mscms/tests/Makefile dlls/msdmo/Makefile dlls/msftedit/Makefile dlls/msg711.acm/Makefile dlls/mshtml/Makefile dlls/mshtml/tests/Makefile dlls/msi/Makefile dlls/msi/tests/Makefile dlls/msimg32/Makefile dlls/msisys.ocx/Makefile dlls/msnet32/Makefile dlls/msrle32/Makefile dlls/msvcrt/Makefile dlls/msvcrt/tests/Makefile dlls/msvcrt20/Makefile dlls/msvcrt40/Makefile dlls/msvcrtd/Makefile dlls/msvcrtd/tests/Makefile dlls/msvfw32/Makefile dlls/msvidc32/Makefile dlls/mswsock/Makefile dlls/msxml3/Makefile dlls/msxml3/tests/Makefile dlls/netapi32/Makefile dlls/netapi32/tests/Makefile dlls/newdev/Makefile dlls/ntdll/Makefile dlls/ntdll/tests/Makefile dlls/ntdsapi/Makefile dlls/objsel/Makefile dlls/odbc32/Makefile dlls/odbccp32/Makefile dlls/ole32/Makefile dlls/ole32/tests/Makefile dlls/oleacc/Makefile dlls/oleaut32/Makefile dlls/oleaut32/tests/Makefile dlls/olecli32/Makefile dlls/oledlg/Makefile dlls/olepro32/Makefile dlls/olesvr32/Makefile dlls/opengl32/Makefile dlls/powrprof/Makefile dlls/psapi/Makefile dlls/psapi/tests/Makefile dlls/pstorec/Makefile dlls/qcap/Makefile dlls/quartz/Makefile dlls/quartz/tests/Makefile dlls/query/Makefile dlls/rasapi32/Makefile dlls/riched20/Makefile dlls/riched20/tests/Makefile dlls/riched32/Makefile dlls/rpcrt4/Makefile dlls/rpcrt4/tests/Makefile dlls/rsabase/Makefile dlls/rsabase/tests/Makefile dlls/rsaenh/Makefile dlls/rsaenh/tests/Makefile dlls/sane.ds/Makefile dlls/secur32/Makefile dlls/secur32/tests/Makefile dlls/security/Makefile dlls/sensapi/Makefile dlls/serialui/Makefile dlls/setupapi/Makefile dlls/setupapi/tests/Makefile dlls/sfc/Makefile dlls/shdocvw/Makefile dlls/shdocvw/tests/Makefile dlls/shell32/Makefile dlls/shell32/tests/Makefile dlls/shfolder/Makefile dlls/shlwapi/Makefile dlls/shlwapi/tests/Makefile dlls/snmpapi/Makefile dlls/spoolss/Makefile dlls/stdole2.tlb/Makefile dlls/stdole32.tlb/Makefile dlls/sti/Makefile dlls/strmiids/Makefile dlls/tapi32/Makefile dlls/twain_32/Makefile dlls/unicows/Makefile dlls/url/Makefile dlls/urlmon/Makefile dlls/urlmon/tests/Makefile dlls/user/Makefile dlls/user/tests/Makefile dlls/userenv/Makefile dlls/usp10/Makefile dlls/usp10/tests/Makefile dlls/uuid/Makefile dlls/uxtheme/Makefile dlls/uxtheme/tests/Makefile dlls/vdhcp.vxd/Makefile dlls/vdmdbg/Makefile dlls/version/Makefile dlls/version/tests/Makefile dlls/vmm.vxd/Makefile dlls/vnbt.vxd/Makefile dlls/vnetbios.vxd/Makefile dlls/vtdapi.vxd/Makefile dlls/vwin32.vxd/Makefile dlls/w32skrnl/Makefile dlls/winecrt0/Makefile dlls/wined3d/Makefile dlls/winedos/Makefile dlls/winemp3.acm/Makefile dlls/wineps.drv/Makefile dlls/winex11.drv/Makefile dlls/wininet/Makefile dlls/wininet/tests/Makefile dlls/winmm/Makefile dlls/winmm/joystick/Makefile dlls/winmm/tests/Makefile dlls/winmm/winealsa/Makefile dlls/winmm/winearts/Makefile dlls/winmm/wineaudioio/Makefile dlls/winmm/winecoreaudio/Makefile dlls/winmm/wineesd/Makefile dlls/winmm/winejack/Makefile dlls/winmm/winenas/Makefile dlls/winmm/wineoss/Makefile dlls/winnls32/Makefile dlls/winspool.drv/Makefile dlls/winspool.drv/tests/Makefile dlls/wintab32/Makefile dlls/wintrust/Makefile dlls/wldap32/Makefile dlls/wnaspi32/Makefile dlls/wow32/Makefile dlls/ws2_32/Makefile dlls/ws2_32/tests/Makefile dlls/wsock32/Makefile dlls/wtsapi32/Makefile documentation/Makefile fonts/Makefile include/Makefile libs/Makefile libs/port/Makefile libs/wine/Makefile libs/wpp/Makefile loader/Makefile programs/Makefile programs/clock/Makefile programs/cmdlgtst/Makefile programs/control/Makefile programs/eject/Makefile programs/expand/Makefile programs/explorer/Makefile programs/hh/Makefile programs/icinfo/Makefile programs/iexplore/Makefile programs/msiexec/Makefile programs/notepad/Makefile programs/oleview/Makefile programs/progman/Makefile programs/regedit/Makefile programs/regsvr32/Makefile programs/rpcss/Makefile programs/rundll32/Makefile programs/start/Makefile programs/taskmgr/Makefile programs/uninstaller/Makefile programs/view/Makefile programs/wcmd/Makefile programs/wineboot/Makefile programs/winebrowser/Makefile programs/winecfg/Makefile programs/wineconsole/Makefile programs/winedbg/Makefile programs/winefile/Makefile programs/winemenubuilder/Makefile programs/winemine/Makefile programs/winepath/Makefile programs/winetest/Makefile programs/winevdm/Makefile programs/winhelp/Makefile programs/winver/Makefile programs/wordpad/Makefile server/Makefile tools/Makefile tools/widl/Makefile tools/winapi/Makefile tools/winebuild/Makefile tools/winedump/Makefile tools/winegcc/Makefile tools/wmc/Makefile tools/wrc/Makefile"
+ac_config_files="$ac_config_files Make.rules dlls/Makedll.rules dlls/Makeimplib.rules dlls/Maketest.rules programs/Makeprog.rules Makefile dlls/Makefile dlls/activeds/Makefile dlls/advapi32/Makefile dlls/advapi32/tests/Makefile dlls/advpack/Makefile dlls/advpack/tests/Makefile dlls/amstream/Makefile dlls/atl/Makefile dlls/avicap32/Makefile dlls/avifil32/Makefile dlls/cabinet/Makefile dlls/cabinet/tests/Makefile dlls/capi2032/Makefile dlls/cards/Makefile dlls/cfgmgr32/Makefile dlls/comcat/Makefile dlls/comcat/tests/Makefile dlls/comctl32/Makefile dlls/comctl32/tests/Makefile dlls/comdlg32/Makefile dlls/comdlg32/tests/Makefile dlls/compstui/Makefile dlls/crtdll/Makefile dlls/crypt32/Makefile dlls/crypt32/tests/Makefile dlls/cryptdll/Makefile dlls/cryptnet/Makefile dlls/ctl3d32/Makefile dlls/d3d8/Makefile dlls/d3d8/tests/Makefile dlls/d3d9/Makefile dlls/d3d9/tests/Makefile dlls/d3dim/Makefile dlls/d3drm/Makefile dlls/d3dx8/Makefile dlls/d3dxof/Makefile dlls/dbghelp/Makefile dlls/dciman32/Makefile dlls/ddraw/Makefile dlls/ddraw/tests/Makefile dlls/devenum/Makefile dlls/dinput/Makefile dlls/dinput/tests/Makefile dlls/dinput8/Makefile dlls/dmband/Makefile dlls/dmcompos/Makefile dlls/dmime/Makefile dlls/dmloader/Makefile dlls/dmscript/Makefile dlls/dmstyle/Makefile dlls/dmsynth/Makefile dlls/dmusic/Makefile dlls/dmusic32/Makefile dlls/dnsapi/Makefile dlls/dnsapi/tests/Makefile dlls/dplay/Makefile dlls/dplayx/Makefile dlls/dpnet/Makefile dlls/dpnhpast/Makefile dlls/dsound/Makefile dlls/dsound/tests/Makefile dlls/dswave/Makefile dlls/dxdiagn/Makefile dlls/dxerr8/Makefile dlls/dxerr9/Makefile dlls/dxguid/Makefile dlls/gdi/Makefile dlls/gdi/tests/Makefile dlls/glu32/Makefile dlls/glut32/Makefile dlls/gphoto2.ds/Makefile dlls/hhctrl.ocx/Makefile dlls/hid/Makefile dlls/hlink/Makefile dlls/hlink/tests/Makefile dlls/iccvid/Makefile dlls/icmp/Makefile dlls/ifsmgr.vxd/Makefile dlls/imaadp32.acm/Makefile dlls/imagehlp/Makefile dlls/imm32/Makefile dlls/infosoft/Makefile dlls/infosoft/tests/Makefile dlls/inseng/Makefile dlls/iphlpapi/Makefile dlls/iphlpapi/tests/Makefile dlls/itss/Makefile dlls/kernel/Makefile dlls/kernel/tests/Makefile dlls/lz32/Makefile dlls/lz32/tests/Makefile dlls/mapi32/Makefile dlls/mapi32/tests/Makefile dlls/mciavi32/Makefile dlls/mcicda/Makefile dlls/mciseq/Makefile dlls/mciwave/Makefile dlls/midimap/Makefile dlls/mlang/Makefile dlls/mlang/tests/Makefile dlls/mmdevldr.vxd/Makefile dlls/monodebg.vxd/Makefile dlls/mpr/Makefile dlls/mprapi/Makefile dlls/msacm32.drv/Makefile dlls/msacm32/Makefile dlls/msacm32/tests/Makefile dlls/msadp32.acm/Makefile dlls/mscms/Makefile dlls/mscms/tests/Makefile dlls/msdmo/Makefile dlls/msftedit/Makefile dlls/msg711.acm/Makefile dlls/mshtml/Makefile dlls/mshtml/tests/Makefile dlls/msi/Makefile dlls/msi/tests/Makefile dlls/msimg32/Makefile dlls/msisys.ocx/Makefile dlls/msnet32/Makefile dlls/msrle32/Makefile dlls/msvcrt/Makefile dlls/msvcrt/tests/Makefile dlls/msvcrt20/Makefile dlls/msvcrt40/Makefile dlls/msvcrtd/Makefile dlls/msvcrtd/tests/Makefile dlls/msvfw32/Makefile dlls/msvidc32/Makefile dlls/mswsock/Makefile dlls/msxml3/Makefile dlls/msxml3/tests/Makefile dlls/netapi32/Makefile dlls/netapi32/tests/Makefile dlls/newdev/Makefile dlls/ntdll/Makefile dlls/ntdll/tests/Makefile dlls/ntdsapi/Makefile dlls/objsel/Makefile dlls/odbc32/Makefile dlls/odbccp32/Makefile dlls/ole32/Makefile dlls/ole32/tests/Makefile dlls/oleacc/Makefile dlls/oleaut32/Makefile dlls/oleaut32/tests/Makefile dlls/olecli32/Makefile dlls/oledlg/Makefile dlls/olepro32/Makefile dlls/olesvr32/Makefile dlls/opengl32/Makefile dlls/powrprof/Makefile dlls/psapi/Makefile dlls/psapi/tests/Makefile dlls/pstorec/Makefile dlls/qcap/Makefile dlls/quartz/Makefile dlls/quartz/tests/Makefile dlls/query/Makefile dlls/rasapi32/Makefile dlls/riched20/Makefile dlls/riched20/tests/Makefile dlls/riched32/Makefile dlls/rpcrt4/Makefile dlls/rpcrt4/tests/Makefile dlls/rsabase/Makefile dlls/rsabase/tests/Makefile dlls/rsaenh/Makefile dlls/rsaenh/tests/Makefile dlls/sane.ds/Makefile dlls/secur32/Makefile dlls/secur32/tests/Makefile dlls/security/Makefile dlls/sensapi/Makefile dlls/serialui/Makefile dlls/setupapi/Makefile dlls/setupapi/tests/Makefile dlls/sfc/Makefile dlls/shdocvw/Makefile dlls/shdocvw/tests/Makefile dlls/shell32/Makefile dlls/shell32/tests/Makefile dlls/shfolder/Makefile dlls/shlwapi/Makefile dlls/shlwapi/tests/Makefile dlls/snmpapi/Makefile dlls/spoolss/Makefile dlls/stdole2.tlb/Makefile dlls/stdole32.tlb/Makefile dlls/sti/Makefile dlls/strmiids/Makefile dlls/tapi32/Makefile dlls/twain_32/Makefile dlls/unicows/Makefile dlls/url/Makefile dlls/urlmon/Makefile dlls/urlmon/tests/Makefile dlls/user/Makefile dlls/user/tests/Makefile dlls/userenv/Makefile dlls/usp10/Makefile dlls/usp10/tests/Makefile dlls/uuid/Makefile dlls/uxtheme/Makefile dlls/uxtheme/tests/Makefile dlls/vdhcp.vxd/Makefile dlls/vdmdbg/Makefile dlls/version/Makefile dlls/version/tests/Makefile dlls/vmm.vxd/Makefile dlls/vnbt.vxd/Makefile dlls/vnetbios.vxd/Makefile dlls/vtdapi.vxd/Makefile dlls/vwin32.vxd/Makefile dlls/w32skrnl/Makefile dlls/winecrt0/Makefile dlls/wined3d/Makefile dlls/winedos/Makefile dlls/winemp3.acm/Makefile dlls/wineps.drv/Makefile dlls/winex11.drv/Makefile dlls/wininet/Makefile dlls/wininet/tests/Makefile dlls/winmm/Makefile dlls/winmm/joystick/Makefile dlls/winmm/tests/Makefile dlls/winmm/winealsa/Makefile dlls/winmm/winearts/Makefile dlls/winmm/wineaudioio/Makefile dlls/winmm/winecoreaudio/Makefile dlls/winmm/wineesd/Makefile dlls/winmm/winejack/Makefile dlls/winmm/winenas/Makefile dlls/winmm/wineoss/Makefile dlls/winnls32/Makefile dlls/winspool.drv/Makefile dlls/winspool.drv/tests/Makefile dlls/wintab32/Makefile dlls/wintrust/Makefile dlls/wldap32/Makefile dlls/wnaspi32/Makefile dlls/wow32/Makefile dlls/ws2_32/Makefile dlls/ws2_32/tests/Makefile dlls/wsock32/Makefile dlls/wtsapi32/Makefile documentation/Makefile fonts/Makefile include/Makefile libs/Makefile libs/port/Makefile libs/wine/Makefile libs/wpp/Makefile loader/Makefile programs/Makefile programs/clock/Makefile programs/cmdlgtst/Makefile programs/control/Makefile programs/eject/Makefile programs/expand/Makefile programs/explorer/Makefile programs/hh/Makefile programs/icinfo/Makefile programs/iexplore/Makefile programs/msiexec/Makefile programs/notepad/Makefile programs/oleview/Makefile programs/progman/Makefile programs/regedit/Makefile programs/regsvr32/Makefile programs/rpcss/Makefile programs/rundll32/Makefile programs/start/Makefile programs/taskmgr/Makefile programs/uninstaller/Makefile programs/view/Makefile programs/wcmd/Makefile programs/wineboot/Makefile programs/winebrowser/Makefile programs/winecfg/Makefile programs/wineconsole/Makefile programs/winedbg/Makefile programs/winefile/Makefile programs/winemenubuilder/Makefile programs/winemine/Makefile programs/winepath/Makefile programs/winetest/Makefile programs/winevdm/Makefile programs/winhelp/Makefile programs/winver/Makefile programs/wordpad/Makefile server/Makefile tools/Makefile tools/widl/Makefile tools/winapi/Makefile tools/winebuild/Makefile tools/winedump/Makefile tools/winegcc/Makefile tools/wmc/Makefile tools/wrc/Makefile"
 
 
 cat >confcache <<\_ACEOF
@@ -24537,6 +24537,7 @@ do
     "dlls/imagehlp/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/imagehlp/Makefile" ;;
     "dlls/imm32/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/imm32/Makefile" ;;
     "dlls/infosoft/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/infosoft/Makefile" ;;
+    "dlls/infosoft/tests/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/infosoft/tests/Makefile" ;;
     "dlls/inseng/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/inseng/Makefile" ;;
     "dlls/iphlpapi/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/iphlpapi/Makefile" ;;
     "dlls/iphlpapi/tests/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/iphlpapi/tests/Makefile" ;;
diff --git a/configure.ac b/configure.ac
index 8d89e0c8a05..9c6784463f6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1641,6 +1641,7 @@ dlls/imaadp32.acm/Makefile
 dlls/imagehlp/Makefile
 dlls/imm32/Makefile
 dlls/infosoft/Makefile
+dlls/infosoft/tests/Makefile
 dlls/inseng/Makefile
 dlls/iphlpapi/Makefile
 dlls/iphlpapi/tests/Makefile
diff --git a/dlls/infosoft/Makefile.in b/dlls/infosoft/Makefile.in
index 1651dbd5bbd..32b8d915fac 100644
--- a/dlls/infosoft/Makefile.in
+++ b/dlls/infosoft/Makefile.in
@@ -11,6 +11,8 @@ C_SRCS = \
 	infosoft_main.c \
 	wordbreaker.c
 
+SUBDIRS = tests
+
 @MAKE_DLL_RULES@
 
 ### Dependencies:
diff --git a/dlls/infosoft/tests/Makefile.in b/dlls/infosoft/tests/Makefile.in
new file mode 100644
index 00000000000..0a1e64ba276
--- /dev/null
+++ b/dlls/infosoft/tests/Makefile.in
@@ -0,0 +1,13 @@
+TOPSRCDIR = @top_srcdir@
+TOPOBJDIR = ../../..
+SRCDIR    = @srcdir@
+VPATH     = @srcdir@
+TESTDLL   = infosoft.dll
+IMPORTS   = ole32 advapi32 kernel32
+
+CTESTS = \
+	infosoft.c
+
+@MAKE_TEST_RULES@
+
+### Dependencies:
diff --git a/dlls/infosoft/tests/infosoft.c b/dlls/infosoft/tests/infosoft.c
new file mode 100644
index 00000000000..9570636d43d
--- /dev/null
+++ b/dlls/infosoft/tests/infosoft.c
@@ -0,0 +1,204 @@
+/*
+ * tests for the language neutral word breaker
+ *
+ * Copyright 2006 Mike McCormack for CodeWeavers
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#define COBJMACROS
+
+#include <stdio.h>
+#include <ole2.h>
+#include "indexsrv.h"
+
+#include "wine/test.h"
+
+#include <initguid.h>
+
+DEFINE_GUID(CLSID_wb_neutral,  0x369647e0,0x17b0,0x11ce,0x99,0x50,0x00,0xaa,0x00,0x4b,0xbb,0x1f);
+DEFINE_GUID(_IID_IWordBreaker, 0xD53552C8,0x77E3,0x101A,0xB5,0x52,0x08,0x00,0x2B,0x33,0xB0,0xE6);
+
+static WCHAR teststring[] = {
+    's','q','u','a','r','e',' ',
+    'c','i','r','c','l','e',' ',
+    't','r','i','a','n','g','l','e',' ',
+    'b','o','x',0
+};
+
+struct expected {
+    UINT ofs;
+    UINT len;
+    WCHAR data[10];
+};
+
+static int wordnum;
+
+static struct expected testres[] = {
+    { 0, 6, {'s','q','u','a','r','e',0 }},
+    { 7, 6, {'c','i','r','c','l','e',0 }},
+    { 14, 8, {'t','r','i','a','n','g','l','e',0 }},
+    { 23, 3, {'b','o','x',0}},
+};
+
+static HRESULT WINAPI ws_QueryInterface(IWordSink *ws, REFIID riid, void **ppvObject)
+{
+    ok(0, "not expected\n");
+    return E_NOINTERFACE;
+}
+
+static ULONG WINAPI ws_AddRef(IWordSink *ws)
+{
+    ok(0, "not expected\n");
+    return 2;
+}
+
+static ULONG WINAPI ws_Release(IWordSink *ws)
+{
+    ok(0, "not expected\n");
+    return 1;
+}
+
+static HRESULT WINAPI ws_PutWord(IWordSink *ws,
+                                 ULONG cwc, const WCHAR * pwcInBuf,
+                                 ULONG cwcSrcLen, ULONG cwcSrcPos)
+{
+    ok(testres[wordnum].len == cwcSrcLen, "wrong length\n");
+    ok(!cwcSrcPos ||(testres[wordnum].ofs == cwcSrcPos), "wrong offset\n");
+    ok(!memcmp(testres[wordnum].data, pwcInBuf, cwcSrcLen), "wrong data\n");
+    wordnum++;
+    return S_OK;
+}
+
+static HRESULT WINAPI ws_PutAltWord(IWordSink *ws,
+                                    ULONG cwc, const WCHAR * pwcInBuf,
+                                    ULONG cwcSrcLen, ULONG cwcSrcPos)
+{
+    ok(0, "not expected\n");
+    return S_OK;
+}
+
+static HRESULT WINAPI ws_StartAltPhrase(IWordSink *ws)
+{
+    ok(0, "not expected\n");
+    return S_OK;
+}
+
+static HRESULT WINAPI ws_EndAltPhrase(IWordSink *ws)
+{
+    ok(0, "not expected\n");
+    return S_OK;
+}
+
+static HRESULT WINAPI ws_PutBreak(IWordSink *ws, WORDREP_BREAK_TYPE breakType)
+{
+    ok(0, "not expected\n");
+    return S_OK;
+}
+
+static const IWordSinkVtbl wsvt =
+{
+    ws_QueryInterface,
+    ws_AddRef,
+    ws_Release,
+    ws_PutWord,
+    ws_PutAltWord,
+    ws_StartAltPhrase,
+    ws_EndAltPhrase,
+    ws_PutBreak,
+};
+
+typedef struct _wordsink_impl
+{
+    const IWordSinkVtbl *vtbl;
+} wordsink_impl;
+
+static wordsink_impl wordsink = { &wsvt };
+
+static HRESULT WINAPI fillbuf_none(TEXT_SOURCE *ts)
+{
+    return E_FAIL;
+}
+
+static HRESULT WINAPI fillbuf_many(TEXT_SOURCE *ts)
+{
+    int i;
+
+    if (ts->awcBuffer == NULL)
+        ts->awcBuffer = teststring;
+    else
+        ts->awcBuffer += ts->iCur;
+
+    if (!ts->awcBuffer[0])
+        return E_FAIL;
+
+    for( i=0; ts->awcBuffer[i] && ts->awcBuffer[i] != ' '; i++)
+        ;
+    if (ts->awcBuffer[i] == ' ')
+        i++;
+
+    ts->iCur = 0;
+    ts->iEnd = i;
+
+    return S_OK;
+}
+
+START_TEST(infosoft)
+{
+    HRESULT r;
+    BOOL license;
+    IWordBreaker *wb = NULL;
+    TEXT_SOURCE ts;
+
+    r = CoInitialize(NULL);
+    ok( r == S_OK, "failed\n");
+
+    r = CoCreateInstance( &CLSID_wb_neutral, NULL, CLSCTX_INPROC_SERVER,
+                        &_IID_IWordBreaker, (LPVOID)&wb);
+
+    if (FAILED(r))
+        return;
+
+    r = IWordBreaker_Init( wb, FALSE, 0x100, &license );
+    ok( r == S_OK, "failed to init the wordbreaker\n");
+    /* ok( license == TRUE, "should be no license\n"); */
+
+    wordnum = 0;
+    ts.pfnFillTextBuffer = fillbuf_none;
+    ts.awcBuffer = teststring;
+    ts.iEnd = lstrlenW(ts.awcBuffer);
+    ts.iCur = 0;
+    r = IWordBreaker_BreakText( wb, &ts, (IWordSink*) &wordsink, NULL);
+    ok( r == S_OK, "failed\n");
+
+    ok(wordnum == 4, "words not processed\n");
+
+    wordnum = 0;
+    ts.pfnFillTextBuffer = fillbuf_many;
+    ts.awcBuffer = teststring;
+    ts.iEnd = 0;
+    ts.iCur = 0;
+
+    r = fillbuf_many(&ts);
+    ok( r == S_OK, "failed\n");
+
+    r = IWordBreaker_BreakText( wb, &ts, (IWordSink*) &wordsink, NULL);
+    ok( r == S_OK, "failed\n");
+
+    ok(wordnum == 4, "words not processed\n");
+    IWordBreaker_Release( wb );
+
+    CoUninitialize();
+}
diff --git a/programs/winetest/Makefile.in b/programs/winetest/Makefile.in
index 61d1772f1b5..924ebbdd63f 100644
--- a/programs/winetest/Makefile.in
+++ b/programs/winetest/Makefile.in
@@ -34,6 +34,7 @@ TESTBINS = \
 	dsound_test.exe$(DLLEXT) \
 	gdi32_test.exe$(DLLEXT) \
 	hlink_test.exe$(DLLEXT) \
+	infosoft_test.exe$(DLLEXT) \
 	iphlpapi_test.exe$(DLLEXT) \
 	kernel32_test.exe$(DLLEXT) \
 	lz32_test.exe$(DLLEXT) \
@@ -134,6 +135,8 @@ gdi32_test.exe$(DLLEXT): $(DLLDIR)/gdi/tests/gdi32_test.exe$(DLLEXT)
 	cp $(DLLDIR)/gdi/tests/gdi32_test.exe$(DLLEXT) $@ && $(STRIP) $@
 hlink_test.exe$(DLLEXT): $(DLLDIR)/hlink/tests/hlink_test.exe$(DLLEXT)
 	cp $(DLLDIR)/hlink/tests/hlink_test.exe$(DLLEXT) $@ && $(STRIP) $@
+infosoft_test.exe$(DLLEXT): $(DLLDIR)/infosoft/tests/infosoft_test.exe$(DLLEXT)
+	cp $(DLLDIR)/infosoft/tests/infosoft_test.exe$(DLLEXT) $@ && $(STRIP) $@
 iphlpapi_test.exe$(DLLEXT): $(DLLDIR)/iphlpapi/tests/iphlpapi_test.exe$(DLLEXT)
 	cp $(DLLDIR)/iphlpapi/tests/iphlpapi_test.exe$(DLLEXT) $@ && $(STRIP) $@
 kernel32_test.exe$(DLLEXT): $(DLLDIR)/kernel/tests/kernel32_test.exe$(DLLEXT)
-- 
GitLab