aboutsummaryrefslogtreecommitdiff
path: root/ACME-Bare-Metal/t
diff options
context:
space:
mode:
authorDrahflow <drahflow@gmx.de>2012-12-22 18:16:58 +0100
committerDrahflow <drahflow@gmx.de>2012-12-22 18:16:58 +0100
commitaffeeb43b4ffc136a67efd11ff712b7f142266be (patch)
tree205115568365f6e056d511e0e885f5d07913910d /ACME-Bare-Metal/t
parentf20e50a4e3ac3aeeac84358a68c253358f213667 (diff)
ACME::Bare::Metal Perl x86 code executor
Diffstat (limited to 'ACME-Bare-Metal/t')
-rw-r--r--ACME-Bare-Metal/t/ACME-Bare-Metal.t26
1 files changed, 26 insertions, 0 deletions
diff --git a/ACME-Bare-Metal/t/ACME-Bare-Metal.t b/ACME-Bare-Metal/t/ACME-Bare-Metal.t
new file mode 100644
index 0000000..0975996
--- /dev/null
+++ b/ACME-Bare-Metal/t/ACME-Bare-Metal.t
@@ -0,0 +1,26 @@
+# Before `make install' is performed this script should be runnable with
+# `make test'. After `make install' it should work as `perl ACME-Bare-Metal.t'
+
+#########################
+
+# change 'tests => 1' to 'tests => last_test_to_print';
+
+use strict;
+use warnings;
+
+use Test::More tests => 3;
+BEGIN { use_ok('ACME::Bare::Metal') };
+
+#########################
+
+# Insert your test code below, the Test::More module is use()ed here so read
+# its man page ( perldoc Test::More ) for help writing this test script.
+
+my $block = ACME::Bare::Metal::allocate(4096);
+ok($block > 0, "Block allocation");
+
+ACME::Bare::Metal::poke($block, 0xC3);
+ok(ACME::Bare::Metal::peek($block) == 0xC3);
+
+ACME::Bare::Metal::execute($block);
+ACME::Bare::Metal::deallocate($block, 4096);