WMLScript Standard Libraries Test Specification


ISSUE : wmlscriptlibsl12ts_15-01-2002

Copyright © 1999-2002 Wireless Application Forum. Ltd. All Rights Reserved.


Preface

This document contains the assertion specification for the WAP June 2000 release of the: WMLScript Standard Libraries technical specification.

The following specifications were used to generate the assertions:

The specification is organized such that there is a section for each section of the WMLScript Standard Libraries specification in which assertions can be found.

For each assertion in the specifications, a corresponding entry in this test specification contains the following elements:

ID: The name by which the test is known
Class: An assertion Class as defined in IEEE Std 1003.3. These types are:
A A mandatory, testable assertion.
B A mandatory, but untestable assertion.
C An optional, testable assertion.
D An optional, but untestable assertion.
Scope: If an assertion is type C or D, this entry describes the option that needs to be supported in order to activate the test.
Text: The text of the assertion and a reference to the source specification from which the assertion is derived.
Note: Any supplementary information associated with the assertion. For example it may suggest a strategy for the test implementation of the assertion or it may propose rationale as to why a test is classified as untestable.

This specification uses the following conventions for convenience:


Table of Contents

   6 WMLScript Compliance
      6.1 Supported Data Type
      6.2 Data Type Conversions
      6.3 Error Handling
      6.4 Support for Integer-Only Devices

   7 Lang
      7.1 abs
      7.2 min
      7.3 max
      7.4 parseInt
      7.5 parseFloat
      7.6 isInt
      7.7 isFloat
      7.8 maxInt
      7.9 minInt
      7.10 float
      7.11 exit
      7.12 abort
      7.13 random
      7.14 seed
      7.15 characterSet

   8 Float
      8.1 int
      8.2 floor
      8.3 ceil
      8.4 pow
      8.5 round
      8.6 sqrt
      8.7 maxFloat
      8.8 minFloat

   9 String
      9.1 length
      9.2 isEmpty
      9.3 charAt
      9.4 subString
      9.5 find
      9.6 replace
      9.7 elements
      9.8 elementAt
      9.9 removeAt
      9.10 replaceAt
      9.11 insertAt
      9.12 squeeze
      9.13 trim
      9.14 compare
      9.15 toString
      9.16 format
         9.16.1 format/integer
         9.16.2 format/float
         9.16.3 format/string

   10 URL
      10.1 isValid
      10.2 getScheme
      10.3 getHost
      10.4 getPort
      10.5 getPath
      10.6 getParameters
      10.7 getQuery
      10.8 getFragment
      10.9 getBase
      10.10 getReferer
      10.11 resolve
      10.12 escapeString
      10.13 unescapeString
      10.14 loadString

   11 WMLBrowser
      11.1 getVar
      11.2 setVar
      11.3 go
      11.4 prev
      11.5 newcontext
      11.6 getCurrentCard
      11.7 refresh

   12 Dialogs
      12.1 prompt
      12.2 confirm
      12.3 alert

6 WMLScript Compliance

6.1 Supported Data Type

There are no testable assertions in this section.

6.2 Data Type Conversions

There are no testable assertions in this section.

6.3 Error Handling

ID: wmlscriptlib/compliance/error_handling/1
Class: B
Text: When a function argument cannot be converted to the required parameter type for a function, the function returns INVALID with no other side effects. [WMLScript Standard Libraries Specification section 6.3]

6.4 Support for Integer-Only Devices

There are no specific assertions or tests created for this section. Lang.float() returning false is tested within the Lang/float tests. Lang.parseFloat() returning invalid is tested within the Lang/parseFloat tests. All functions returning invalid when floating point support is required is tested within each applicable library function.

7 Lang

7.1 abs

ID: wmlscriptlib/lang/abs/1
Class: A
Text: When the Lang.abs function is called with a value as its argument, it returns the absolute value of that argument. [WMLScript Standard Libraries Specification section 7.1]

ID: wmlscriptlib/lang/abs/2
Class: A
Text: When the Lang.abs function is called with an integer as its argument, it returns an integer type reflecting the absolute value of the argument. [WMLScript Standard Libraries Specification section 7.1]

ID: wmlscriptlib/lang/abs/3
Class: C
Scope: "The client DOES support floating-point operations"
Text: When the Lang.abs function is called with a floating-point value as its argument, it returns a floating-point type reflecting the absolute value of the argument. [WMLScript Standard Libraries Specification section 7.1]

ID: wmlscriptlib/lang/abs/4
Class: A
Text: When the Lang.abs function is called with an argument that is not of type integer or floating-point, the function returns 'invalid'. [WMLScript Standard Libraries Specification section 7.1]

7.2 min

ID: wmlscriptlib/lang/min/1
Class: A
Text: When the Lang.min function is called with two values as arguments, it returns the smaller of the two values. [WMLScript Standard Libraries Specification section 7.2]

ID: wmlscriptlib/lang/min/2
Class: C
Scope: "The client DOES support floating-point operations"
Text: When the Lang.min function is called with two values as arguments, and the two values are equal, the first value is returned. [WMLScript Standard Libraries Specification section 7.2]
Note: Reclassified to Class A for wmlssl June 2000. The first value is integer 3, the second value is float 3.0. The return of the first value is tested by checking the typeof the return value to be an integer.

ID: wmlscriptlib/lang/min/3
Class: A
Text: When the Lang.min function is called with any non-value argument(s), it returns 'invalid'. [WMLScript Standard Libraries Specification section 7.2]

ID: wmlscriptlib/lang/min/4
Class: A
Text: The value and type returned by the Lang.min function must be the va value of the smallest value and of type 'integer' when that value is an integer. [WMLScript Standard Libraries Specification section 7.2]
Note: New assertion for wmlssl June 2000

ID: wmlscriptlib/lang/min/5
Class: C
Scope: "The client DOES support floating-point operations"
Text: The value and type returned by the Lang.min function must be the va value of the smallest value and of type 'floating point' when that value is a floating point. [WMLScript Standard Libraries Specification section 7.2]
Note: New assertion for wmlssl June 2000

7.3 max

ID: wmlscriptlib/lang/max/1
Class: A
Text: When the Lang.max function is called with two values as arguments, it returns the larger of the two values. [WMLScript Standard Libraries Specification section 7.3]

ID: wmlscriptlib/lang/max/2
Class: C
Scope: "The client DOES support floating-point operations"
Text: When the Lang.max function is called with two values as arguments, and the two values are equal, the first value is returned. [WMLScript Standard Libraries Specification section 7.3]
Note: Reclassified to Class A for wmlssl June 2000. The first value is integer 3, the second value is float 3.0. The return of the first value is tested by checking the typeof the return value to be an integer.

ID: wmlscriptlib/lang/max/3
Class: A
Text: When the Lang.max function is called with any non-value argument(s), it returns 'invalid'. [WMLScript Standard Libraries Specification section 7.3]

ID: wmlscriptlib/lang/max/4
Class: A
Text: The value and type returned by the Lang.max function must be the value of the largest value and of type 'integer' when that value is an integer. [WMLScript Standard Libraries Specification section 7.3]
Note: New assertion for wmlssl June 2000

ID: wmlscriptlib/lang/max/5
Class: C
Scope: "The client DOES support floating-point operations"
Text: The value and type returned by the Lang.max function must be the value of the largest value and of type 'floating point' when that value is a floating point. [WMLScript Standard Libraries Specification section 7.3]
Note: New assertion for wmlssl June 2000

7.4 parseInt

ID: wmlscriptlib/lang/parseint/1
Class: A
Text: When the Lang.parseInt function is called with a string as an argument, it returns an integer reflecting the value of the contents of the string from its beginning up to the first character that is not '+', '-', or a decimal digit. [WMLScript Standard Libraries Specification section 7.4]

ID: wmlscriptlib/lang/parseint/2
Class: A
Text: When the Lang.parseInt function is called with a string as an argument, and that string does not contain the representation of an integer at its beginning, the function returns 'invalid'. [WMLScript Standard Libraries Specification section 7.4]

ID: wmlscriptlib/lang/parseint/3
Class: A
Text: When the Lang.parseInt function detects an error when parsing its input argument, the function returns 'invalid'. [WMLScript Standard Libraries Specification section 7.4]
Note: New assertion for wmlssl June 2000

7.5 parseFloat

ID: wmlscriptlib/lang/parsefloat/1
Class: C
Scope: "The client DOES support floating-point operations"
Text: When the Lang.parseFloat function is called with a string as an argument, it returns a floating-point value reflecting the value of the contents of the string from its beginning up to the first character that is not a legal part of a floating-point representation. [WMLScript Standard Libraries Specification section 7.5]

ID: wmlscriptlib/lang/parsefloat/2
Class: C
Scope: "The client DOES support floating-point operations"
Text: When the Lang.parseFloat function is called with a string as an argument, and that string contains no floating-point value representation, the function returns 'invalid'. [WMLScript Standard Libraries Specification section 7.5]

ID: wmlscriptlib/lang/parsefloat/3
Class: C
Scope: "The client DOES NOT support floating-point operations"
Text: When the implementation does not support floating-point operations and the Lang.parseFloat function is called, it returns 'invalid'. [WMLScript Standard Libraries Specification section 7.5]

ID: wmlscriptlib/lang/parsefloat/4
Class: A
Text: When the Lang.parseFloat function detects an error when parsing its input argument, the function returns 'invalid'. [WMLScript Standard Libraries Specification section 7.4]
Note: New assertion for wmlssl June 2000

7.6 isInt

ID: wmlscriptlib/lang/isint/1
Class: A
Text: When the Lang.isInt function is called with an object, it returns a boolean indicating whether the object can be converted to type integer. [WMLScript Standard Libraries Specification section 7.6]

