test/test_physfs.pl
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:
1036
66cf7a623a51 Added simple test for perl bindings.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     1
#!/usr/bin/perl -w
66cf7a623a51 Added simple test for perl bindings.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     2
66cf7a623a51 Added simple test for perl bindings.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     3
use strict;
66cf7a623a51 Added simple test for perl bindings.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     4
use warnings;
66cf7a623a51 Added simple test for perl bindings.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     5
use physfs;
66cf7a623a51 Added simple test for perl bindings.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     6
66cf7a623a51 Added simple test for perl bindings.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     7
print "testing PhysicsFS Perl bindings...\n";
66cf7a623a51 Added simple test for perl bindings.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     8
66cf7a623a51 Added simple test for perl bindings.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     9
print "init...\n";
66cf7a623a51 Added simple test for perl bindings.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    10
physfs::init("$0") or die("physfs::init('$0'): ".physfs::getLastError()."\n");
66cf7a623a51 Added simple test for perl bindings.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    11
66cf7a623a51 Added simple test for perl bindings.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    12
print "user dir: ", physfs::getUserDir(), "\n";
66cf7a623a51 Added simple test for perl bindings.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    13
print "base dir: ", physfs::getBaseDir(), "\n";
1242
1e6db80d2393 Added PHYSFS_getPrefDir().
Ryan C. Gordon <icculus@icculus.org>
parents: 1036
diff changeset
    14
print "pref dir: ", physfs::getPrefDir("icculus.org", "test_physfs"), "\n";
1036
66cf7a623a51 Added simple test for perl bindings.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    15
66cf7a623a51 Added simple test for perl bindings.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    16
print "deinit...\n";
66cf7a623a51 Added simple test for perl bindings.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    17
physfs::deinit();
66cf7a623a51 Added simple test for perl bindings.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    18
66cf7a623a51 Added simple test for perl bindings.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    19
print "done!\n";
66cf7a623a51 Added simple test for perl bindings.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    20
exit 0;
66cf7a623a51 Added simple test for perl bindings.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    21