ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

perl-Test-Class

by jonasbn ALL

SublimeText assistance for Perl's Test::Class

Details

Installs

  • Total 848
  • Win 499
  • Mac 174
  • Linux 175
Jul 26 Jul 25 Jul 24 Jul 23 Jul 22 Jul 21 Jul 20 Jul 19 Jul 18 Jul 17 Jul 16 Jul 15 Jul 14 Jul 13 Jul 12 Jul 11 Jul 10 Jul 9 Jul 8 Jul 7 Jul 6 Jul 5 Jul 4 Jul 3 Jul 2 Jul 1 Jun 30 Jun 29 Jun 28 Jun 27 Jun 26 Jun 25 Jun 24 Jun 23 Jun 22 Jun 21 Jun 20 Jun 19 Jun 18 Jun 17 Jun 16 Jun 15 Jun 14 Jun 13 Jun 12
Windows 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Mac 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Linux 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0

Readme

Source
raw.​githubusercontent.​com

SublimeText-Perl-Test-Class

License

This package provides snippets for Perl's Test::Class for Sublime Text 2 and 3

Introduction

The package is currently offering the following snippets:

testclass
testmethod

testclass is a variation of the snippet from the builtin Perl package: package. It unfolds boilerplate code for a test class (Test::Class) holding the following body of code:

package Test::Class::ClassName;

use strict;
use warnings;
use base qw(Test::Class);
use Test::More;

#run prior and once per suite
sub startup : Test(startup) {
    # body...

    return 1;
}

#run after and once per suite
sub shutdown : Test(shutdown) {
    # body...

    return 1;
}

#run prior and once per test method
sub setup : Test(setup) {
    # body...

    return 1;
}

#run after and once per test method
sub teardown : Test(teardown) {
    # body...

    return 1;
}

1;

testmethod is a variation of the snippet from the builtin Perl package: sub. It unfolds a more specialized variation of a subroutine.

sub testmethod_name : Test(number_of_tests) {
    my ($self) = @_;
    # body...

    return return_value;
}

This package can with luck be used with the package for Perl's Test::Class for Sublime Text 2 and 3.

Installation

For installation several options are available.

Via Package Control:

  • Control+Shift+P on Linux/Windows,
  • Command+Shift+P on OS X,
  • or for any OS
    1. Select Tools->Command Palette from the menu
    2. Select Package Control: Install Package
    3. Select perl-Test-Class from the list of available packages

Git:

Clone the repository in your Sublime Text Packages directory.

$ git clone https://github.com/jonasbn/perl-Sublime-Test-Class

The advantage of using either Package Control or git is, that the plugin will be automatically updated.

See also the Package Control page for this plugin.

From ZIP

Sublime Text 3

  1. Download the zip file
  2. Unpack it in your Sublime Text directory, as per OS and Sublime Text
    • OS X ~/Library/Application Support/Sublime Text 3/Packages/
    • Linux ~/.config/sublime-text-3/Packages/
    • Windows %APPDATA%\Sublime Text 3\Packages\
  3. Start using it! (see section above)

Sublime Text 2

  1. Download the zip file
  2. Unpack it in your Sublime Text directory, as per OS and Sublime Text
    • OS X ~/Library/Application Support/Sublime Text 2/Packages/
    • Linux ~/.config/sublime-text-2/Packages/
    • Windows %APPDATA%\Sublime Text 2\Packages\
  3. Start using it! (see section above)

Issues

Please report any issues via github.

Motivation

Organizing your tests using Test::Class is really useful and since Test::Class can be used across projects/distributions this package can assist in speeding up your development.

History

2015-08-15 1.0.0

  • Initial version

License

The package is licensed under the Artistic License 2.0 and pull-requests are most welcome, please see the contribution guidelines.

jonasbn, Copenhagen/Denmark