ID: wmlscriptlib/lang/isint/2
Class: A
Text: When the Lang.isInt function is called with an object of type invalid, it returns 'invalid'. [WMLScript Standard Libraries Specification section 7.6]

7.7 isFloat

ID: wmlscriptlib/lang/isfloat/1
Class: C
Scope: "The client DOES support floating-point operations"
Text: When the Lang.isFloat function is called with an object, it returns a boolean indicating whether the object can be converted to type floating-point. [WMLScript Standard Libraries Specification section 7.7]

ID: wmlscriptlib/lang/isfloat/2
Class: C
Scope: "The client DOES NOT support floating-point operations"
Text: When the Lang.isfloat function is called with an object, and the implementation does not support floating-point operations, the function returns 'invalid'. [WMLScript Standard Libraries Specification section 7.7]

ID: wmlscriptlib/lang/isfloat/3
Class: A
Text: When the Lang.isFloat function is called with an object of type invalid, it returns 'invalid'. [WMLScript Standard Libraries Specification section 7.7]

7.8 maxInt

ID: wmlscriptlib/lang/maxint/1
Class: A
Text: When the Lang.maxInt function is called, it returns the largest integer value that can be represented (2147483647). [WMLScript Standard Libraries Specification section 7.8]

7.9 minInt

ID: wmlscriptlib/lang/minint/1
Class: A
Text: When the Lang.minInt function is called, it returns the smallest integer value that can be represented (-2147483648). [WMLScript Standard Libraries Specification section 7.9]

7.10 float

ID: wmlscriptlib/lang/float/1
Class: C
Scope: "The client DOES support floating-point operations"
Text: When the Lang.float function is called, it returns true if floating point operations are supported. [WMLScript Standard Libraries Specification section 7.10]

ID: wmlscriptlib/lang/float/2
Class: C
Scope: "The client DOES NOT support floating-point operations"
Text: When the Lang.float function is called, it returns false if floating point operations are not supported. [WMLScript Standard Libraries Specification section 7.10]

7.11 exit

ID: wmlscriptlib/lang/exit/1
Class: B
Text: When the Lang.exit function is called with an object as a parameter, control is returned back to the caller of the WMLScript interpreter and the object is given as the return value. [WMLScript Standard Libraries Specification section 7.11]

7.12 abort

ID: wmlscriptlib/lang/abort/1
Class: B
Text: When the Lang.abort function is called with a string as the parameter, execution of the script is aborted and control is returned to the caller of the WMLScript interpreter with the return value being the value of the string parameter. [WMLScript Standard Libraries Specification section 7.12]

ID: wmlscriptlib/lang/abort/2
Class: B
Text: When the Lang.abort function is called with a non-string as a parameter, execution of the script is aborted and control is returned to the caller of the WMLScript Interpreter with the return value being 'invalid'. [WMLScript Standard Libraries Specification section 7.12]

ID: wmlscriptlib/lang/abort/3
Class: B
Text: When the Lang.abort function is called with an invalid parameter, execution of the script is aborted and control is returned to the caller with the return value being 'invalid'. [WMLScript Standard Libraries Specification section 7.12]
Note: New assertion for wmlssl June 2000

7.13 random

ID: wmlscriptlib/lang/random/1
Class: A
Text: When the Lang.random function is called with a value as the parameter, it returns an integer value that is greater than or equal to 0 but less than or equal to the value of the parameter. [WMLScript Standard Libraries Specification section 7.13]

ID: wmlscriptlib/lang/random/2
Class: A
Text: When the Lang.random function is called with a non-value as the parameter, it returns 'invalid'. [WMLScript Standard Libraries Specification section 7.13]

ID: wmlscriptlib/lang/random/3
Class: A
Text: When the Lang.random function is called with a value of zero, it returns zero. [WMLScript Standard Libraries Specification section 7.13]

ID: wmlscriptlib/lang/random/4
Class: A
Text: When the Lang.random function is called with a negative value, it returns 'invalid'. [WMLScript Standard Libraries Specification section 7.13]

ID: wmlscriptlib/lang/random/5
Class: C
Scope: "The client DOES support floating-point operations"
Text: When the Lang.random function is called with a floating point value as the parameter, it returns an integer value that is greater than or equal to 0 but less than or equal to the value of the parameter. [WMLScript Standard Libraries Specification section 7.13]
Note: New assertion for wmlssl June 2000.

7.14 seed

ID: wmlscriptlib/lang/seed/1
Class: A
Text: When the Lang.seed function is called with an integer as the parameter, it initializes the pseudo-random sequence using that integer and returns the empty string. [WMLScript Standard Libraries Specification section 7.14]

ID: wmlscriptlib/lang/seed/2
Class: C
Scope: "The client DOES support floating-point operations"
Text: When the Lang.seed function is called with a floating-point value as the parameter, it first converts the value to an integer and then initializes the pseudo-random sequence using that integer and returns the empty string. [WMLScript Standard Libraries Specification section 7.14]

ID: wmlscriptlib/lang/seed/3
Class: A
Text: When the Lang.seed function is called with a non-numeric value as the parameter, invalid must be returned. [WMLScript Standard Libraries Specification section 7.14]

ID: wmlscriptlib/lang/seed/4
Class: A
Text: When a seed value of greater than or equal to zero is used, a repeatable sequence of pseudo-random numbers must be produced [WMLScript Standard Libraries Specification section 7.14]

7.15 characterSet

ID: wmlscriptlib/lang/charset/1
Class: A
Text: When the Lang.characterSet function is called, it returns an IANA-assigned integer representing the character set supported by the WMLScript Interpreter. [WMLScript Standard Libraries Specification section 7.15]

8 Float

8.1 int

ID: wmlscriptlib/float/int/1
Class: C
Scope: "The client DOES support floating-point operations"
Text: When the Float.int function is called with a number, it returns the integer portion of that number. [WMLScript Standard Libraries Specification section 8.1]

ID: wmlscriptlib/float/int/2
Class: C
Scope: "The client DOES NOT support floating-point operations"
Text: When the Float.int function is called with a number, and floating-point operations are not supported, the function returns 'invalid'. [WMLScript Standard Libraries Specification section 8.1]

ID: wmlscriptlib/float/int/3
Class: C
Scope: "The client DOES support floating-point operations"
Text: When the Float.int function is called with a non-number, it returns 'invalid'. [WMLScript Standard Libraries Specification section 8.1]

ID: wmlscriptlib/float/int/4
Class: C
Scope: "The client DOES support floating-point operations"
Text: When the Float.int function is called with an integer, the result is that integer. [WMLScript Standard Libraries Specification section 8.1]

8.2 floor

ID: wmlscriptlib/float/floor/1
Class: C
Scope: "The client DOES support floating-point operations"
Text: When the Float.floor function is called with a number, it returns the greatest integer value that is not greater than the given number. [WMLScript Standard Libraries Specification section 8.2]

ID: wmlscriptlib/float/floor/2
Class: C
Scope: "The client DOES support floating-point operations"
Text: When the Float.floor function is called with a non-number, it returns 'invalid'. [WMLScript Standard Libraries Specification section 8.2]

ID: wmlscriptlib/float/floor/3
Class: C
Scope: "The client DOES NOT support floating-point operations"
Text: When the Float.floor function is called and floating-point operations are not supported, the function returns 'invalid'. [WMLScript Standard Libraries Specification section 8.2]

ID: wmlscriptlib/float/floor/4
Class: C
Scope: "The client DOES support floating-point operations"
Text: When the Float.floor function is called with an integer, it returns that integer. [WMLScript Standard Libraries Specification section 8.2]

8.3 ceil

ID: wmlscriptlib/float/ceil/1
Class: C
Scope: "The client DOES support floating-point operations"
Text: When the Float.ceil function is called with a number, it returns the smallest integer value that is not less than the given number. [WMLScript Standard Libraries Specification section 8.3]

ID: wmlscriptlib/float/ceil/2
Class: C
Scope: "The client DOES support floating-point operations"
Text: When the Float.ceil function is called with a non-number, it returns 'invalid'. [WMLScript Standard Libraries Specification section 8.3]

ID: wmlscriptlib/float/ceil/3
Class: C
Scope: "The client DOES NOT support floating-point operations"
Text: When the Float.ceil function is called and floating-point operations are not supported, the function returns 'invalid'. [WMLScript Standard Libraries Specification section 8.3]

ID: wmlscriptlib/float/ceil/4
Class: C
Scope: "The client DOES support floating-point operations"
Text: When the Float.ceil function is called with an integer, it returns that integer. [WMLScript Standard Libraries Specification section 8.3]

8.4 pow

ID: wmlscriptlib/float/pow/1
Class: C
Scope: "The client DOES support floating-point operations"
Text: When the Float.pow function is called with two numbers val1 and val2, it returns the floating point result of raising val1 to the val2 power. [WMLScript Standard Libraries Specification section 8.4]

ID: wmlscriptlib/float/pow/2
Class: C
Scope: "The client DOES support floating-point operations"
Text: When the Float.pow function is called with two numbers val1 and val2, and val1 = 0 and val2 is less than 0, then the function returns 'invalid'. [WMLScript Standard Libraries Specification section 8.4]

ID: wmlscriptlib/float/pow/3
Class: C
Scope: "The client DOES support floating-point operations"
Text: When the Float.pow function is called with two numbers val1 and val2, and val1 is less than 0 and val2 is not an integer, then the function returns 'invalid'. [WMLScript Standard Libraries Specification section 8.4]

ID: wmlscriptlib/float/pow/4
Class: C
Scope: "The client DOES support floating-point operations"
Text: When the Float.pow function is called with either parameter not a number, then the function returns 'invalid'. [WMLScript Standard Libraries Specification section 8.4]

