TS 61 Shell

Shell file Test Specification for NetBeans 6.1

Authors: Radim Roska
Last update: 27th May 2008
Introduction: This is test specification of shell scripting language support in NetBeans IDE. Netbeans provides very basic support : simple syntax highlighting, code formatting.


Documentation:

Contents


Test suite: Ide support

Purpose: This test suite checks that sh files are correctly configurable in IDE options and its possible to open,create sh files.
Setup: No preparation is necessary for this test suite.

  1. New shell script file
    1. Create some new project (for example new Java Application)
    2. Invoke File | New File... from main menu.
    3. Select Empty file option from Other category and press Next
    4. name file with .sh extension, e.g. shscript.sh, finish
    • EXPECTED RESULT: new empty file is opened with proper icon in tab
  1. Checking options for sh files
    1. Invoke Tools | Options....
    2. Select Editor , then Code Templates tab and ensure there is Sh file in language combobox
    3. add some new abbreviation and then try to use it.., e.g. for ifh+tab
if [True ];then echo "hello world" fi
    1. Select Fonts&Colors , then Syntax tab and select Sh file category in language combobox
    2. There are categories like identifier, keyword...by selecting these categories correct element in preview should be marked
    • EXPECTED RESULT: all options exists and are correctly configurable


Test suite: Syntax highlighting support

Purpose: This test suite checks that syntax highlighting works correctly.
Setup: No preparation is necessary for this test suite.

  1. Syntax highlighting
    1. Copy whole content of File:Samplesh.txt this document into file created in 1st test suite.
    • EXPECTED RESULT: all syntax elements has to be highlighted correctly according to the settings in Fonts&Colors (Tools > Options)


Test suite: Syntax errors detecting

Purpose: This test suite checks that editor (syntax analyzer) detects not correctly written code.
Setup: No preparation is necessary for this test suite.

  1. String test
    1. Paste into sh file this: echo "this is cool string
    2. Hover with mouse cursor over error mark
    • EXPECTED RESULT: wrongly ended string should be marked as error and error tooltip should be displayed, containing: Unexpected character.


Test suite: Code formatting

Purpose: This test suite checks that code formatting works correctly
Setup: No preparation is necessary for this test suite.

  1. Code indentation
    1. Place cursor to the end of some line and press Enter
    • EXPECTED RESULT: cursor at new line is intended as line before


Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo