1#!/usr/bin/perl -w 2# vim: set ft=perl: 3 4use strict; 5 6use Test::More; 7use Shell::Base; 8 9plan tests => 5; 10 11use_ok("Shell::Base"); 12 13my $shell = Shell::Base->new; 14is($shell->prompt, '(Shell::Base) $ ', "default prompt"); 15is($shell->prompt('foo $ '), 'foo $ ', "custom prompt"); 16is($shell->prompt, 'foo $ ', "custom prompt"); 17 18my $ref = "$shell"; 19$shell->prompt(sub { "$_[0]" }); 20is($shell->prompt, $ref, "\$sh->prompt(\\\&foo) works ($ref == $shell)"); 21