test/test_physfs.rb
author Ryan C. Gordon <icculus@icculus.org>
Fri, 01 Jun 2012 05:44:50 -0400
changeset 1283 8bcc48d243df
parent 1242 1e6db80d2393
permissions -rwxr-xr-x
Added Zip64 support to the .zip archiver. Now we can handle .zip files > 4 gigabytes, etc.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1051
42fef01c55d6 Added SWIG-based Ruby bindings.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     1
#!/usr/bin/ruby
42fef01c55d6 Added SWIG-based Ruby bindings.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     2
42fef01c55d6 Added SWIG-based Ruby bindings.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     3
require 'physfs'
42fef01c55d6 Added SWIG-based Ruby bindings.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     4
42fef01c55d6 Added SWIG-based Ruby bindings.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     5
puts "testing PhysicsFS Ruby bindings..."
42fef01c55d6 Added SWIG-based Ruby bindings.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     6
puts "init..."
42fef01c55d6 Added SWIG-based Ruby bindings.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     7
42fef01c55d6 Added SWIG-based Ruby bindings.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     8
Physfs.init($0)
42fef01c55d6 Added SWIG-based Ruby bindings.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     9
42fef01c55d6 Added SWIG-based Ruby bindings.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    10
puts "user dir: " + Physfs.getUserDir()
42fef01c55d6 Added SWIG-based Ruby bindings.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    11
puts "base dir: " + Physfs.getBaseDir()
1242
1e6db80d2393 Added PHYSFS_getPrefDir().
Ryan C. Gordon <icculus@icculus.org>
parents: 1051
diff changeset
    12
puts "pref dir: " + Physfs.getPrefDir("icculus.org", "test_physfs")
1051
42fef01c55d6 Added SWIG-based Ruby bindings.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    13
42fef01c55d6 Added SWIG-based Ruby bindings.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    14
puts "deinit..."
42fef01c55d6 Added SWIG-based Ruby bindings.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    15
Physfs.deinit()
42fef01c55d6 Added SWIG-based Ruby bindings.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    16
42fef01c55d6 Added SWIG-based Ruby bindings.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    17
puts "done!"
42fef01c55d6 Added SWIG-based Ruby bindings.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    18
exit(0)
42fef01c55d6 Added SWIG-based Ruby bindings.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    19