ID: wmlscriptlib/float/pow/5
Class: C
Scope: "The client DOES NOT support floating-point operations"
Text: When the Float.pow function is called and floating-point operations are not supported, then the function returns 'invalid'. [WMLScript Standard Libraries Specification section 8.4]

8.5 round

ID: wmlscriptlib/float/round/1
Class: C
Scope: "The client DOES support floating-point operations"
Text: When the Float.round function is called with a number val1, it returns the number value that is closest to val1 and is equal to an integer. [WMLScript Standard Libraries Specification section 8.5]

ID: wmlscriptlib/float/round/2
Class: C
Scope: "The client DOES support floating-point operations"
Text: When the Float.round function is called with a number val1, and that number is equally close to two integer values, the function returns the larger number value. [WMLScript Standard Libraries Specification section 8.5]

ID: wmlscriptlib/float/round/3
Class: C
Scope: "The client DOES support floating-point operations"
Text: When the Float.round function is called with a number val1, and that number is already an integer, the function returns that number. [WMLScript Standard Libraries Specification section 8.5]

ID: wmlscriptlib/float/round/4
Class: C
Scope: "The client DOES support floating-point operations"
Text: When the Float.round function is called with a non-number val1, the function returns 'invalid'. [WMLScript Standard Libraries Specification section 8.5]

ID: wmlscriptlib/float/round/5
Class: C
Scope: "The client DOES NOT support floating-point operations"
Text: When the Float.round function is called and floating-point operations are not supported, the function returns 'invalid'. [WMLScript Standard Libraries Specification section 8.5]

8.6 sqrt

ID: wmlscriptlib/float/sqrt/1
Class: C
Scope: "The client DOES support floating-point operations"
Text: When the Float.sqrt function is called with a number val1, the function returns the square-root of val1. [WMLScript Standard Libraries Specification section 8.6]

ID: wmlscriptlib/float/sqrt/2
Class: C
Scope: "The client DOES support floating-point operations"
Text: When the Float.sqrt function is called with a number val1, and that number is less than zero, the function returns 'invalid'. [WMLScript Standard Libraries Specification section 8.6]

ID: wmlscriptlib/float/sqrt/3
Class: C
Scope: "The client DOES NOT support floating-point operations"
Text: When the Float.sqrt function is called and floating-point operations are not supported, the function returns 'invalid'. [WMLScript Standard Libraries Specification section 8.6]

8.7 maxFloat

ID: wmlscriptlib/float/maxfloat/1
Class: C
Scope: "The client DOES support floating-point operations"
Text: When the Float.maxFloat function is called, it returns the maximum floating point value supported (3.40282347E+38). [WMLScript Standard Libraries Specification section 8.7]

ID: wmlscriptlib/float/maxfloat/2
Class: C
Scope: "The client DOES NOT support floating-point operations"
Text: When the Float.maxFloat function is called and floating-point operations are not supported, the function returns 'invalid'. [WMLScript Standard Libraries Specification section 8.7]

8.8 minFloat

ID: wmlscriptlib/float/minfloat/1
Class: C
Scope: "The client DOES support floating-point operations"
Text: When the Float.minFloat function is called, it returns the smallest non-zero floating point value supported (1.17549435E-38 or smaller). [WMLScript Standard Libraries Specification section 8.8]

ID: wmlscriptlib/float/minfloat/2
Class: C
Scope: "The client DOES NOT support floating-point operations"
Text: When the Float.minFloat function is called and floating-point operations are not supported, the function returns 'invalid'. [WMLScript Standard Libraries Specification section 8.8]

9 String

9.1 length

ID: wmlscriptlib/string/length/1
Class: A
Text: When the String.length function is called with a string parameter String, it returns the length of that String in characters. [WMLScript Standard Libraries Specification section 9.1]

ID: wmlscriptlib/string/length/2
Class: A
Text: When the String.length function is called with a non-string parameter String, it returns 'invalid'. [WMLScript Standard Libraries Specification section 9.1]

9.2 isEmpty

ID: wmlscriptlib/string/isempty/1
Class: A
Text: When the String.isEmpty function is called with a string parameter String, it returns true if the string is of zero length, and false otherwise. [WMLScript Standard Libraries Specification section 9.2]

ID: wmlscriptlib/string/isempty/2
Class: A
Text: When the String.isEmpty function is called with a non-string parameter, it returns 'invalid'. [WMLScript Standard Libraries Specification section 9.2]

9.3 charAt

ID: wmlscriptlib/string/charat/1
Class: A
Text: When the String.charAt function is called with a string parameter String and a number parameter Index, it returns a string of length one reflecting the character at position Index within string String. [WMLScript Standard Libraries Specification section 9.3]

ID: wmlscriptlib/string/charat/2
Class: C
Scope: "The client DOES support floating-point operations"
Text: When the String.charAt function is called with a string parameter String and a number parameter Index, and the Index is a floating-point value, it is converted to an integer. Then the function returns a string of length one reflecting the character at position Index within string String. [WMLScript Standard Libraries Specification section 9.3]

ID: wmlscriptlib/string/charat/3
Class: A
Text: When the String.charAt function is called with a string parameter String and a number parameter Index, and the Index value is out of range, the function returns an empty string. [WMLScript Standard Libraries Specification section 9.3]

ID: wmlscriptlib/string/charat/4
Class: A
Text: When the String.charAt function is called with a non-string parameter String or a non-number parameter Index, the function returns 'invalid'. [WMLScript Standard Libraries Specification section 9.3]

9.4 subString

ID: wmlscriptlib/string/substring/1
Class: A
Text: When the String.subString function is called with parameters string String, number StartIndex, and number Length, the function returns a string reflecting the portion of String beginning at StartIndex and continuing for Length characters. [WMLScript Standard Libraries Specification section 9.4]

ID: wmlscriptlib/string/substring/2
Class: A
Text: When the String.subString function is called with parameters string String, number StartIndex, and number Length, and StartIndex is less than zero, the function returns a string reflecting the portion of String beginning at position zero and continuing for Length characters. [WMLScript Standard Libraries Specification section 9.4]

ID: wmlscriptlib/string/substring/3
Class: A
Text: When the String.subString function is called with parameters string String, number StartIndex, and number Length, and StartIndex is larger than the last index of String, the function returns the empty string. [WMLScript Standard Libraries Specification section 9.4]

ID: wmlscriptlib/string/substring/4
Class: A
Text: When the String.subString function is called with parameters string String, number StartIndex, and number Length, and Length is larger than the remaining number of characters in String, Length is replaced with the number of remaining characters. [WMLScript Standard Libraries Specification section 9.4]

ID: wmlscriptlib/string/substring/5
Class: A
Text: When the String.subString function is called with parameters string String, number StartIndex, and number Length, and Length less than or equal to zero, the function returns an empty string. [WMLScript Standard Libraries Specification section 9.4]

ID: wmlscriptlib/string/substring/6
Class: C
Scope: "The client DOES support floating-point operations"
Text: When the String.subString function is called with parameters string String, number StartIndex, and number Length, and either StartIndex or Length or of type floating-point, they are converted to integers. Then the function returns a string starting at the StartIndex-th position of String and continuing for Length characters. [WMLScript Standard Libraries Specification section 9.4]

ID: wmlscriptlib/string/substring/7
Class: A
Text: When the String.subString function is called with parameters non-string String, non-number StartIndex, or non-number Length, the function returns 'invalid'. [WMLScript Standard Libraries Specification section 9.4]

9.5 find

ID: wmlscriptlib/string/find/1
Class: A
Text: When the String.find function is called with parameters string String and string SubString, it returns an integer reflecting the index of the first character in String that identically matches the case and encoding of the requested SubString. [WMLScript Standard Libraries Specification section 9.5]

ID: wmlscriptlib/string/find/2
Class: A
Text: When the String.find function is called with parameters string String and string SubString, and the SubString does not occur within String, the function returns -1. [WMLScript Standard Libraries Specification section 9.5]

ID: wmlscriptlib/string/find/3
Class: A
Text: When the String.find function is called with parameters string String and string SubString, and the SubString is an empty string, the function returns 'invalid'. [WMLScript Standard Libraries Specification section 9.5]
Note: New assertion for wmlssl June 2000

9.6 replace

ID: wmlscriptlib/string/replace/1
Class: A
Text: When the String.replace function is called with parameters string String, string OldSubString, and string NewSubString, it returns an updated version of String in which all substrings that identically match the case and encoding of OldSubString are replaced with NewSubString. [WMLScript Standard Libraries Specification section 9.6]

ID: wmlscriptlib/string/replace/2
Class: A
Text: When the String.replace function is called with parameters string String, string OldSubString, and string NewSubString, and OldSubString is an empty string. The String.replace function returns invalid. [WMLScript Standard Libraries Specification section 9.6]
Note: New assertion for wmlssl June 2000

9.7 elements

ID: wmlscriptlib/string/elements/1
Class: A
Text: When the String.elements function is called with parameters string String and string Separator, it returns an Integer reflecting the number of elements in String that are separated by the first character of the string Separator. [WMLScript Standard Libraries Specification section 9.7]

ID: wmlscriptlib/string/elements/2
Class: A
Text: When the String.elements function is called with parameters string String, and string Separator, and Separator is an empty string, the function returns 'invalid'. [WMLScript Standard Libraries Specification section 9.7]

ID: wmlscriptlib/string/elements/3
Class: A
Text: When the String.elements function is called with parameters string String and string Separator, where String is an empty string, it returns 1 (because an empty string is still a valid element). [WMLScript Standard Libraries Specification section 9.7]

9.8 elementAt

ID: wmlscriptlib/string/elementat/1
Class: A
Text: When the String.elementAt function is called with parameters string String, number Index, and string Separator, it returns a string reflecting Index-th element of String, where elements are separated by the first character of Separator. [WMLScript Standard Libraries Specification section 9.8]

