Jim Park's Unicode NSIS merging - Step 1 : switch to TCHARs where relevant.

Compiler output is identical before & after this step

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/branches/wizou@6036 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
wizou 2010-03-24 17:22:56 +00:00
parent 4e48722b63
commit 752d7d239a
209 changed files with 9698 additions and 7658 deletions

View file

@ -1,7 +1,7 @@
#include <cppunit/extensions/HelperMacros.h>
#include "../dirreader.h"
#include <string>
#include "tstring.h"
using namespace std;
@ -13,30 +13,30 @@ class SpecTest : public CppUnit::TestFixture {
public:
void testMatches() {
testMatch("test.exe", "test.exe", true);
testMatch("test", "test", true);
testMatch("test.exe", "test.*", true);
testMatch("test", "test.*", true);
testMatch("test", "????", true);
testMatch("test", "???", false);
testMatch("test", "*.exe", false);
testMatch("test.exe.bat", "*.exe", false);
testMatch("test.exe.bat", "*.bat", true);
testMatch("test.exe.bat", "*t", true);
testMatch("test.exe.bat", "*", true);
testMatch("test.exe.bat", "*x*", true);
testMatch("test.exe.exe", "*.*", true);
testMatch("test.exe.bat", "*.b*", true);
testMatch("test.exe.bat", "tes?.*.bat", true);
testMatch("test.exe.bat", "tes?.*bat", true);
testMatch("test.exe.bat", "tes?.*bat***.", true);
testMatch("test.exe", "????.*", true);
testMatch("testing.exe", "????.*", false);
testMatch(TEXT("test.exe"), TEXT("test.exe"), true);
testMatch(TEXT("test"), TEXT("test"), true);
testMatch(TEXT("test.exe"), TEXT("test.*"), true);
testMatch(TEXT("test"), TEXT("test.*"), true);
testMatch(TEXT("test"), TEXT("????"), true);
testMatch(TEXT("test"), TEXT("???"), false);
testMatch(TEXT("test"), TEXT("*.exe"), false);
testMatch(TEXT("test.exe.bat"), TEXT("*.exe"), false);
testMatch(TEXT("test.exe.bat"), TEXT("*.bat"), true);
testMatch(TEXT("test.exe.bat"), TEXT("*t"), true);
testMatch(TEXT("test.exe.bat"), TEXT("*"), true);
testMatch(TEXT("test.exe.bat"), TEXT("*x*"), true);
testMatch(TEXT("test.exe.exe"), TEXT("*.*"), true);
testMatch(TEXT("test.exe.bat"), TEXT("*.b*"), true);
testMatch(TEXT("test.exe.bat"), TEXT("tes?.*.bat"), true);
testMatch(TEXT("test.exe.bat"), TEXT("tes?.*bat"), true);
testMatch(TEXT("test.exe.bat"), TEXT("tes?.*bat***."), true);
testMatch(TEXT("test.exe"), TEXT("????.*"), true);
testMatch(TEXT("testing.exe"), TEXT("????.*"), false);
}
private:
void testMatch(string name, string spec, bool result) {
void testMatch(tstring name, tstring spec, bool result) {
CPPUNIT_ASSERT_EQUAL( dir_reader::matches(name, spec), result );
}