tests and test gen script
[p5sagit/local-lib.git] / t / classmethod.t
diff --git a/t/classmethod.t b/t/classmethod.t
new file mode 100644 (file)
index 0000000..19868b5
--- /dev/null
@@ -0,0 +1,35 @@
+
+use strict;
+use warnings;
+use Test::More 'no_plan';
+use local::lib ();
+
+
+my $c = 'local::lib';
+
+
+{
+
+is($c->resolve_empty_path, '~/perl5');
+is($c->resolve_empty_path('foo'), 'foo');
+
+}
+
+{
+
+local *File::Spec::rel2abs = sub { shift; 'FOO'.shift; };
+is($c->resolve_relative_path('bar'),'FOObar');
+
+}
+
+{
+
+File::Path::rmtree('t/var/splat');
+
+$c->ensure_dir_structure_for('t/var/splat');
+
+ok(-d 't/var/splat');
+
+ok(-f 't/var/splat/.modulebuildrc');
+
+}