From 23580ca27a0a8109312fdd36cc363ad1f4719889 Mon Sep 17 00:00:00 2001 From: The Android Open Source Project Date: Tue, 21 Oct 2008 07:00:00 -0700 Subject: Initial Contribution --- amend/tests/006-lex-words/SKIP | 0 amend/tests/006-lex-words/expected.txt | 6 ++++++ amend/tests/006-lex-words/info.txt | 1 + amend/tests/006-lex-words/input | 5 +++++ amend/tests/006-lex-words/input2 | 2 ++ amend/tests/006-lex-words/input3 | 2 ++ amend/tests/006-lex-words/run | 17 +++++++++++++++++ 7 files changed, 33 insertions(+) create mode 100644 amend/tests/006-lex-words/SKIP create mode 100644 amend/tests/006-lex-words/expected.txt create mode 100644 amend/tests/006-lex-words/info.txt create mode 100644 amend/tests/006-lex-words/input create mode 100644 amend/tests/006-lex-words/input2 create mode 100644 amend/tests/006-lex-words/input3 create mode 100644 amend/tests/006-lex-words/run (limited to 'amend/tests/006-lex-words') diff --git a/amend/tests/006-lex-words/SKIP b/amend/tests/006-lex-words/SKIP new file mode 100644 index 000000000..e69de29bb diff --git a/amend/tests/006-lex-words/expected.txt b/amend/tests/006-lex-words/expected.txt new file mode 100644 index 000000000..a78a0b177 --- /dev/null +++ b/amend/tests/006-lex-words/expected.txt @@ -0,0 +1,6 @@ + IDENTIFIER WORD WORD WORD WORD WORD WORD WORD WORD EOL + IDENTIFIER WORD<12> WORD WORD WORD<)> WORD WORD WORD<\\> WORD WORD EOL + IDENTIFIER WORD WORD WORD WORD WORD WORD EOL + IDENTIFIER WORD WORD WORD EOL + IDENTIFIER WORD<"""shouldn't> WORD WORD WORD WORD EOL + EOF diff --git a/amend/tests/006-lex-words/info.txt b/amend/tests/006-lex-words/info.txt new file mode 100644 index 000000000..dd3701607 --- /dev/null +++ b/amend/tests/006-lex-words/info.txt @@ -0,0 +1 @@ +Test to make sure that argument words are tokenized properly. diff --git a/amend/tests/006-lex-words/input b/amend/tests/006-lex-words/input new file mode 100644 index 000000000..a4de63821 --- /dev/null +++ b/amend/tests/006-lex-words/input @@ -0,0 +1,5 @@ +test this has a bunch of BARE ALPHA WORDS +test 12 this has(some ) ALPHANUMER1C and \\ whatever characters +test this has mixed bare "and quoted" words +test what about quotes"in the middle?" +test \"\"\"shouldn't be a quoted string diff --git a/amend/tests/006-lex-words/input2 b/amend/tests/006-lex-words/input2 new file mode 100644 index 000000000..09e668957 --- /dev/null +++ b/amend/tests/006-lex-words/input2 @@ -0,0 +1,2 @@ +# This should fail +test1 "unterminated string diff --git a/amend/tests/006-lex-words/input3 b/amend/tests/006-lex-words/input3 new file mode 100644 index 000000000..02f3f8530 --- /dev/null +++ b/amend/tests/006-lex-words/input3 @@ -0,0 +1,2 @@ +# This should fail +test1 "string with illegal escape \n in the middle" diff --git a/amend/tests/006-lex-words/run b/amend/tests/006-lex-words/run new file mode 100644 index 000000000..35c4a4fa3 --- /dev/null +++ b/amend/tests/006-lex-words/run @@ -0,0 +1,17 @@ +#!/bin/bash +# +# Copyright (C) 2007 The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +amend --debug-lex input -- cgit v1.2.3