Download Padre

PreReleaseChecklist - 0.85 - bvierra

= General =

== What to report ==
 * for each single item
  * OK or
   * crashes
   * inconsistent behaviour
   * actions that do not work as expected
 * for each section
  * How much time did it take you to perform the tests?

== System information ==
 * OS: Ubuntu 10.10 (Kubuntu)
 * uname -a: Linux laptop06 2.6.35-27-generic #48-Ubuntu SMP Tue Feb 22 20:25:29 UTC 2011 i686 GNU/Linux
 * Perl: 5.10.1 (standard Ubuntu 10.10 install)
 * Wx: 0.9702
 * wxWidgets: 2.8.11 
 * Wx::Perl::ProcessStream: 0.30
 * PPI: 1.215

== Preparation ==
 1. fresh Padre installation
 2. check whether you are running the to-be-released Padre version by opening the "About" box

= Test Cases =


== Perl 5 scripts ==
 1. open a Perl script (using Ctrl-o or File/Open)
 1. run it by hitting F5
 1. change to the other output variant (external window or internal pane) (Tools/Preferences/Run Parameters/Use external window for execution)
 1. run it by hitting Shift-F5
 1. enable syntax checks (View/Show Syntax Check)
 1. introduce a syntax error and inspect resulting output
 1. click on the syntax error to jump to the position of the error
 1. enable autocomplete at "Tools"->"Preferences"->"Autocomplete"
 1. start typing a word which is already in the file (maybe "warn" from "warnings")
 1. hit Ctrl-Space, select a suggestion and confirm it
 1. enable bracket autocomplete at "Tools"->"Preferences"->"Behavior"
 1. type ( [ { " ' - each of them should get its closing part automatically

== Perl 5 modules ==
 1. open a large Perl module from the Padre source
 1. enable "View"->"Show Functions"
 1. double-click on a function name to jump to its location in the file
    * the text cursor should be at the corresponding function in the file
 1. enable "View"->"Show Outline"
 1. double-click on a method name to jump to its location in the file
    * the text cursor should be at the corresponding location in the file

== Project Browser (Perl 5 projects) ==

 1. Launch Padre
 1. Close all files using File/Close/Close all files
 1. Open the project browser using "View"->"Show Project Browser/Tree"
 1. A window should open on the left hand side of Padre
 1. It should be empty (TBD. I am not sure this is a good behavior)
 1. Open the Makefile.PL of the Padre project using Ctrl-O 
 1. The project browser window should be filled with the directory tree of Padre
 1. close Makefile.PL
 1. The project browser window should become empty (TBD. should it become empty?)
* Incorrect it defaults to 'Documents'
 1. Now open the share/styles/default.yml in the Padre project
 1. The project browser should show the directory of the Padre project again
 1. browse the directories of the Padre project
 1. open a file from the project by double-clicking on its name in the project browser
 1. save it under another name using F12
 1. check if the file appears in the Project Browser window
* It does not, right click -> refresh does however
 1. delete the newly created file (using the tools of your operating system, outside of Padre)
 1. observe that the listing of the file has disappeared from the Project browser
* It does not, right click -> refresh does however
 1. load file using "Search" -> "Open Resource ..."


== Open Resource ==

 1. Open Padre
 1. Open Padre.pm from the Padre source code
 1. Search/Open Resource
 1. You should see a window with a text box at the top
 1. Type in the letter 'x'
 1. You should see a list of files from the Padre project in the lower part of the window, all having letter 'x' in their name
 1. add the letter 'y' after the x and all the names should disappear
 1. remove the letter 'x'
 1. It should now show only files with the letter 'y' in them (=> bug it now shows 01_compile.t)
* I do not see this bug
 1. click on the first filename in the list and then move to the other items using the Up/Down arrows.
 1. Observe that the path to the actual file appears in the third field of the window.
 1. Double click on one of the files
 1. Observe that the file opens in Padre

 1. Open the "Open Resource" window again using Shift-Ctrl-R
 1. Type in 0 (zero)
 1. See the files appearing
 1. Using the 'Down' arrow move to the lower window
 1. select a file
 1. press ENTER to open the file in padre

TBD: I don't know how should this behave if there is no open file

== Text files ==
 1. "File" -> "New"
 1. save it as {{{file.txt}}}
 1. save it as {{{file}}}
 1. load a text file from disk
 1. use "Edit" -> "Go To ..." to jump to a given line
 1. use "Edit" -> "Go To ..." to jump to a given character position

== Saving perl file without extension needs to remember its mime-type ==

See #1107, #849

 1. "File" -> "New"
 1. type in 
{{{
#!/usr/bin/perl
use strict;
use warnings;
}}}
 1. save it as {{{file}}}
 1. Check if the mime-type (3rd box on the status bar) says "Perl 5"
* This fails, says it is 'Text'
 1. Close the file
 1. Open The file using "File" -> "Open"
 1. Check if the mime-type (3rd box on the status bar) says "Perl 5"
 1. Open The file using "File" -> "Save As"
 1. save it as {{{file2}}}
 1. Check if the mime-type (3rd box on the status bar) says "Perl 5"
 1. Repeat the above but this time the content of the file should be
{{{
#!/usr/bin/env perl

print 42;
}}}

 1. A third time in which case the content should be
{{{
#!/usr/local/bin/perl

print "ok";
}}}

== Perl distributions and templates and running ==
 1. create a new Perl 5 distribution: "File" -> "New" -> "Perl Distribution ..."
 1. create an additional "hello, world" style Perl 5 module in the same namespace: "File" -> "New" -> "Perl 5 Module"
 1. use "File" -> "Save Intuition" to save the module
 1. create a test for the module: "File" -> "New" -> "Perl 5 Test"
 1. run the test: "Run" -> "Run Tests"
 1. run the test: "Run" -> "Run and Build Tests"
 1. create a new Perl 5 script that uses the module: "File" -> "New" -> "Perl 5 Script"
 1. run it: "Run" -> "Run Script"
 1. run it: "Run" -> "Run Script (Debug Info)"
 1. add an infinite loop the the script
 1. run the script and abort it using F6

== Sessions ==

TODO: For further description see http://mail.perlide.org/pipermail/padre-dev/2011-February/002433.html
and expand this test-case

 1. cycle through the files using the keyboard: Ctrl-PageUp and Ctrl-PageDown
 1. save the session
 1. close one tab
 1. go to "File" -> "Recent Files" and re-open the file ( #1143, #1148 )
 1. close all tabs
 1. load the session that you saved before

== Padre server ==
 1. start Padre
 1. "Tools" -> "Preferences": enable "Open Files in existing Padre"
 1. restart Padre
 1. type {{{padre SOME_FILE}}} in the command line (should open in the same instance of Padre)
 1. "Tools" -> "Preferences": disable "Open Files in existing Padre"
 1. restart Padre
 1. type {{{padre SOME_FILE}}} in the command line (should start a new instance of Padre)

== The Command Line Window ==


 1. enable the command line window.
   ''View -> Show Command Line Window''.
 1. press '''?''' to get the list of commands.
 1. ''':! cmd''' - run command in shell.
   do ''':! ls''' to get the list of files and dirs.
 1. ''':e filename''' - open file.
   do ''':e Padre.pm''' (or every other file) to open the file on padre.
 1. ''':history''' - shows the history of all the commands.
 1. ''':keycatcher Number''' - shows the value of a single event.
 1. ''':padre cmd''' - runs a perl command. example: ''':padre Padre::Current->main->message("hi")'''.

== Code Folding ==
 ''View -> Show Code Folding''.
 by enabling code folding padre will put '''':'''' at the end of every statement(unless you already put it).
 (statement example;
   my $x=5;
   print (" x is now $x");
 )

== Whites paces ==
 ''View -> Show Whitespaces''
 by enabling white spaces pare will put a dot each time you click on the "Space" button.
 also white spaces will show you an arrow each time you click on the "Tab" button.

== Word Wrap ==
 ''View -> Word-Wrap''.
 by enabling word wrap, padre wont let you expand the code block horizontally, if you'll try it will go to the next line.

== Indentation Guide ==
 ''View -> Show Indentation Guide''.
 by enabling it you will see a vertical lines that will show you where a block starts and ends.

== TODO List ==

Related: #824, #1012, #1126, #1144, #1145, (#899, #319)

 1. Open a perl 5 file (check in the status bar if the mime-type is Perl 5)
 1. Open the TODO list window using ''View -> To-Do List''.
 1. Check if the window opened on the right-hand side
 1. In the file type in the following:


 || Who || Padre version || system || status ||
 || fenderson || r13895 || Ubuntu 10.10 || OK ||

{{{
# TODO hello
}}}
 1. See that the text '''hello''' appears in the TODO window
 1. (due to a bug currently it only shows up after saving the file)
 
 TODO: add more items to the test case to cover the other features and bugs as well.
 

== Right Margin ==

 1. Start padre.
 1. Write a script or open perl module.
 1. Enable Right Margin ''View -> Show Right Margin''.
 1. Go to the Advanced Preferences editor via 'Tools/Preferences/Advanced'.
 1. In the 'Filter' type "right_margin_column" and click on the item 'editor_right_margin_column'
 1. At the bottom of the screen you will see the details of this option
 1. The default is "80" change the value to "150" than press "Set" and than press "Save". you will see that the right margin mark has moved to the right.
 1. Now go back to the Advanced Preferences Editor select the editor_right_margin_column again and press "Reset" and than press "Save".
 1. Now it should go back to default (value = 80), middle of the screen.

== Current Line ==

  '''First Option'''

 1. Start padre.
 1. Write a script or open perl module.
 1. Enable Current Line ''View -> Show Current Line''.
 1. Go to ''Tools -> Preferences''.
 1. On the left side you'll have a list of options, go to "Appearance".
 1. There you'll have "Editor Current Line Background Colour" and on the right you can pick the new colour you want, pick a colour(yellow is the default) than Press the "Ok" button and than Press the "Save" button.

  '''Second Option'''

See #1150

 1. Start padre.
 1. Write a script or open perl module.
 1. Enable Right Margin ''View -> Show Current Line''.
 1. Go to ''Tools -> Preferences''.
 1. There are 3 buttons at the bottom "Save", "Advanced" and "Cancel". Press the "Advanced" button.
 1. Write down on the filter's search box "editor_currentline_colour" and press it.
 1. than you can change the value(= colour of the "Current Line) to "#FF0000" (Red).
 1. than Press the button "Set" and after that Press the Button "Save" on the bottom.

== Syntax highlighting ==

#1109

 1. In Tools/Preferences/Files and Colors 
    Select File Type: Perl 5 
    Select Highlighter: Scintilla
 1. Using File/Open open the file t/files/no_strict.pl
 1. The status bar at the bottom should now show:
    the name of the file | Scintilla | Perl 5 | (and some more)
 1. In Tools/Preferences/Files and Colors 
    Select File Type: Perl 5 
    Select Highlighter: PPI Experimental
 1. Viewing the already open no_strict.pl file the status bar at the bottom should now show:
    the name of the file | PPI Experimental | Perl 5 | (and some more)
    The coloring of the code has changed.
 1. In Tools/Preferences/Files and Colors 
    Select File Type: Perl 5 
    Select Highlighter: PPI Standard
 1. Viewing the already open no_strict.pl file the status bar at the bottom should now show:
    the name of the file | PPI Standard | Perl 5 | (and some more)

 || Who || Padre version || system || status ||
 || szabgab || r13895 || Ubuntu 10.10 || OK ||

 TODO: add screenshots with default highlighting of the various syntax highlighers

 TODO: other programming languages

== Setting the title bar ==

Padre allows the configuration of the window title and provides placeholders for various values.
The actual template can be set in '''Tools/Preferences/Apperance/Window title'''
The available placeholders are:

 * %p - Project name
 * %v - Padre version
 * %f - Current filename
 * %d - Current file's dirname
 * %b - Current file's basename
 * %F - Current filename relative to project

strings that look like placeholder but are not supported yet will appear verbatim.

See #1153, #1138, and #1104

 1. In Tools/Preferences/Apperance Set the '''Window title''' to
   * {{{  %b - %f - %p - %d - %F - %v - %x - %% }}}
 1. Open a file in the Padre project (e.g. lib/Padre.pm)
 1. Check if the title displays the correct information
   * Padre.pm - path/to/lib/Padre.pm - ??? - lib - lib/Padre.pm - ??? - %x - %%
 1. Create a new file (File/New)
 1. Check if the title displays the correct information

 TBD

== Searching and Replacing ==
 1. Open {{{lib/Padre/Wx/Main.pm}}} from the Padre source code
 1. Hit Ctrl-F for "Find"
 1. Enter the search term "sprintf"
 1. Click on "Find Next" several times
 1. Make sure that each result is nicely visible in the center of the editor window
 1. Activate "Search Backwards" to change the search direction
 1. Click on "Find Next" several times
 1. Activate "Case Sensitive"
 1. Modify the search term to "Sprintf"
 1. Click on "Find Next": you should not get a hit now
 1. Deactivate "Case Sensitive"
 1. Click on "Find Next": you should get a hit again
 1. Modify the search term to "Wx..gettext"
 1. Activate "Regular Expression"
 1. Click on "Find Next": you should get a hit
 1. Activate "Close Window on Hit"
 1. Click on "Find Next": you should get a hit, and the window should close
 1. Select "Search"->"Find" from the menu: The same search term as before should be in the dialog
 1. Click on "Find All" ('''remark: currently does not work''')
 1. Close the Window
 1. Hit F3: you should get a hit
 1. Hit F3 another time
 1. Hit Shift-F3: you should be back to the former hit

== Debugging a Perl 5 script ==

TBD by szabgab

Related #928, #929, #930, #931, #1005, #1036, #1083, #1085, #1086

== Installing CPAN modules ==

TBD by szabgab

Related #501, #1031, #1044, #1045


== Refactoring ==

 1. Open padre.
 1. Write a script or open perl module.
 1. Press double click on a variable that you would like to rename.
 1. Go to ''"Refactoring -> Rename Variable"'' it should pop up a window.
 1. Now you can rename you're variable name and you can change he's type (#Remember, you're only changing he's type not he's value!),
 after you wrote the new name you can now press ok.


== Crash Reports ==
Can't call method "root" on an undefined value at lib/Padre/Wx/Directory/TreeCtrl.pm line 137.
Perl exited with active threads:
        6 running and unjoined
        0 finished and unjoined
        0 running and detached