Test Case AOOTest-284: (Extend) Text * Cell Properties_Numbers_Format code_Decimal places [Version : 1] | ||
---|---|---|
Author: | undefined - 24/10/2012 14:21:16 | |
Summary: To verify that text * cell properties can be applied/modified properly - numbers - format code. Number Format Codes Number format codes can consist of up to three sections separated by a semicolon. 1. In a number format code with two sections, the first section applies to positive values and zero, and the second section applies to negative values. 2. In a number format code with three sections, the first, the second, and the third section applies to positive values, negative values, and the value zero respectively. 3. User can also assign conditions to the three sections, so that the format is only applied if a condition is met. Decimal Places and Significant Digits 1. Use zero (0) or the number sign (#) as placeholders in number format code to represent numbers. 2. Use question mark (?) to represent the number of digits to include in the numerator and the denominator of a fraction. 3. If a number contains more digits to the right of the decimal delimiter than there are placeholders in the format, the number is rounded off accordingly. If a number contains more digits to the left of the decimal delimiter than there are placeholders in the format, then entire number is displayed. 4. Guide for using placeholders when creating a number format code. Guide Placeholders Purpose Brief # Represents numbers. Only displays significant digits, does not display extra zeros. 0 Represents numbers. Fills the rest digits of number with zeros if fewer digits in the number than in the number format. ? Represents the number of digits to include in the numerator and the denominator of a fraction. Fractions that do not fit the pattern that user defined are displayed as floating point numbers. Examples Format Code Number Format ####.#;-000.0 3456.78 as 3456.8 and 20.02 as 20 -1 as -001.0 and -12345.234 as -12345.2 #.000 9.9 as 9.900 and 10.2345 as 10.235 #.0# 3 as 3.0 and 1234.567 as 1234.57 # ???/??? 5.75 as 5 3/4 and 6.3 as 6 3/10 #.##;(0.##);0.0 0.5 as .5 and 10.2 as 10.2 -.5 as (0.5) and -3 as (3.) 0 as 0.0 | ||
Preconditions: | ||
#: | Step actions: | Expected Results: |
1 |
| Expected results |
2 | New a spreadsheet. | New spreadsheet is created. |
3 | Enter a decimal into one cell, then select the cell. | |
4 | Enter 'Format Cells' dialog and active Numbers tab. | Category should be General as default, and Format code field is disabled. |
5 | Change category. | Category is changed, default format in format list is selected, and related format code displays in Format code field. |
6 | Enter your format code (using #/0/?) into Format code field. ** Please refer to description for details. | Customized format code is entered, and preview in preview field should update properly. 1. If the customized one is not duplicated with any pre-defined one, then Add button and Edit Comment button will be enabled. 2. If the customized one is duplicated with any pre-defined one, then related pre-defined format is selected. |
7 | Make sure the customized format code is not duplicated with any pre-defined one, and click Add button. | New format is added into format list of related category. |
8 | Click OK button. | New format should be properly applied. |
9 | Repeat steps 2 to 7 several times. | Ditto. |
10 | Enter a decimal into one cell, then select the cell. | |
11 | Apply a customized format via dialog. | Specific format should be properly applied. |
12 | Repeat steps 9 and 10 several times. | Ditto. |
13 | Undo several times, then redo several times. | Undo and redo should perform properly. Customized format codes should not be removed when perform undo. |
14 | Save and close file. | |
15 | Open the file. | File should be saved properly. |
Execution type: | Manual | |
Importance: | Medium | |
Test Focus: | ||
Feature first available at which release: | ||
Automation script name: | ||
Testsuite set: | ||
Requirements | None | |
Keywords: | None |