ID: wmlscriptlib/string/elementat/2
Class: A
Text: When the String.elementAt function is called with parameters string String, number Index, and string Separator, and Index is less than zero, it returns a string reflecting the first element of String, where the elements is separated by the first character of Separator. [WMLScript Standard Libraries Specification section 9.8]

ID: wmlscriptlib/string/elementat/3
Class: A
Text: When the String.elementAt function is called with parameters string String, number Index, and string Separator, and Index is larger than the number of elements in String, it returns a string reflecting the last element of String, where element is separated by the first character of Separator. [WMLScript Standard Libraries Specification section 9.8]

ID: wmlscriptlib/string/elementat/4
Class: A
Text: When the String.elementAt function is called with parameters string String, number Index, and string Separator, and String is an empty string, then an empty string is returned. [WMLScript Standard Libraries Specification section 9.8]

ID: wmlscriptlib/string/elementat/5
Class: A
Text: When the String.elementAt function is called with parameters string String, number Index, and string Separator, and Separator is an empty string, then the function returns 'invalid'. [WMLScript Standard Libraries Specification section 9.8]

ID: wmlscriptlib/string/elementat/6
Class: C
Scope: "The client DOES support floating-point operations"
Text: When the String.elementAt function is called with parameters string String, number Index, and string Separator, and Index is of type floating-point, then it is first converted to a type integer. Then the function returns a string reflecting the Index-th element of String, where elements are separated by the first character of Separator. [WMLScript Standard Libraries Specification section 9.8]

9.9 removeAt

ID: wmlscriptlib/string/removeat/1
Class: A
Text: When the String.removeAt function is called with parameters string String, number Index, and string Separator, it returns a string where the Index-th element and separator have been removed, where elements are separated by the first character of Separator. [WMLScript Standard Libraries Specification section 9.9]

ID: wmlscriptlib/string/removeat/2
Class: A
Text: When the String.removeAt function is called with parameters string String, number Index, and string Separator, and Index is less than 0, it returns a string where the first element and separator have been removed, where elements are separated by the first character of Separator. [WMLScript Standard Libraries Specification section 9.9]

ID: wmlscriptlib/string/removeat/3
Class: A
Text: When the String.removeAt function is called with parameters string String, number Index, and string Separator, and Index is larger than the number of elements, it returns a string where the last element and separator have been removed, where elements are separated by the first character of Separator. [WMLScript Standard Libraries Specification section 9.9]

ID: wmlscriptlib/string/removeat/4
Class: A
Text: When the String.removeAt function is called with parameters string String, number Index, and string Separator, and String is empty, the function returns an empty string. [WMLScript Standard Libraries Specification section 9.9]

ID: wmlscriptlib/string/removeat/5
Class: A
Text: When the String.removeAt function is called with parameters string String, number Index, and string Separator, and Separator is an empty string, then the function returns 'invalid'. [WMLScript Standard Libraries Specification section 9.9]

ID: wmlscriptlib/string/removeat/6
Class: C
Scope: "The client DOES support floating-point operations"
Text: When the String.removeAt function is called with parameters string String, number Index, and string Separator, and Index is of type floating-point, then it is first converted to a type integer. Then the function returns a string reflecting the removal of the Index-th element of String, where elements are separated by the first character of Separator. [WMLScript Standard Libraries Specification section 9.9]

9.10 replaceAt

ID: wmlscriptlib/string/replaceat/1
Class: A
Text: When the String.replaceAt function is called with parameters string String, string Element, number Index, and string Separator, it returns a string where the Index-th element is replaced with the contents of Element (where elements are separated by the first character of Separator). [WMLScript Standard Libraries Specification section 9.10]

ID: wmlscriptlib/string/replaceat/2
Class: A
Text: When the String.replaceAt function is called with parameters string String, string Element, number Index, and string Separator, and Index is less than zero, it returns a string where the first element is replaced with the contents of Element (where elements are separated by the first character of Separator). [WMLScript Standard Libraries Specification section 9.10]

ID: wmlscriptlib/string/replaceat/3
Class: A
Text: When the String.replaceAt function is called with parameters string String, string Element, number Index, and string Separator, and Index is larger than the number of elements, it returns a string where the last element is replaced with the contents of Element (where elements are separated by the first character of Separator). [WMLScript Standard Libraries Specification section 9.10]

ID: wmlscriptlib/string/replaceat/4
Class: A
Text: When the String.replaceAt function is called with parameters string String, string Element, number Index, and string Separator, and String is empty the function returns a new string with the given Element [WMLScript Standard Libraries Specification section 9.10]

ID: wmlscriptlib/string/replaceat/5
Class: C
Scope: "The client DOES support floating-point operations"
Text: When the String.replaceAt function is called with parameters string String, string Element, number Index, and string Separator, and Index is of type floating-point, Index is first converted to an integer. Then the function returns a string in which the Index-th element is replaced with the contents of Element. [WMLScript Standard Libraries Specification section 9.10]

ID: wmlscriptlib/string/replaceat/6
Class: A
Text: When the String.replaceAt function is called with parameters string String, string Element, number Index, and string Separator, and Separator is an empty string, the function returns 'invalid'. [WMLScript Standard Libraries Specification section 9.10]

9.11 insertAt

ID: wmlscriptlib/string/insertat/1
Class: A
Text: When the String.insertAt function is called with parameters string String, string Element, number Index, and string Separator, it returns a string where the string Element and a Separator are inserted at the Index-th element (where elements are separated by the first character of Separator). [WMLScript Standard Libraries Specification section 9.11]

ID: wmlscriptlib/string/insertat/2
Class: A
Text: When the String.insertAt function is called with parameters string String, string Element, number Index, and string Separator, and Index is less than zero, it returns a string where the Element and a Separator are inserted prior to the first element (where elements are separated by the first character of Separator). [WMLScript Standard Libraries Specification section 9.11]

ID: wmlscriptlib/string/insertat/3
Class: A
Text: When the String.insertAt function is called with parameters string String, string Element, number Index, and string Separator, and Index is larger than the number of elements, it returns a string where Element and a Separator are appended at the end of the String (where elements are separated by the first character of Separator). [WMLScript Standard Libraries Specification section 9.11]

ID: wmlscriptlib/string/insertat/4
Class: A
Text: When the String.insertAt function is called with parameters string String, string Element, number Index, and string Separator, and String is empty the function returns a string containing only Element. [WMLScript Standard Libraries Specification section 9.11]

ID: wmlscriptlib/string/insertat/5
Class: C
Scope: "The client DOES support floating-point operations"
Text: When the String.insertAt function is called with parameters string String, string Element, number Index, and string Separator, and Index is of type floating-point, Index is first converted to an integer. Then the function returns a string in which Element and a Separator are inserted at the Index-th element of String. [WMLScript Standard Libraries Specification section 9.11]

ID: wmlscriptlib/string/insertat/6
Class: A
Text: When the String.insertAt function is called with parameters string String, string Element, number Index, and string Separator, and Separator is an empty string, the function returns 'invalid'. [WMLScript Standard Libraries Specification section 9.11]

9.12 squeeze

ID: wmlscriptlib/string/squeeze/1
Class: A
Text: When the String.squeeze function is called with parameter string String, it returns a string where all consecutive series of white space characters are reduced to a single white space character. [WMLScript Standard Libraries Specification section 9.12]

ID: wmlscriptlib/string/squeeze/2
Class: A
Text: When the String.squeeze function is called with a parameter 'invalid', it returns 'invalid'. [WMLScript Standard Libraries Specification section 9.12]

9.13 trim

ID: wmlscriptlib/string/trim/1
Class: A
Text: When the String.trim function is called with parameter string String, it returns a string where all trailing and leading white space characters have been removed. [WMLScript Standard Libraries Specification section 9.13]

ID: wmlscriptlib/string/trim/2
Class: A
Text: When the String.trim function is called with a parameter 'invalid', it returns 'invalid'. [WMLScript Standard Libraries Specification section 9.13]

9.14 compare

ID: wmlscriptlib/string/compare/1
Class: A
Text: When the String.compare function is called with parameters string String1 and string String2, and String1 is lexicographically equal to String2, the function returns 0. [WMLScript Standard Libraries Specification section 9.14]

ID: wmlscriptlib/string/compare/2
Class: A
Text: When the String.compare function is called with parameters string String1 and string String2, and String1 is lexicographically less than String2, the function returns -1. [WMLScript Standard Libraries Specification section 9.14]

ID: wmlscriptlib/string/compare/3
Class: A
Text: When the String.compare function is called with parameters string String1 and string String2, and String1 is lexicographically greater than String2, the function returns 1. [WMLScript Standard Libraries Specification section 9.14]

ID: wmlscriptlib/string/compare/4
Class: A
Text: When the String.compare function is called with an invalid parameter, it returns 'invalid' [WMLScript Standard Libraries Specification section 9.14]
Note: New assertion for wmlssl June 2000

9.15 toString

ID: wmlscriptlib/string/tostring/1
Class: A
Text: When the String.toString function is called with a parameter Value, the function returns a string representing Value as defined in the WMLScript specification for type conversion. [WMLScript Standard Libraries Specification section 9.15]

ID: wmlscriptlib/string/tostring/2
Class: A
Text: When the String.toString function is called with an 'invalid' Value, the function returns the string "invalid". [WMLScript Standard Libraries Specification section 9.15]

9.16 format

The String.format tests have been substantially revised for WAP version 1.2.
The tests have been divided into four sections:

ID: wmlscriptlib/string/format/1
Class: A
Text: When the String.format function is called with parameters string Format and Any Value, and Format contains more than one format specifier, subsequent specifiers are replaced with the empty string in the string the function returns. [WMLScript Standard Libraries Specification section 9.16]

