test/test_physfs.rb
author David Yip <dwyip@peach-bun.com>
Mon, 15 Aug 2016 00:50:58 -0500
changeset 1375 20ee02ea086c
parent 1242 1e6db80d2393
permissions -rwxr-xr-x
Remove unused variable in zip_hash_ancestors. Under gcc 5.4.0, this generates unused variable warnings, which in combination with -Werror causes a compile error.
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