Author: mark
Date: 2004-04-17 23:44:16 -0400 (Sat, 17 Apr 2004)
New Revision: 383
Added:
trunk/pr/file.pr
Removed:
trunk/pr/file_test.pr
Modified:
trunk/modules/File/File.c
trunk/modules/dbm/dbm.vcproj
trunk/pr/sqlite.pr
trunk/pr/test.pr
Log:
fixed new bug in file.c, renamed file_test.pr to file.pr,
all tests passed in windows, ready to try weekly release
Modified: trunk/modules/File/File.c
===================================================================
--- trunk/modules/File/File.c 2004-04-18 02:30:46 UTC (rev 382)
+++ trunk/modules/File/File.c 2004-04-18 03:44:16 UTC (rev 383)
@@ -486,7 +486,7 @@
i64_t pos_in, how;
INT_64_PARAM(1, pos_in);
- INT_64_PARAM(3, how);
+ INT_64_PARAM(2, how);
if (!has_proto_QUES(ist, self, File_OBJ)) {
raise_exception(ist, OBJ(TYPE_EXC), "seek can only be called on
a File object");
Modified: trunk/modules/dbm/dbm.vcproj
===================================================================
--- trunk/modules/dbm/dbm.vcproj 2004-04-18 02:30:46 UTC (rev 382)
+++ trunk/modules/dbm/dbm.vcproj 2004-04-18 03:44:16 UTC (rev 383)
@@ -73,21 +73,22 @@
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="c:\prothon\include;c:\prothon\apr\apr\include;c:\prothon\apr\apr-util\include"
-
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;DBM_EXPORTS"
- RuntimeLibrary="0"
+
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;DBM_EXPORTS;APR_DECLARE_STATIC;APU_DECLARE_STATIC"
+ RuntimeLibrary="1"
UsePrecompiledHeader="0"
WarningLevel="3"
+ WarnAsError="TRUE"
Detect64BitPortabilityProblems="TRUE"
DebugInformationFormat="3"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
- AdditionalDependencies="apr.lib wsock32.lib"
+ AdditionalDependencies="apr.lib aprutil.lib
wsock32.lib"
OutputFile="$(OutDir)/dbm.dll"
LinkIncremental="1"
-
AdditionalLibraryDirectories="C:\prothon\apr\apr\LibR"
- IgnoreDefaultLibraryNames="LIBCMTD.lib"
+
AdditionalLibraryDirectories="C:\prothon\apr\apr\LibR;C:\prothon\apr\apr-util\LibR"
+ IgnoreDefaultLibraryNames="LIBCMTD.LIB"
GenerateDebugInformation="TRUE"
SubSystem="2"
OptimizeReferences="2"
Added: trunk/pr/file.pr
===================================================================
--- trunk/pr/file.pr 2004-04-18 02:30:46 UTC (rev 382)
+++ trunk/pr/file.pr 2004-04-18 03:44:16 UTC (rev 383)
@@ -0,0 +1,42 @@
+#!/usr/bin/env prothon
+
+import File
+
+f = File("test.txt", 'w+')
+for i in 5:
+ f.write("line "+i+'\n')
+f.writeLines( ['line 5\n','line 6\n','line 7\n','line 8\n','line 9\n',])
+f.close()
+
+ref = ['line 0\n','line 1\n','line 2\n','line 3\n','line 4\n',]
+ref += ['line 5\n','line 6\n','line 7\n','line 8\n','line 9\n',]
+
+f = File("test.txt")
+x = f.read()
+print x
+if (x != ''.join(ref)):
+ print "test failed: x != f"
+ Sys.exit(1)
+
+f.seek(7)
+x = f.read(7)
+print x
+if (x != 'line 1\n'):
+ print "test failed: x != 'line 1'"
+ Sys.exit(1)
+
+f.seek(21)
+x = f.read(14)
+print x
+if (x != 'line 3\nline 4\n'):
+ print "test failed: x != 'line 3line 4'"
+ Sys.exit(1)
+
+x = f.readLines()
+ref = ['line 5\n','line 6\n','line 7\n','line 8\n','line 9\n',]
+print x
+if (''.join(x) != ''.join(ref)):
+ print "test failed: x != 'line 5','line 6','line 7','line 8','line 9'"
+ Sys.exit(1)
+
+print "\nall tests passed"
Deleted: trunk/pr/file_test.pr
===================================================================
--- trunk/pr/file_test.pr 2004-04-18 02:30:46 UTC (rev 382)
+++ trunk/pr/file_test.pr 2004-04-18 03:44:16 UTC (rev 383)
@@ -1,42 +0,0 @@
-#!/usr/bin/env prothon
-
-import File
-
-f = File("test.txt", 'w+')
-for i in 5:
- f.write("line "+i+'\n')
-f.writeLines( ['line 5\n','line 6\n','line 7\n','line 8\n','line 9\n',])
-f.close()
-
-ref = ['line 0\n','line 1\n','line 2\n','line 3\n','line 4\n',]
-ref += ['line 5\n','line 6\n','line 7\n','line 8\n','line 9\n',]
-
-f = File("test.txt")
-x = f.read()
-print x
-if (x != ''.join(ref)):
- print "test failed: x != f"
- Sys.exit(1)
-
-f.seek(7)
-x = f.read(7)
-print x
-if (x != 'line 1\n'):
- print "test failed: x != 'line 1'"
- Sys.exit(1)
-
-f.seek(21)
-x = f.read(14)
-print x
-if (x != 'line 3\nline 4\n'):
- print "test failed: x != 'line 3line 4'"
- Sys.exit(1)
-
-x = f.readLines()
-ref = ['line 5\n','line 6\n','line 7\n','line 8\n','line 9\n',]
-print x
-if (''.join(x) != ''.join(ref)):
- print "test failed: x != 'line 5','line 6','line 7','line 8','line 9'"
- Sys.exit(1)
-
-print "\nall tests passed"
Modified: trunk/pr/sqlite.pr
===================================================================
--- trunk/pr/sqlite.pr 2004-04-18 02:30:46 UTC (rev 382)
+++ trunk/pr/sqlite.pr 2004-04-18 03:44:16 UTC (rev 383)
@@ -8,7 +8,7 @@
curs = conn.cursor()
try: curs.execute!("drop table tbl1")
-except: print 3
+except: pass
try: curs.execute!("drop table tbl2")
except: pass
Modified: trunk/pr/test.pr
===================================================================
--- trunk/pr/test.pr 2004-04-18 02:30:46 UTC (rev 382)
+++ trunk/pr/test.pr 2004-04-18 03:44:16 UTC (rev 383)
@@ -1,5 +1,4 @@
#!/usr/bin/env prothon
-def f(a,b): pass
-
-print f(1,2), f(1,2)
+try: 1/0
+except Exception, e: print e.__doc__
|