ID: wmlscriptlib/string/format/2
Class: A
Text: When the String.format function is called with parameters string Format and Any Value, and Format contains two percent signs (%) in sequence, the function returns a string in which those signs are converted into a single percent sign. [WMLScript Standard Libraries Specification section 9.16]

ID: wmlscriptlib/string/format/3
Class: A
Text: When the String.format function is called with parameters string Format and Any Value, and Format contains an invalid format specifier, the function returns 'invalid'. [WMLScript Standard Libraries Specification section 9.16]

ID: wmlscriptlib/string/format/4
Class: C
Scope: "The client DOES NOT support floating-point operations"
Text: When the String.format function is called with parameters string "Format", a floating point "Value" and the "Format" contains a format specifier of the form "%f", the function returns 'invalid'. [WMLScript Standard Libraries Specification section 9.16]

9.16.1 format/integer

ID: wmlscriptlib/string/format/d/1
Class: A
Text: When the String.format function is called with parameters string "Format", a decimal integer "Value" and the "Format" contains a format specifier of the form "%d", the function replaces the "%d" with a representation of the value of the integer using the form [-]d (where d represents 1 or more decimal digits) in the string it returns. [WMLScript Standard Libraries Specification section 9.16]

ID: wmlscriptlib/string/format/d/2
Class: A
Text: When the String.format function is called with parameters string "Format", a decimal integer "Value" and the "Format" contains a format specifier of the form "%wd" and the number of digits in "Value" is less than the specified width "w", the function replaces the "%wd" with a representation of the value of the integer using the form [-]d (where d represents 1 or more decimal digits) with blanks added to the left until the minimum width is reached in the string it returns. [WMLScript Standard Libraries Specification section 9.16]

ID: wmlscriptlib/string/format/d/3
Class: A
Text: When the String.format function is called with parameters string "Format", a decimal integer "Value" and the "Format" contains a format specifier of the form "%wd" and the number of digits in "Value" is greater than or equal to the specified width "w", the function replaces the "%wd" with a representation of the value of the integer using the form [-]d (where d represents 1 or more decimal digits) in the string it returns. [WMLScript Standard Libraries Specification section 9.16]

ID: wmlscriptlib/string/format/d/4
Class: A
Text: When the String.format function is called with parameters string "Format", a decimal integer "Value" and the "Format" contains a format specifier of the form "%wd" and "w" is a negative decimal integer, the function returns 'invalid'. [WMLScript Standard Libraries Specification section 9.16]

ID: wmlscriptlib/string/format/d/5
Class: A
Text: When the String.format function is called with parameters string "Format", a decimal integer "Value" and the "Format" contains a format specifier of the form "%w.pd" and the number of digits in "Value" is less than the specified precision "p", the function replaces the "%w.pd" with a representation of the value of the integer using the form [-]d (where d represents 1 or more decimal digits) with zeros added to the left until the minimum precision is reached in the string it returns. [WMLScript Standard Libraries Specification section 9.16]

ID: wmlscriptlib/string/format/d/6
Class: A
Text: When the String.format function is called with parameters string "Format", a decimal integer "Value" and the "Format" contains a format specifier of the form "%w.pd" and the number of digits in "Value" is greater than or equal to the specified precision "p", the function replaces the "%w.pd" with a representation of the value of the integer using the form [-]d (where d represents 1 or more decimal digits) in the string it returns. [WMLScript Standard Libraries Specification section 9.16]

ID: wmlscriptlib/string/format/d/7
Class: A
Text: When the String.format function is called with parameters string "Format", a decimal integer "Value" and the "Format" contains a format specifier of the form "%w.pd" and "p" is a negative decimal integer, the function returns 'invalid'. [WMLScript Standard Libraries Specification section 9.16]

ID: wmlscriptlib/string/format/d/8
Class: A
Text: When the String.format function is called with parameters string Format and Any Value, and Format contains a format specification of the pattern "%.0d" and the value of Value is zero, the function replaces the "%.0d" with an empty string in the string it returns. [WMLScript Standard Libraries Specification section 9.16]

ID: wmlscriptlib/string/format/d/9
Class: A
Text: When the String.format function is called with parameters string "Format", a string "Value" and the "Format" contains a format specifier of the form "%d", the function replaces the "%d" with a representation of the value of the string converted to an integer using the form [-]d (where d represents 1 or more decimal digits) in the string it returns. [WMLScript Standard Libraries Specification section 9.16]

ID: wmlscriptlib/string/format/d/10
Class: C
Scope: "The client DOES support floating-point operations"
Text: When the String.format function is called with parameters string "Format", a floating point "Value" and the "Format" contains a format specifier of the form "%d", the function replaces the "%d" with a representation of the value of the floating point converted to an integer using the form [-]d (where d represents 1 or more decimal digits) in the string it returns. [WMLScript Standard Libraries Specification section 9.16]

9.16.2 format/float

ID: wmlscriptlib/string/format/f/1
Class: C
Scope: "The client DOES support floating-point operations"
Text: When the String.format function is called with parameters string "Format", a floating point "Value" and the "Format" contains a format specifier of the form "%f", the function replaces the "%f" with a representation of the value of the floating point using the form [-]d.nnnnnn (where nnnnnn represents the default of six digits after the decimal point in the string it returns). [WMLScript Standard Libraries Specification section 9.16]
Note: Tests that; 1 evaluates to 1.000000, -1 evaluates to -1.000000, 1.1 evaluates to 1.100000 and -1 evaluates tp -1.100000

ID: wmlscriptlib/string/format/f/2
Class: C
Scope: "The client DOES support floating-point operations"
Text: When the String.format function is called with parameters string "Format", a floating point "Value" and the "Format" contains a format specifier of the form "%wf" and the number of digits in "Value" is less than the specified width "w", the function replaces the "%wf" with a representation of the value of the floating point using the form [-]d.d (where d represents 1 or more decimal digits) with blanks added to the left until the minimum width is reached in the string it returns. [WMLScript Standard Libraries Specification section 9.16]

ID: wmlscriptlib/string/format/f/3
Class: C
Scope: "The client DOES support floating-point operations"
Text: When the String.format function is called with parameters string "Format", a floating point "Value" and the "Format" contains a format specifier of the form "%wf" and the number of digits in "Value" is greater than or equal to the specified width "w", the function replaces the "%wf" with a representation of the value of the floating point using the form [-]d.d (where d represents 1 or more decimal digits) in the string it returns. [WMLScript Standard Libraries Specification section 9.16]
Note: using %2f and the value 1.0, the test checks that 1.000000 is returned

ID: wmlscriptlib/string/format/f/4
Class: C
Scope: "The client DOES support floating-point operations"
Text: When the String.format function is called with parameters string "Format", a floating point "Value" and the "Format" contains a format specifier of the form "%wf" and "w" is a negative decimal integer, the function return 'invalid'. [WMLScript Standard Libraries Specification section 9.16]

ID: wmlscriptlib/string/format/f/5
Class: C
Scope: "The client DOES support floating-point operations"
Text: When the String.format function is called with parameters string "Format", a floating point "Value" and the "Format" contains a format specifier of the form "%w.pf" and the number of digits after the decimal point in "Value" is less than the specified precision "p", the function replaces the "%w.pf" with a representation of the value of the floating point using the form [-]d.d (where d represents 1 or more decimal digits) with zeros padding until the minimum precision is reached in the string it returns. [WMLScript Standard Libraries Specification section 9.16]

ID: wmlscriptlib/string/format/f/6
Class: C
Scope: "The client DOES support floating-point operations"
Text: When the String.format function is called with parameters string "Format", a floating point "Value" and the "Format" contains a format specifier of the form "%w.pf" and the number of digits after the decimal point in "Value" is greater than or equal to the specified precision "p", the function replaces the "%w.pf" with a representation of the value of the floating point using the form [-]d.d (where d represents 1 or more decimal digits) where the digits following the decimal point are rounded to the number of digits specified by precison "p" in the string it returns. [WMLScript Standard Libraries Specification section 9.16]

ID: wmlscriptlib/string/format/f/7
Class: C
Scope: "The client DOES support floating-point operations"
Text: When the String.format function is called with parameters string "Format", a floating point "Value" which has no digits preceeding the decimal point and the "Format" contains a format specifier of the form "%f", the function replaces the "%f" with a representation of the value of the floating point using the form [-]d.d (where d represents 1 or more decimal digits) where one digit appears before the decimal point in the string it returns. [WMLScript Standard Libraries Specification section 9.16]

ID: wmlscriptlib/string/format/f/8
Class: C
Scope: "The client DOES support floating-point operations"
Text: When the String.format function is called with parameters string Format, a floating point Value, and Format contains a format specification of the pattern "%.0f", the function replaces the "%.0f" with a representation of Value rounded to the nearest integer with no trailing decimal point in the string it returns. [WMLScript Standard Libraries Specification section 9.16]

ID: wmlscriptlib/string/format/f/9
Class: C
Scope: "The client DOES support floating-point operations"
Text: When the String.format function is called with parameters string Format, a floating point Value, and Format contains a format specification of the pattern "%.f", the function replaces the "%.f" with a representation of Value rounded to the nearest integer with no trailing decimal point in the string it returns. [WMLScript Standard Libraries Specification section 9.16]

ID: wmlscriptlib/string/format/f/10
Class: C
Scope: "The client DOES support floating-point operations"
Text: When the String.format function is called with parameters string "Format", a string "Value" and the "Format" contains a format specifier of the form "%f", the function replaces the "%f" with a representation of the value of the string converted to a floating point using the form [-]d.d (where d represents 1 or more decimal digits) in the string it returns. [WMLScript Standard Libraries Specification section 9.16]
Note: use -10.123 which should convert to -10.123000 when considering rounding (32 bit precision) and the default of 6 digits after the decimal point.

