test/test_physfs.pl
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:
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