NAME

Text::Editor::Vip::Buffer::Test - Support functions for testing

SYNOPSIS

use Test::More qw(no_plan);

use Text::Editor::Vip::Buffer ;
use Text::Editor::Vip::Buffer::Test ;

my $buffer = new Text::Editor::Vip::Buffer() ;

is(TestDoUndo('$buffer->DeleteLine(3) ;', '$buffer->Insert("Line 1\nLine 2\nLine 3\nLine 4") ;'), 1, 'test undo after DeleteLine') ;

DESCRIPTION

Support functions for testing

FUNCTIONS

DiagBuffers

Displays the content of the buffer via the diag function.

TestSerialisation

Extract the do buffer from the buffer, applies it to another buffer and compares the buffers for equality

TestDoUndo

Given a script, obtained from a do buffer for example, this function checks the do and undo buffer creation.

An optional setup script can be passed. It is executed first.

CompareBuffers

Compares two buffers for equality. debugging information is displayed if the buffers aren't equal.

CompareText

Compares the passed text with the content of the buffer. Returns '' if the text is equal to the buffer content. Returns a b<diff > if the texts won't match.

PrintPositionData

Displays the modification and selection information.

AUTHOR

Khemir Nadim ibn Hamouda
CPAN ID: NKH
mailto:nadim@khemir.net
http:// no web site

COPYRIGHT

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

The full text of the license can be found in the LICENSE file included with this module.