9.16.3 format/string

ID: wmlscriptlib/string/format/s/1
Class: A
Text: When the String.format function is called with parameters string "Format", a string "Value" and the "Format" contains a format specifier of the form "%s", the function replaces the "%s" with a representation of the string "Value" in the string it returns. [WMLScript Standard Libraries Specification section 9.16]

ID: wmlscriptlib/string/format/s/2
Class: A
Text: When the String.format function is called with parameters string "Format", a string "Value" and the "Format" contains a format specifier of the form "%ws" and the number of characters in the string "Value" is less than the specified width "w", the function replaces the "%ws" with a representation of the string "Value" with blanks added to the left until the minimum width is reached in the string it returns. [WMLScript Standard Libraries Specification section 9.16]
Note: using %9s and the value "string", the test checks "<space><space><space>string" is returned.

ID: wmlscriptlib/string/format/s/3
Class: A
Text: When the String.format function is called with parameters string "Format", a string "Value" and the "Format" contains a format specifier of the form "%ws" and the number of characters in "Value" is greater than or equal to the specified width "w", the function replaces the "%ws" with a representation of the string "Value" in the string it returns. [WMLScript Standard Libraries Specification section 9.16]

ID: wmlscriptlib/string/format/s/4
Class: A
Text: When the String.format function is called with parameters string "Format", a string "Value" and the "Format" contains a format specifier of the form "%ws" and "w" is a negative decimal integer, the function returns 'invalid'. [WMLScript Standard Libraries Specification section 9.16]

ID: wmlscriptlib/string/format/s/5
Class: A
Text: When the String.format function is called with parameters string "Format", a string "Value" and the "Format" contains a format specifier of the form "%w.ps", the function replaces the "%w.ps" with a representation of the string "Value" using the characters up to the end of the string "Value" or until the precision value is reached in the string it returns. [WMLScript Standard Libraries Specification section 9.16]

ID: wmlscriptlib/string/format/s/6
Class: A
Text: When the String.format function is called with parameters string "Format", a string "Value" and the "Format" contains a format specifier of the form "%w.ps" and w is larger than p, the function replaces the "%w.ps" with a representation of the string "Value" ignoring the value of w in the string it returns. [WMLScript Standard Libraries Specification section 9.16]
Note: using %9.8s and %9.3s, the test checks that string is formatted as "<space><space>string" and "str" respectively.

ID: wmlscriptlib/string/format/s/7
Class: A
Text: When the String.format function is called with parameters string "Format", a string "Value" and the "Format" contains a format specifier of the form "%w.ps" and "p" is a negative decimal integer, the function returns 'invalid'. [WMLScript Standard Libraries Specification section 9.16]

ID: wmlscriptlib/string/format/s/8
Class: A
Text: When the String.format function is called with parameters string Format and Any Value, and Format contains a percent sign (%) followed by a period (.) and a non-negative decimal precision p followed by an "s", the function interprets Value as a string value and replaces the "%.ps" with up to p characters from Value in the string it returns. [WMLScript Standard Libraries Specification section 9.16]

ID: wmlscriptlib/string/format/s/9
Class: A
Text: When the String.format function is called with parameters string "Format", an integer "Value" and the "Format" contains a format specifier of the form "%s", the function replaces the "%s" with a representation of the integer converted to a string "Value" in the string it returns. [WMLScript Standard Libraries Specification section 9.16]

ID: wmlscriptlib/string/format/s/10
Class: C
Scope: "The client DOES support floating-point operations"
Text: When the String.format function is called with parameters string "Format", a floating point "Value" and the "Format" contains a format specifier of the form "%s", the function replaces the "%s" with a representation of the floating point converted to a string "Value" in the string it returns. [WMLScript Standard Libraries Specification section 9.16]

10 URL

10.1 isValid

ID: wmlscriptlib/url/isvalid/1
Class: A
Text: When the URL.isValid function is called with a parameter string URL that contains an absolute URL, it returns 'true' if the URL is well formed. [WMLScript Standard Libraries Specification section 10.1]

ID: wmlscriptlib/url/isvalid/2
Class: A
Text: When the URL.isValid function is called with a parameter string URL that contains a relative URL, it returns 'true' if the URL is well formed. [WMLScript Standard Libraries Specification section 10.1]

ID: wmlscriptlib/url/isvalid/3
Class: A
Text: When the URL.isValid function is called with a parameter string URL that does not contain a well formed absolute or relative URL, it returns 'false'. [WMLScript Standard Libraries Specification section 10.1]

ID: wmlscriptlib/url/isvalid/4
Class: A
Text: When the URL.isValid function is called with a non-string parameter, the function returns 'invalid'. [WMLScript Standard Libraries Specification section 10.1]

10.2 getScheme

ID: wmlscriptlib/url/getscheme/1
Class: A
Text: When the URL.getScheme function is called with a parameter string URL that contains an absolute URL, it returns a string containing the scheme portion of the URL. [WMLScript Standard Libraries Specification section 10.2]

ID: wmlscriptlib/url/getscheme/2
Class: A
Text: When the URL.getScheme function is called with a parameter string URL that contains a relative URL, it returns a string containing the scheme portion of the relative URL. [WMLScript Standard Libraries Specification section 10.2]

ID: wmlscriptlib/url/getscheme/3
Class: A
Text: When the URL.getScheme function is called with a non-string parameter, the function returns 'invalid'. [WMLScript Standard Libraries Specification section 10.2]

ID: wmlscriptlib/url/getscheme/4
Class: A
Text: When the URL.getScheme function is called with a parameter string URL that contains invalid URL syntax, the function returns 'invalid'. [WMLScript Standard Libraries Specification section 10.2]

10.3 getHost

ID: wmlscriptlib/url/gethost/1
Class: A
Text: When the URL.getHost function is called with a parameter string URL that contains an absolute URL, it returns a string containing the hostname portion of the URL. [WMLScript Standard Libraries Specification section 10.3]

ID: wmlscriptlib/url/gethost/2
Class: A
Text: When the URL.getHost function is called with a parameter string URL that contains a relative URL, it returns a string containing the hostname portion of the relative URL. [WMLScript Standard Libraries Specification section 10.3]

ID: wmlscriptlib/url/gethost/3
Class: A
Text: When the URL.getHost function is called with a non-string parameter, the function returns 'invalid'. [WMLScript Standard Libraries Specification section 10.3]

ID: wmlscriptlib/url/gethost/4
Class: A
Text: When the URL.getHost function is called with a parameter string URL that contains invalid URL syntax, the function returns 'invalid'. [WMLScript Standard Libraries Specification section 10.3]

10.4 getPort

ID: wmlscriptlib/url/getport/1
Class: A
Text: When the URL.getPort function is called with a parameter string URL that contains an absolute URL, it returns a string containing the port-number portion of the URL. [WMLScript Standard Libraries Specification section 10.4]

ID: wmlscriptlib/url/getport/2
Class: A
Text: When the URL.getPort function is called with a parameter string URL that contains a relative URL, it returns a string containing the port-number portion of the relative URL. [WMLScript Standard Libraries Specification section 10.4]

ID: wmlscriptlib/url/getport/3
Class: A
Text: When the URL.getPort function is called with a non-string parameter, the function returns 'invalid'. [WMLScript Standard Libraries Specification section 10.4]

ID: wmlscriptlib/url/getport/4
Class: A
Text: When the URL.getPort function is called with a parameter string URL, and that string does not contain a port number, the function returns the empty string. [WMLScript Standard Libraries Specification section 10.4]

ID: wmlscriptlib/url/getport/5
Class: A
Text: When the URL.getPort function is called with a parameter string URL that contains invalid URL syntax, the function returns 'invalid'. [WMLScript Standard Libraries Specification section 10.4]

10.5 getPath

ID: wmlscriptlib/url/getpath/1
Class: A
Text: When the URL.getPath function is called with a parameter string URL that contains an absolute URL, it returns a string containing the pathname portion of the URL. [WMLScript Standard Libraries Specification section 10.5]

ID: wmlscriptlib/url/getpath/2
Class: A
Text: When the URL.getPath function is called with a parameter string URL that contains a relative URL, it returns a string containing the pathname portion of the relative URL. [WMLScript Standard Libraries Specification section 10.5]

ID: wmlscriptlib/url/getpath/3
Class: A
Text: When the URL.getPath function is called with a non-string parameter, the function returns 'invalid'. [WMLScript Standard Libraries Specification section 10.5]

ID: wmlscriptlib/url/getpath/4
Class: A
Text: When the URL.getPath function is called with a parameter string URL that contains invalid URL syntax, the function returns 'invalid'. [WMLScript Standard Libraries Specification section 10.5]

10.6 getParameters

ID: wmlscriptlib/url/getparameters/1
Class: A
Text: When the URL.getParameters function is called with a parameter string URL that contains an absolute URL, it returns a string containing the parameter portion of the URL. [WMLScript Standard Libraries Specification section 10.6]

ID: wmlscriptlib/url/getparameters/2
Class: A
Text: When the URL.getParameters function is called with a parameter string URL that contains a relative URL, it returns a string containing the parameter portion of the relative URL. [WMLScript Standard Libraries Specification section 10.6]

ID: wmlscriptlib/url/getparameters/3
Class: A
Text: When the URL.getParameters function is called with a non-string parameter, the function returns 'invalid'. [WMLScript Standard Libraries Specification section 10.6]

ID: wmlscriptlib/url/getparameters/4
Class: A
Text: When the URL.getParameters function is called with a parameter string URL that contains invalid URL syntax, the function returns 'invalid'. [WMLScript Standard Libraries Specification section 10.6]

