### Targets: ###
-all: console$(EXEEXT) data
+all: console$(EXEEXT)
install:
$(__console___mac_setfilecmd)
-data:
- @mkdir -p .
- @for f in testdata.fc; do \
- if test ! -f ./$$f -a ! -d ./$$f ; \
- then x=yep ; \
- else x=`find $(srcdir)/$$f -newer ./$$f -print` ; \
- fi; \
- case "$$x" in ?*) \
- cp -pRf $(srcdir)/$$f . ;; \
- esac; \
- done
-
console_console.o: $(srcdir)/console.cpp
$(CXXC) -c -o $@ $(CONSOLE_CXXFLAGS) $(srcdir)/console.cpp
# Include dependency info, if present:
@IF_GNU_MAKE@-include ./.deps/*.d
-.PHONY: all install uninstall clean distclean data
+.PHONY: all install uninstall clean distclean
<wx-lib>base</wx-lib>
</exe>
- <wx-data id="data">
- <files>testdata.fc</files>
- </wx-data>
-
</makefile>
#if TEST_ALL
- #define TEST_DATETIME
#define TEST_DIR
#define TEST_DYNLIB
#define TEST_ENVIRON
#define TEST_FILE
- #define TEST_FILECONF
#define TEST_FILENAME
#define TEST_FILETIME
#define TEST_INFO_FUNCTIONS
#endif // TEST_FILE
-// ----------------------------------------------------------------------------
-// wxFileConfig
-// ----------------------------------------------------------------------------
-
-#ifdef TEST_FILECONF
-
-#include "wx/confbase.h"
-#include "wx/fileconf.h"
-
-static const struct FileConfTestData
-{
- const wxChar *name; // value name
- const wxChar *value; // the value from the file
-} fcTestData[] =
-{
- { wxT("value1"), wxT("one") },
- { wxT("value2"), wxT("two") },
- { wxT("novalue"), wxT("default") },
-};
-
-static void TestFileConfRead()
-{
- wxPuts(wxT("*** testing wxFileConfig loading/reading ***"));
-
- wxFileConfig fileconf(wxT("test"), wxEmptyString,
- wxT("testdata.fc"), wxEmptyString,
- wxCONFIG_USE_RELATIVE_PATH);
-
- // test simple reading
- wxPuts(wxT("\nReading config file:"));
- wxString defValue(wxT("default")), value;
- for ( size_t n = 0; n < WXSIZEOF(fcTestData); n++ )
- {
- const FileConfTestData& data = fcTestData[n];
- value = fileconf.Read(data.name, defValue);
- wxPrintf(wxT("\t%s = %s "), data.name, value.c_str());
- if ( value == data.value )
- {
- wxPuts(wxT("(ok)"));
- }
- else
- {
- wxPrintf(wxT("(ERROR: should be %s)\n"), data.value);
- }
- }
-
- // test enumerating the entries
- wxPuts(wxT("\nEnumerating all root entries:"));
- long dummy;
- wxString name;
- bool cont = fileconf.GetFirstEntry(name, dummy);
- while ( cont )
- {
- wxPrintf(wxT("\t%s = %s\n"),
- name.c_str(),
- fileconf.Read(name.c_str(), wxT("ERROR")).c_str());
-
- cont = fileconf.GetNextEntry(name, dummy);
- }
-
- static const wxChar *testEntry = wxT("TestEntry");
- wxPrintf(wxT("\nTesting deletion of newly created \"Test\" entry: "));
- fileconf.Write(testEntry, wxT("A value"));
- fileconf.DeleteEntry(testEntry);
- wxPrintf(fileconf.HasEntry(testEntry) ? wxT("ERROR\n") : wxT("ok\n"));
-}
-
-#endif // TEST_FILECONF
-
// ----------------------------------------------------------------------------
// wxFileName
// ----------------------------------------------------------------------------
TestEnvironment();
#endif // TEST_ENVIRON
-#ifdef TEST_FILECONF
- TestFileConfRead();
-#endif // TEST_FILECONF
-
#ifdef TEST_LOCALE
TestDefaultLang();
#endif // TEST_LOCALE
\r
### Targets: ###\r
\r
-all: $(OBJS)\console.exe data\r
+all: $(OBJS)\console.exe\r
\r
clean: \r
-if exist $(OBJS)\*.obj del $(OBJS)\*.obj\r
c0x32.obj $(CONSOLE_OBJECTS),$@,, $(__WXLIB_NET_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) $(__CAIRO_LIB_p) ole2w32.lib oleacc.lib import32.lib cw32$(__THREADSFLAG_5)$(__RUNTIME_LIBS_8).lib,,\r
|\r
\r
-data: \r
- if not exist $(OBJS) mkdir $(OBJS)\r
- for %f in (testdata.fc) do if not exist $(OBJS)\%f copy .\%f $(OBJS)\r
-\r
$(OBJS)\console_console.obj: .\console.cpp\r
$(CXX) -q -c -P -o$@ $(CONSOLE_CXXFLAGS) .\console.cpp\r
\r
\r
### Targets: ###\r
\r
-all: $(OBJS)\console.exe data\r
+all: $(OBJS)\console.exe\r
\r
clean: \r
-if exist $(OBJS)\*.o del $(OBJS)\*.o\r
$(OBJS)\console.exe: $(CONSOLE_OBJECTS)\r
$(CXX) -o $@ $(CONSOLE_OBJECTS) $(__DEBUGINFO) $(__THREADSFLAG) -L$(LIBDIRNAME) $(____CAIRO_LIBDIR_FILENAMES_p) $(LDFLAGS) $(__WXLIB_NET_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) $(__CAIRO_LIB_p) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 -lwininet\r
\r
-data: \r
- if not exist $(OBJS) mkdir $(OBJS)\r
- for %%f in (testdata.fc) do if not exist $(OBJS)\%%f copy .\%%f $(OBJS)\r
-\r
$(OBJS)\console_console.o: ./console.cpp\r
$(CXX) -c -o $@ $(CONSOLE_CXXFLAGS) $(CPPDEPS) $<\r
\r
-.PHONY: all clean data\r
+.PHONY: all clean\r
\r
\r
SHELL := $(COMSPEC)\r
\r
### Targets: ###\r
\r
-all: $(OBJS)\console.exe data\r
+all: $(OBJS)\console.exe\r
\r
clean: \r
-if exist $(OBJS)\*.obj del $(OBJS)\*.obj\r
$(CONSOLE_OBJECTS) $(__WXLIB_NET_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib wininet.lib\r
<<\r
\r
-data: \r
- if not exist $(OBJS) mkdir $(OBJS)\r
- for %f in (testdata.fc) do if not exist $(OBJS)\%f copy .\%f $(OBJS)\r
-\r
$(OBJS)\console_console.obj: .\console.cpp\r
$(CXX) /c /nologo /TP /Fo$@ $(CONSOLE_CXXFLAGS) .\console.cpp\r
\r
\r
### Targets: ###\r
\r
-all : .SYMBOLIC $(OBJS)\console.exe data\r
+all : .SYMBOLIC $(OBJS)\console.exe\r
\r
clean : .SYMBOLIC \r
-if exist $(OBJS)\*.obj del $(OBJS)\*.obj\r
@for %i in () do @%append $(OBJS)\console.lbc option stack=%i\r
wlink @$(OBJS)\console.lbc\r
\r
-data : .SYMBOLIC \r
- if not exist $(OBJS) mkdir $(OBJS)\r
- for %f in (testdata.fc) do if not exist $(OBJS)\%f copy .\%f $(OBJS)\r
-\r
$(OBJS)\console_console.obj : .AUTODEPEND .\console.cpp\r
$(CXX) -bt=nt -zq -fo=$^@ $(CONSOLE_CXXFLAGS) $<\r
\r
+++ /dev/null
-# this is the test data file for wxFileConfig tests
-value1=one
-# a comment here
-value2=two
-value\ with\ spaces\ inside\ it=nothing special
-path=$PATH