Index: test/webkit/sort-non-numbers.js |
diff --git a/test/webkit/resources/standalone-post.js b/test/webkit/sort-non-numbers.js |
similarity index 88% |
copy from test/webkit/resources/standalone-post.js |
copy to test/webkit/sort-non-numbers.js |
index d157e78bfa084329e2ec1a9b7d6ad456e904c152..cd92c3a4d4920c63641913b41fb9798903a99750 100644 |
--- a/test/webkit/resources/standalone-post.js |
+++ b/test/webkit/sort-non-numbers.js |
@@ -21,6 +21,11 @@ |
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
-wasPostTestScriptParsed = true; |
+description("This tests numerically sorting an array of non-numbers."); |
-finishJSTest(); |
+var test = [ "2", "1", "3" ]; |
+test.sort(function (v1, v2) { |
+ return v1 - v2; |
+}); |
+ |
+shouldBe("String(test)", "'1,2,3'"); |