ID: wmlscriptlib/url/getparameters/5
Class: A
Text: When the URL.getParameters function is called with a parameter string URL that contains an absolute URL that has no parameter portion, the function returns an empty string. [WMLScript Standard Libraries Specification section 10.6]

ID: wmlscriptlib/url/getparameters/6
Class: A
Text: When the URL.getParameters function is called with a parameter string URL that contains a relative URL that contains no parameter portion, the function returns an empty string. [WMLScript Standard Libraries Specification section 10.6]

10.7 getQuery

ID: wmlscriptlib/url/getquery/1
Class: A
Text: When the URL.getQuery function is called with a parameter string URL that contains an absolute URL, it returns a string containing the query portion of the URL. [WMLScript Standard Libraries Specification section 10.7]

ID: wmlscriptlib/url/getquery/2
Class: A
Text: When the URL.getQuery function is called with a parameter string URL that contains a relative URL, it returns a string containing the query portion of the relative URL. [WMLScript Standard Libraries Specification section 10.7]

ID: wmlscriptlib/url/getquery/3
Class: A
Text: When the URL.getQuery function is called with a non-string parameter, the function returns 'invalid'. [WMLScript Standard Libraries Specification section 10.7]

ID: wmlscriptlib/url/getquery/4
Class: A
Text: When the URL.getQuery function is called with a parameter string URL that contains invalid URL syntax, the function returns 'invalid'. [WMLScript Standard Libraries Specification section 10.7]

ID: wmlscriptlib/url/getquery/5
Class: A
Text: When the URL.getQuery function is called with a parameter string URL that contains an absolute URL that has no query portion, the function returns an empty string. [WMLScript Standard Libraries Specification section 10.7]

ID: wmlscriptlib/url/getquery/6
Class: A
Text: When the URL.getQuery function is called with a parameter string URL that contains a relative URL that does not contain a query portion, the function returns the enpty string. [WMLScript Standard Libraries Specification section 10.7]

10.8 getFragment

ID: wmlscriptlib/url/getfragment/1
Class: A
Text: When the URL.getFragment function is called with a parameter string URL that contains an absolute URL, it returns a string containing the fragment portion of the URL. [WMLScript Standard Libraries Specification section 10.8]

ID: wmlscriptlib/url/getfragment/2
Class: A
Text: When the URL.getFragment function is called with a parameter string URL that contains a relative URL, it returns a string containing the fragment portion of the relative URL. [WMLScript Standard Libraries Specification section 10.8]

ID: wmlscriptlib/url/getfragment/3
Class: A
Text: When the URL.getFragment function is called with a non-string parameter, the function returns 'invalid'. [WMLScript Standard Libraries Specification section 10.8]

ID: wmlscriptlib/url/getfragment/4
Class: A
Text: When the URL.getFragment function is called with a parameter string URL that contains invalid URL syntax, the function returns 'invalid'. [WMLScript Standard Libraries Specification section 10.8]

ID: wmlscriptlib/url/getfragment/5
Class: A
Text: When the URL.getFragment function is called with a parameter string URL that contains an absolute URL that does not have a fragment portion, the function returns an empty string. [WMLScript Standard Libraries Specification section 10.8]

ID: wmlscriptlib/url/getfragment/6
Class: A
Text: When the URL.getFragment function is called with a parameter string URL that contains a relative URL that does not have a fragment portion, the function returns an empty string. [WMLScript Standard Libraries Specification section 10.8]

10.9 getBase

ID: wmlscriptlib/url/getbase/1
Class: A
Text: When the URL.getBase function is called, it returns a string reflecting the absolute URL (without the fragment) of the current Script file. [WMLScript Standard Libraries Specification section 10.9]

10.10 getReferer

ID: wmlscriptlib/url/getreferer/1
Class: A
Text: When the URL.getReferer function is called, it returns a string reflecting the smallest relative URL (relative to the base URL of the current compilation unit) to the resource that called the current compilation unit. [WMLScript Standard Libraries Specification section 10.10]

ID: wmlscriptlib/url/getreferer/2
Class: A
Text: When a compilation unit calls another local function, and that function calls the URL.getReferer function, the result of url.getReferer will be same as that of calling it from the parent function. [WMLScript Standard Libraries Specification section 10.10]

ID: wmlscriptlib/url/getreferer/3
Class: B
Text: When the URL.getReferer function is called, and the current compilation unit does not have a referer, the function returns the empty string. [WMLScript Standard Libraries Specification section 11.10]

10.11 resolve

ID: wmlscriptlib/url/resolve/1
Class: A
Text: When the URL.resolve function is called with parameters string BaseURL and string EmbeddedURL, where BaseURL is an absolute URL, the function returns an absolute URL derived from the combination of BaseURL and EmbeddedURL. [WMLScript Standard Libraries Specification section 10.11]

ID: wmlscriptlib/url/resolve/2
Class: A
Text: When the URL.resolve function is called with parameters string BaseURL and string EmbeddedURL, where EmbeddedURL is an absolute URL, the function returns EmbeddedURL. [WMLScript Standard Libraries Specification section 10.11]

ID: wmlscriptlib/url/resolve/3
Class: A
Text: When the URL.resolve function is called with parameters string BaseURL and string EmbeddedURL, where either parameter's values contain invalid URL syntax, the function returns 'invalid'. [WMLScript Standard Libraries Specification section 10.11]

ID: wmlscriptlib/url/resolve/4
Class: A
Text: When the URL.resolve function is called with parameters string BaseURL and string EmbeddedURL, and the BaseURL's path component is an empty string. The function returns an absolute URL derived from the combination of BaseURL and EmbeddedURL with a single slash character ("/") assumed as the path. [WMLScript Standard Libraries Specification section 10.11]
Note: New assertion for wmlssl June 2000

10.12 escapeString

ID: wmlscriptlib/url/escapestring/1
Class: A
Text: When the URL.escapeString function is called with a parameter string String, it returns a string in which the special characters in String are replaced with their hexadecimal escape sequences (e.g. %ff). [WMLScript Standard Libraries Specification section 11.12]

ID: wmlscriptlib/url/escapestring/2
Class: A
Text: When the URL.escapeString function is called with a parameter string String that contains characters not from the US-ASCII character set, the function returns 'invalid'. [WMLScript Standard Libraries Specification section 11.12]

10.13 unescapeString

ID: wmlscriptlib/url/unescapestring/1
Class: A
Text: When the URL.unescapeString function is called with a parameter string String, it returns a string in which the hexadecimal escape sequences in String are replaced with the characters they represent. [WMLScript Standard Libraries Specification section 10.13]

ID: wmlscriptlib/url/unescapestring/2
Class: A
Text: When the URL.unescapeString function is called with a parameter string String that contains characters above hexidecimal FF, the function returns 'invalid'. [WMLScript Standard Libraries Specification section 10.13]
Note: assertion modified so that only characters above hex FF return invalid.

ID: wmlscriptlib/url/unescapestring/3
Class: B
Text: When the URL.unescapeString function is called with a parameter string String that contains characters not from the US-ASCII character set, the function returns non US-ASCII characters converted using character codes in the native character set. [WMLScript Standard Libraries Specification section 10.13]
Note: New assertion for wmlssl June 2000

10.14 loadString

ID: wmlscriptlib/url/loadstring/1
Class: A
Text: When the URL.loadString function is called with the parameters string URL and string ContentType, where URL is an absolute URL and ContentType is a single content type specifier beginning with "text/", the function returns a string that contains the resource. [WMLScript Standard Libraries Specification section 10.14]

ID: wmlscriptlib/url/loadstring/2
Class: A
Text: When the URL.loadString function is called with the parameters string URL and string ContentType, where URL is an absolute URL that cannot be loaded, the function returns an integer error code. [WMLScript Standard Libraries Specification section 10.14]

ID: wmlscriptlib/url/loadstring/3
Class: A
Text: When the URL.loadString function is called with the parameters string URL and string ContentType, where URL is an absolute URL for which the content type does not match ContentType, the function returns an integer error code. [WMLScript Standard Libraries Specification section 10.14]

ID: wmlscriptlib/url/loadstring/4
Class: A
Text: When the URL.loadString function is called with the parameters string URL and string ContentType, where the ContentType is not well formed, the function returns 'invalid'. [WMLScript Standard Libraries Specification section 10.14]

ID: wmlscriptlib/url/loadstring/5
Class: A
Text: When the URL.loadString function is called with the parameters string URL and string ContentType, where the ContentType contains leading spaces, the function returns 'invalid'. [WMLScript Standard Libraries Specification section 10.14]

ID: wmlscriptlib/url/loadstring/6
Class: A
Text: When the URL.loadString function is called with the parameters string URL and string ContentType, where the ContentType contains trailing spaces, the function returns 'invalid'. [WMLScript Standard Libraries Specification section 10.14]

ID: wmlscriptlib/url/loadstring/7
Class: A
Text: When the URL.loadString function is called with the parameters string URL and string ContentType, where more than one ContentType has been specified the function returns invalid [WMLScript Standard Libraries Specification section 10.14]

11 WMLBrowser

11.1 getVar

ID: wmlscriptlib/wmlbrowser/getvar/1
Class: A
Text: When the WMLBrowser.getVar function is called with a parameter string Name, it returns the value of the browser context variable identified by Name. [WMLScript Standard Libraries Specification section 11.1]

ID: wmlscriptlib/wmlbrowser/getvar/2
Class: A
Text: When the WMLBrowser.getVar function is called with a parameter string Name, and a variable Name does not exist in the current browser context, the function returns the empty string. [WMLScript Standard Libraries Specification section 11.1]

ID: wmlscriptlib/wmlbrowser/getvar/3
Class: A
Text: When the WMLBrowser.getVar function is called with non-string parameter, the function returns 'invalid'. [WMLScript Standard Libraries Specification section 11.1]

ID: wmlscriptlib/wmlbrowser/getvar/4
Class: A
Text: When the WMLBrowser.getVar function is called with a parameter string Name, and a variable Name is not formatted as defined in the WML 1.1 specification, the function returns 'invalid'. [WMLScript Standard Libraries Specification section 12.1]

11.2 setVar

ID: wmlscriptlib/wmlbrowser/setvar/1
Class: A
Text: When the WMLBrowser.setVar function is called with the parameters string Name and string Value, the browser context variable Name is set to have the value Value and the function returns true. [WMLScript Standard Libraries Specification section 11.2]

ID: wmlscriptlib/wmlbrowser/setvar/2
Class: A
Text: When the WMLBrowser.setVar function is called with either parameter a non-string, the function returns 'invalid'. [WMLScript Standard Libraries Specification section 11.2]

ID: wmlscriptlib/wmlbrowser/setvar/3
Class: A
Text: When the WMLBrowser.setVar function is called with the parameters string Name and string Value, and the value of Name does not conform to the definition of variable names in the WML 1.1 specification, the function returns 'invalid'. [WMLScript Standard Libraries Specification section 11.2]

ID: wmlscriptlib/wmlbrowser/setvar/4
Class: A
Text: When the WMLBrowser.setVar function is called with the parameters string Name and string Value, and the value of Value is not legal CDATA as defined in the XML specification, the function returns 'invalid'. [WMLScript Standard Libraries Specification section 11.2]

ID: wmlscriptlib/wmlbrowser/setvar/5
Class: A
Text: When the WMLBrowser.setVar function is called with the parameters string Name and string Value. The function returns false if the browser context variable Name cannot be successfully set. [WMLScript Standard Libraries Specification section 11.2]
Note: New assertion for wmlssl June 2000. The call WMLBrowser.setVar('','testit') will be used to yield a "false" return.

11.3 go

ID: wmlscriptlib/wmlbrowser/go/1
Class: A
Text: When the WMLBrowser.go function is called with a parameter string URL, the WML browser queues a "GO" task to the URL and the function returns the empty string. When control returns to the WML Browser, the GO task is executed. [WMLScript Standard Libraries Specification section 11.3]

ID: wmlscriptlib/wmlbrowser/go/2
Class: A
Text: When the WMLBrowser.go function is called with a parameter string URL, where URL is the empty string, the WML browser cancels any previously queued GO or PREV task in the WML browser and the function returns the empty string. [WMLScript Standard Libraries Specification section 11.3]

ID: wmlscriptlib/wmlbrowser/go/3
Class: A
Text: When the WMLBrowser.go function is called with a non-string parameter, the function returns 'invalid'. [WMLScript Standard Libraries Specification section 11.3]

ID: wmlscriptlib/wmlbrowser/go/4
Class: A
Text: When the WMLBrowser.go function is called with a parameter string URL, and a fatal error occurs, the WML browser cancels any pending go() requests. [WMLScript Standard Libraries Specification section 11.3]
Note: New assertion for wmlssl June 2000. Lang.abort will be called after the WMLBrowser.go to cancel that go() request.

11.4 prev

ID: wmlscriptlib/wmlbrowser/prev/1
Class: A
Text: When the WMLBrowser.prev function is called, the WML browser queues a "PREV" task and the function returns the empty string. When control returns to the WML Browser, the PREV task is executed. [WMLScript Standard Libraries Specification section 11.4]

ID: wmlscriptlib/wmlbrowser/prev/2
Class: A
Text: When the WMLBrowser.go function is called with a URL of the empty string, it cancels any previous call to WMLBrowser.prev. [WMLScript Standard Libraries Specification section 11.4]

ID: wmlscriptlib/wmlbrowser/prev/3
Class: A
Text: When the WMLBrowser.prev function is called and a fatal error occurs, the WML browser cancels any pending prev() requests. [WMLScript Standard Libraries Specification section 11.4]
Note: New assertion for wmlssl June 2000. Lang.abort will be called after the WMLBrowser.prev to cancel that prev() request.

11.5 newcontext

ID: wmlscriptlib/wmlbrowser/newcontext/1
Class: A
Text: When the WMLBrowser.newContext function is called, it clears the current WML Browser context and returns an empty string. [WMLScript Standard Libraries Specification section 11.5]

11.6 getCurrentCard

ID: wmlscriptlib/wmlbrowser/getcurrentcard/1
Class: A
Text: When the WMLBrowser.getCurrentCard function is called, and the current compilation unit has the same base URL as the calling WML deck, the function returns the smallest relative URL (to the base of the current compilation unit) specifying the card currently being processed by the WML Browser. [WMLScript Standard Libraries Specification section 11.6]

ID: wmlscriptlib/wmlbrowser/getcurrentcard/2
Class: B
Text: When the WMLBrowser.getCurrentCard function is called, and the current compilation unit has a different base URL than the calling WML deck, the function returns the absolute URL of the card currently being processed by the WML Browser. [WMLScript Standard Libraries Specification section 12.6]
Note: Can't test as we can't set up a url with a different base url.

ID: wmlscriptlib/wmlbrowser/getcurrentcard/3
Class: B
Text: When the WMLBrowser.getCurrentCard function is called, and the WML Browser as no current card, the function returns 'invalid'. [WMLScript Standard Libraries Specification section 12.6]

11.7 refresh

ID: wmlscriptlib/wmlbrowser/refresh/1
Class: A
Text: When the WMLBrowser.refresh function is called, the WML Browser updates its context and the function returns an empty string. [WMLScript Standard Libraries Specification section 11.7]

ID: wmlscriptlib/wmlbrowser/refresh/2
Class: A
Text: When the WMLBrowser.refresh function is called, the WML Browser updates its context and the function returns an empty string. The refresh must not restart any suspended timers. [WMLScript Standard Libraries Specification section 11.7]
Note: New asssertion for wmlssl June 2000

ID: wmlscriptlib/wmlbrowser/refresh/3
Class: C
Scope: "The client DOES NOT support immediate refresh"
Text: When the WMLBrowser.refresh function is called, and the implementation does not support immediate refresh, the function returns 'invalid'. [WMLScript Standard Libraries Specification section 11.7]
Note: New asssertion for wmlssl June 2000. The spec here implies an option yet this is not seen in the SCR.

ID: wmlscriptlib/wmlbrowser/refresh/4
Class: B
Text: When the WMLBrowser.refresh function is called, and the refresh fails, the WML Browser updates its context and the function returns an non-empty string. [WMLScript Standard Libraries Specification section 11.7]
Note: New assertion for wmlssl June 2000. The test is untestable because there is no portable way of causing the failure of a refresh.

12 Dialogs

12.1 prompt

ID: wmlscriptlib/dialogs/prompt/1
Class: A
Text: When the Dialogs.prompt function is called with the parameters string Message and string DefaultInput, the system displays the message Message supplies the string DefaultInput as the default content. When the user has changed the content, the function returns that content as a string. [WMLScript Standard Libraries Specification section 12.1]

ID: wmlscriptlib/dialogs/prompt/2
Class: A
Text: When the Dialogs.prompt function is called with non-string parameters, the function returns 'invalid'. [WMLScript Standard Libraries Specification section 12.1]

ID: wmlscriptlib/dialogs/prompt/3
Class: A
Text: When the Dialogs.prompt function is called with the parameters string Message and string DefaultInput, the system displays the message Message supplies the string DefaultInput as the default content. [WMLScript Standard Libraries Specification section 12.1]

12.2 confirm

ID: wmlscriptlib/dialogs/confirm/1
Class: A
Text: When the Dialogs.confirm function is called with the parameters string Message, string Ok, and string Cancel, the system displays the message Message and two reply alternatives from Ok and Cancel. If the user selects the Ok string, the function returns true. [WMLScript Standard Libraries Specification section 12.2]

ID: wmlscriptlib/dialogs/confirm/2
Class: A
Text: When the Dialogs.confirm function is called with the parameters string Message, string Ok, and string Cancel, the system displays the message Message and two reply alternatives from Ok and Cancel. If the user selects the Cancel string, the function returns false. [WMLScript Standard Libraries Specification section 12.2]

ID: wmlscriptlib/dialogs/confirm/3
Class: A
Text: When the Dialogs.confirm function is called with the parameters string Message, string Ok, and string Cancel, where Ok and Cancel are empty strings, the system displays the message Message and two implementation-defined reply alternatives. If the user selects the "positive" choice, the function returns true. [WMLScript Standard Libraries Specification section 12.2]

ID: wmlscriptlib/dialogs/confirm/4
Class: A
Text: When the Dialogs.confirm function is called with the parameters string Message, string Ok, and string Cancel, where Ok and Cancel are empty strings, the system displays the message Message and two implementation-defined reply alternatives. If the user selects the "negative" choice, the function returns false. [WMLScript Standard Libraries Specification section 12.2]

ID: wmlscriptlib/dialogs/confirm/5
Class: A
Text: When the Dialogs.confirm function is called with any non-string parameters, the function returns 'invalid'. [WMLScript Standard Libraries Specification section 12.2]

12.3 alert

ID: wmlscriptlib/dialogs/alert/1
Class: A
Text: When the Dialogs.alert function is called with a parameter string Message, it displays the message to the user, waits for the user to confirm that they have seen the message, and returns the empty string. [WMLScript Standard Libraries Specification section 12.3]

ID: wmlscriptlib/dialogs/alert/2
Class: A
Text: When the Dialogs.alert function is called with a non-string parameter, it returns 'invalid'. [WMLScript Standard Libraries Specification section 12.3]


Valid HTML 4.0!