asterixdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mb...@apache.org
Subject [15/35] asterixdb git commit: AsterixDB Rat Execution Audit & Fixes
Date Wed, 29 Mar 2017 02:36:56 GMT
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/82464fb4/asterixdb/asterix-external-data/src/test/resources/classad/tests.txt
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-external-data/src/test/resources/classad/tests.txt b/asterixdb/asterix-external-data/src/test/resources/classad/tests.txt
new file mode 100644
index 0000000..cc82b6e
--- /dev/null
+++ b/asterixdb/asterix-external-data/src/test/resources/classad/tests.txt
@@ -0,0 +1,365 @@
+######################################################################
+#
+# File: tests.txt
+# Purpose: This is a series of tests for the ClassAd library. 
+#          Currently there is no good documentation for how to write
+#          tests, you'll just have to look in test_classads.C
+#
+######################################################################
+
+######################################################################
+#
+# Test the lexer
+#
+######################################################################
+test-lexer-one-token    123    LEX_INTEGER_VALUE
+test-lexer-one-token 123.456 LEX_REAL_VALUE
+test-lexer-one-token true LEX_BOOLEAN_VALUE
+test-lexer-one-token false LEX_BOOLEAN_VALUE
+test-lexer-one-token "blah" LEX_STRING_VALUE
+test-lexer-one-token "new\nline" LEX_STRING_VALUE
+test-lexer-one-token "blue bibs be big" LEX_STRING_VALUE
+test-lexer-one-token blah LEX_IDENTIFIER
+test-lexer-one-token __ LEX_IDENTIFIER
+test-lexer-one-token undefined LEX_UNDEFINED_VALUE
+test-lexer-one-token error LEX_ERROR_VALUE
+test-lexer-one-token . LEX_SELECTION
+test-lexer-one-token * LEX_MULTIPLY
+test-lexer-one-token / LEX_DIVIDE
+test-lexer-one-token % LEX_MODULUS
+test-lexer-one-token + LEX_PLUS
+test-lexer-one-token - LEX_MINUS
+test-lexer-one-token & LEX_BITWISE_AND
+test-lexer-one-token | LEX_BITWISE_OR
+test-lexer-one-token ~ LEX_BITWISE_NOT
+test-lexer-one-token ^ LEX_BITWISE_XOR
+test-lexer-one-token << LEX_LEFT_SHIFT
+test-lexer-one-token >> LEX_RIGHT_SHIFT
+test-lexer-one-token >>> LEX_URIGHT_SHIFT
+test-lexer-one-token && LEX_LOGICAL_AND
+test-lexer-one-token || LEX_LOGICAL_OR
+test-lexer-one-token ! LEX_LOGICAL_NOT
+test-lexer-one-token < LEX_LESS_THAN
+test-lexer-one-token <= LEX_LESS_OR_EQUAL
+test-lexer-one-token > LEX_GREATER_THAN
+test-lexer-one-token >= LEX_GREATER_OR_EQUAL
+test-lexer-one-token == LEX_EQUAL
+test-lexer-one-token != LEX_NOT_EQUAL
+test-lexer-one-token is LEX_META_EQUAL
+test-lexer-one-token isnt LEX_META_NOT_EQUAL
+test-lexer-one-token = LEX_BOUND_TO
+test-lexer-one-token ? LEX_QMARK
+test-lexer-one-token : LEX_COLON
+test-lexer-one-token ; LEX_SEMICOLON
+test-lexer-one-token , LEX_COMMA
+test-lexer-one-token [ LEX_OPEN_BOX
+test-lexer-one-token ] LEX_CLOSE_BOX
+test-lexer-one-token ( LEX_OPEN_PAREN
+test-lexer-one-token ) LEX_CLOSE_PAREN
+test-lexer-one-token { LEX_OPEN_BRACE
+test-lexer-one-token } LEX_CLOSE_BRACE
+
+# I think this should evaluate to LEX_BACKSLASH. Apparently
+# it's not actually used anywhere, so it's an error instead. 
+test-lexer-one-token \ LEX_TOKEN_ERROR
+
+######################################################################
+#
+# ClassAds
+#
+######################################################################
+begin-classad Job-1
+[
+  Requirements = (other.Type == "Machine" && other.memory >= 4000);
+  Type = "Job";
+  Memoryused = 6000;
+]
+end-classad
+
+begin-classad Machine-1
+[
+  Type = "machine";
+  Requirements = (other.Type == "job" && other.memoryused < 8000);
+  Memory = 5000;
+]
+end-classad
+
+begin-classad Machine-2
+[
+  Type = "Machine";
+  Requirements = other.mytype == "Job";
+  Memory = 3000
+]
+end-classad
+
+begin-classad Machine-3
+[
+  Type = "Machine";
+  Requirements = other.mytype == "Job";
+  Memory = 6000
+]
+end-classad
+
+begin-classad Misc
+[
+  Type = "Misc";
+  Self = [
+           one = "foo";
+		   two = "bar";
+           rank = Other[StrCat(one, two)];
+         ];
+  Other = [
+            one = 1;
+            two = 2;
+            foobar = 15
+          ];
+  Buddha = [
+             which = Self.which;
+           ];
+  ClassAds = { [a = 1], [a = 2], [a = 3] };
+  Set = ClassAds.a;
+  SizeSet = size(Set);
+  SizeZero = size({});
+  SizeOne = size({1});
+  SizeTwo = size({1, 2});
+  Sum = sum(Set);
+  Average = avg(Set);
+  Min = min(Set);
+  Max = max(Set);
+  AllSmall = allcompare("<", Set, 100);
+  AllBig   = allcompare(">", Set, 100); 
+  AnyTwo   = anycompare("==", Set, 2);
+  AllTwo   = allcompare("==", Set, 2);
+  A = 1;
+  B = true;
+  C = !A;
+  D = !B;
+  R1 = regexp(".*\.cs\.uchicago\.edu",  "gargoyle.cs1uchicago.edu");
+  R2 = regexp(".*\.cs\.wisc\.edu",     "beak.cs.wisc.edu");
+  R3 = regexp(".*\.cs\.uchicago\.edu", "beak.cs.wisc.edu");
+  R4 = regexp(".*\.cs\.wisc\.edu",     "gargoyle.cs.uchicago.edu");
+  R5 = regexp(".*\.cs\.wisc\.edu|.*\.cs\.uchicago\.edu",     
+              "gargoyle\.cs\.uchicago.edu");
+  R6 = regexp(".*\.cs\.wisc\.edu|.*\.cs\.uchicago\.edu",     
+              "beak.cs.wisc\.edu");
+
+]
+end-classad
+
+begin-classad Motherboard
+[
+  have_match =    machine_enclosure.machine.Requirements 
+              && job_enclosure.job.Requirements
+              && storage_enclosure.storage.Requirements;
+
+  machine_enclosure = 
+  [ 
+    job = job_enclosure.job;
+	storage = storage_enclosure.storage;
+    machine = [
+                Type="Machine"; 
+                RAM=6000;
+                Requirements = (job.MemoryNeeded <= RAM);
+              ];
+  ];
+
+  job_enclosure = 
+  [
+    machine = machine_enclosure.machine;
+	storage = storage_enclosure.storage;
+    job = [
+            Type="Job";
+            MemoryNeeded = 6000;
+            DiskSpaceNeeded = 8000;
+            Requirements = (machine.RAM >= MemoryNeeded
+                         && storage.FreeDiskSpace > DiskSpaceNeeded)
+          ];
+  ];
+
+  storage_enclosure = 
+  [
+    job = job_enclosure.job;
+    machine = machine_enclosure.machine;
+    storage = [
+         Type = "Storage";
+         FreeDiskSpace = 10000;
+         Requirements = job.DiskSpaceNeeded < FreeDiskSpace;
+         ];
+
+  ];
+]
+end-classad
+
+evaluate Motherboard job_enclosure.job.Requirements
+evaluate Motherboard machine_enclosure.job.Requirements
+evaluate Motherboard storage_enclosure.storage.Requirements
+evaluate Motherboard have_match
+
+######################################################################
+#
+# Basic Evaluation Tests
+#
+######################################################################
+evaluate Job-1 TestTernary
+evaluate Misc Self.rank
+evaluate Machine-1 memory
+evaluate Misc Set
+evaluate Misc Sum
+evaluate Misc Average
+evaluate Misc Min
+evaluate Misc Max
+evaluate Misc AllSmall
+evaluate Misc AllBig
+evaluate Misc AnyTwo
+evaluate Misc AllTwo
+evaluate Misc ClassAds.b
+evaluate Misc ClassAds.c
+evaluate Misc All_Undefined
+evaluate Misc Any_Undefined
+evaluate Misc A
+evaluate Misc B
+evaluate Misc C
+evaluate Misc D
+evaluate Misc SizeSet;
+evaluate Misc SizeZero;
+evaluate Misc SizeOne;
+evaluate Misc SizeTwo;
+evaluate Misc R1;
+evaluate Misc R2;
+evaluate Misc R3;
+evaluate Misc R4;
+evaluate Misc R5;
+evaluate Misc R6;
+
+######################################################################
+#
+# Matching tests
+#
+######################################################################
+test-match symmetricMatch Job-1 Machine-1 ExpectMatch
+test-match leftMatchesRight Job-1 Machine-1 ExpectMatch
+test-match rightMatchesLeft Job-1 Machine-1 ExpectMatch
+test-match symmetricMatch Job-1 Machine-2 ExpectDontMatch
+
+######################################################################
+#
+# Collections
+#
+######################################################################
+#make-collection Machines machines-log
+make-collection Machines
+add-to-collection Machines Machine-1
+add-to-collection Machines Machine-2
+add-to-collection Machines Machine-3
+
+create-subview Machines root Machine-View (other.Memory >= 4000)
+check-in-view Machines Machine-View Machine-1 ExpectIn
+check-in-view Machines Machine-View Machine-2 ExpectNotIn
+check-in-view Machines Machine-View Machine-3 ExpectIn
+
+create-subview Machines Machine-View BigMachine-View (other.Memory > 5000)
+check-in-view Machines BigMachine-View Machine-1 ExpectNotIn
+check-in-view Machines BigMachine-View Machine-2 ExpectNotIn
+check-in-view Machines BigMachine-View Machine-3 ExpectIn
+
+#truncate-log Machines
+
+begin-classad Group-1
+[
+  Type = "Group";
+  Users = {"Alain", "Peter"};
+]
+end-classad
+
+begin-classad Group-2
+[
+  Type = "Group";
+  Users = {"Annalisa", "David"};
+]
+end-classad
+
+#make-collection Groups groups-log
+make-collection Groups groups-log
+add-to-collection Groups Group-1
+add-to-collection Groups Group-2
+
+begin-classad List-Eval
+[ a = { x }; x = 1 ]
+end-classad
+
+evaluate Misc SizeOne;
+evaluate Misc SizeTwo;
+evaluate List-Eval a[0]
+
+begin-classad Lexer-Fault
+[ a=!b; b=true; ]
+end-classad
+evaluate Lexer-Fault b
+evaluate Lexer-Fault a
+
+begin-classad Octal
+[ a = "\101\044\44\1"; /* Should be A(( */ ]
+end-classad
+evaluate Octal a
+
+begin-classad Floats
+[a = 0.7 * 4.5; ]
+end-classad
+
+begin-classad Quoted-Names
+[
+  'a' = 4;
+  'b.##$%' = 5;
+]
+end-classad
+
+begin-classad Times
+[
+  Abs1 = absTime("2003-09-03T");
+  Rel1 = relTime("2+25:14:16.123");
+]
+end-classad
+
+begin-classad Numbers
+[
+  X = 4.3;
+  Y = real("4.3");
+  Not = real("NaN");
+  Infinite = real("INF");
+  Negative_Infinite = real("-INF");
+]
+end-classad
+
+print-classad Floats
+print-classad Quoted-Names
+print-classad Times
+print-classad Numbers
+print-classad-xml Numbers
+
+begin-classad Loop
+[
+  attr = a//b
+]
+end-classad 
+
+#begin-classad Crash
+#[
+#  attr = a<b>
+#]
+#end-classad 
+
+begin-classad policy
+[
+  type = 'machine';
+  access_times = 
+    [
+        globus = [start = 1900; end = 2100;];
+        condor = [start = 100; end = 500;];
+    ]
+]
+end-classad
+
+evaluate policy access_times
+evaluate policy access_times["globus"]
+evaluate policy access_times["globus"].start
+

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/82464fb4/asterixdb/asterix-external-data/src/test/resources/data/countriesCapitals.properties
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-external-data/src/test/resources/data/countriesCapitals.properties
b/asterixdb/asterix-external-data/src/test/resources/data/countriesCapitals.properties
new file mode 100644
index 0000000..7427cec
--- /dev/null
+++ b/asterixdb/asterix-external-data/src/test/resources/data/countriesCapitals.properties
@@ -0,0 +1,207 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you 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.
+#
+United\ Arab\ Emirates=Abu Dhabi
+Nigeria=Abuja
+Ghana=Accra
+Ethiopia=Addis Ababa
+Algeria=Algiers
+Niue=Alofi
+Jordan=Amman
+Netherlands=Amsterdam
+Andorra=Andorra la Vella
+Turkey=Ankara
+Madagascar=Antananarivo
+Samoa=Apia
+Turkmenistan=Ashgabat
+Eritrea=Asmara
+Kazakhstan=Astana
+Paraguay=Asunción
+Greece=Athens
+Iraq=Baghdad
+Azerbaijan=Baku
+Mali=Bamako
+Brunei=Bandar Seri Begawan
+Thailand=Bangkok
+Gambia=Banjul
+China=Beijing
+Lebanon=Beirut
+Serbia=Belgrade
+Belize=Belmopan
+Germany=Berlin
+Switzerland=Bern
+Kyrgyzstan=Bishkek
+Guinea-Bissau=Bissau
+Colombia=Bogotá
+Brazil=Brasília
+Slovakia=Bratislava
+Barbados=Bridgetown
+Belgium=Brussels
+Romania=Bucharest
+Hungary=Budapest
+Argentina=Buenos Aires
+Burundi=Bujumbura
+Egypt=Cairo
+Australia=Canberra
+Venezuela=Caracas
+Wales=Cardiff
+Moldova=Chisinau
+Guinea=Conakry
+Denmark=Copenhagen
+Senegal=Dakar
+Syria=Damascus
+Bangladesh=Dhaka
+Djibouti=Djibouti
+Qatar=Doha
+Ireland=Dublin
+Tajikistan=Dushanbe
+Scotland=Edinburgh
+Botswana=Gaborone
+Guyana=Georgetown
+Gibraltar=Gibraltar
+Guatemala=Guatemala City
+Guam=Hagåtña
+Bermuda=Hamilton
+Vietnam=Hanoi
+Zimbabwe=Harare
+Cuba=Havana
+Finland=Helsinki
+Pakistan=Islamabad
+Indonesia=Jakarta
+Afghanistan=Kabul
+Uganda=Kampala
+Nepal=Kathmandu
+Sudan=Khartoum
+Ukraine=Kiev
+Rwanda=Kigali
+Jamaica=Kingston
+Malaysia=Kuala Lumpur
+Kuwait=Kuwait City
+Gabon=Libreville
+Malawi=Lilongwe
+Peru=Lima
+Portugal=Lisbon
+Slovenia=Ljubljana
+Togo=Lome
+England=London
+Angola=Luanda
+Zambia=Lusaka
+Luxembourg=Luxembourg
+Spain=Madrid
+Marshall Islands=Majuro
+Equatorial Guinea=Malabo
+Maldives=Malé
+Nicaragua=Managua
+Bahrain=Manama
+Philippines=Manila
+Mozambique=Maputo
+Saint Martin=Marigot
+Lesotho=Maseru
+Wallis and Futuna=Mata-Utu
+Palau=Melekeok
+Mexico=Mexico City
+Belarus=Minsk
+Somalia=Mogadishu
+Monaco=Monaco
+Liberia=Monrovia
+Uruguay=Montevideo
+Comoros=Moroni
+Russia=Moscow
+Oman=Muscat
+Kenya=Nairobi
+Bahamas=Nassau
+Myanmar=Naypyidaw
+Chad=NDjamena
+India=New Delhi
+Niger=Niamey
+Cyprus=Nicosia
+Mauritania=Nouakchott
+Greenland=Nuuk
+Aruba=Oranjestad
+Norway=Oslo
+Canada=Ottawa
+Panama=Panama City
+Suriname=Paramaribo
+France=Paris
+Cambodia=Phnom Penh
+Montserrat=Brades Estate (de facto)
+Montenegro=Podgorica
+Mauritius=Port Louis
+Vanuatu=Port Vila
+Haiti=Port-au-Prince
+Benin=Cotonou (de facto)
+Czech Republic=Prague
+Cape Verde=Praia
+South\ Africa=Cape Town
+North\ Korea=Pyongyang
+Ecuador=Quito
+Morocco=Rabat
+Iceland=Reykjavík
+Latvia=Riga
+Saudi\ Arabia=Riyadh
+Italy=Rome
+Dominica=Roseau
+Costa\ Rica=San José
+Puerto\ Rico=San Juan
+San\ Marino=San Marino
+El\ Salvador=San Salvador
+Yemen=Sanaa
+Chile=Santiago
+Dominican\ Republic=Santo Domingo
+Bosnia\ and\ Herzegovina=Sarajevo
+South\ Korea=Seoul
+Singapore=Singapore
+Macedonia=Skopje
+Bulgaria=Sofia
+Sri\ Lanka=Colombo
+Grenada=St. George's
+Jersey=St. Helier
+Guernsey=St. Peter Port
+Sweden=Stockholm
+Bolivia=La Paz
+Abkhazia=Sukhumi
+Fiji=Suva
+Taiwan=Taipei
+Estonia=Tallinn
+Kiribati=Tarawa
+Uzbekistan=Tashkent
+Georgia=Tbilisi
+Honduras=Tegucigalpa
+Iran=Tehran
+Bhutan=Thimphu
+Albania=Tirana
+Transnistria=Tiraspol
+Japan=Tokyo
+Libya=Tripoli
+Tunisia=Tunis
+Mongolia=Ulan Bator
+Liechtenstein=Vaduz
+Malta=Valletta
+Anguilla=The Valley
+Vatican\ City=Vatican City
+Seychelles=Victoria
+Austria=Vienna
+Laos=Vientiane
+Lithuania=Vilnius
+Poland=Warsaw
+United\ States=Washington D.C.
+New\ Zealand=Wellington
+Namibia=Windhoek
+Nauru=Yaren (de facto)
+Armenia=Yerevan
+Croatia=Zagreb

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/82464fb4/asterixdb/asterix-external-data/src/test/resources/data/countriesCapitals.txt
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-external-data/src/test/resources/data/countriesCapitals.txt
b/asterixdb/asterix-external-data/src/test/resources/data/countriesCapitals.txt
deleted file mode 100644
index def17ed..0000000
--- a/asterixdb/asterix-external-data/src/test/resources/data/countriesCapitals.txt
+++ /dev/null
@@ -1,189 +0,0 @@
-United\ Arab\ Emirates=Abu Dhabi
-Nigeria=Abuja
-Ghana=Accra
-Ethiopia=Addis Ababa
-Algeria=Algiers
-Niue=Alofi
-Jordan=Amman
-Netherlands=Amsterdam 
-Andorra=Andorra la Vella
-Turkey=Ankara
-Madagascar=Antananarivo
-Samoa=Apia
-Turkmenistan=Ashgabat
-Eritrea=Asmara
-Kazakhstan=Astana
-Paraguay=Asunción
-Greece=Athens
-Iraq=Baghdad
-Azerbaijan=Baku
-Mali=Bamako
-Brunei=Bandar Seri Begawan
-Thailand=Bangkok
-Gambia=Banjul
-China=Beijing
-Lebanon=Beirut
-Serbia=Belgrade
-Belize=Belmopan
-Germany=Berlin
-Switzerland=Bern
-Kyrgyzstan=Bishkek
-Guinea-Bissau=Bissau
-Colombia=Bogotá
-Brazil=Brasília
-Slovakia=Bratislava
-Barbados=Bridgetown
-Belgium=Brussels
-Romania=Bucharest
-Hungary=Budapest
-Argentina=Buenos Aires
-Burundi=Bujumbura
-Egypt=Cairo
-Australia=Canberra
-Venezuela=Caracas
-Wales=Cardiff
-Moldova=Chisinau
-Guinea=Conakry
-Denmark=Copenhagen
-Senegal=Dakar
-Syria=Damascus
-Bangladesh=Dhaka
-Djibouti=Djibouti
-Qatar=Doha
-Ireland=Dublin
-Tajikistan=Dushanbe
-Scotland=Edinburgh
-Botswana=Gaborone
-Guyana=Georgetown
-Gibraltar=Gibraltar
-Guatemala=Guatemala City
-Guam=Hagåtña
-Bermuda=Hamilton
-Vietnam=Hanoi
-Zimbabwe=Harare
-Cuba=Havana
-Finland=Helsinki
-Pakistan=Islamabad
-Indonesia=Jakarta
-Afghanistan=Kabul
-Uganda=Kampala
-Nepal=Kathmandu
-Sudan=Khartoum
-Ukraine=Kiev
-Rwanda=Kigali
-Jamaica=Kingston
-Malaysia=Kuala Lumpur
-Kuwait=Kuwait City
-Gabon=Libreville
-Malawi=Lilongwe
-Peru=Lima
-Portugal=Lisbon
-Slovenia=Ljubljana
-Togo=Lome
-England=London
-Angola=Luanda
-Zambia=Lusaka
-Luxembourg=Luxembourg
-Spain=Madrid
-Marshall Islands=Majuro
-Equatorial Guinea=Malabo
-Maldives=Malé
-Nicaragua=Managua
-Bahrain=Manama
-Philippines=Manila
-Mozambique=Maputo
-Saint Martin=Marigot
-Lesotho=Maseru
-Wallis and Futuna=Mata-Utu
-Palau=Melekeok
-Mexico=Mexico City
-Belarus=Minsk
-Somalia=Mogadishu
-Monaco=Monaco
-Liberia=Monrovia
-Uruguay=Montevideo
-Comoros=Moroni
-Russia=Moscow
-Oman=Muscat
-Kenya=Nairobi
-Bahamas=Nassau
-Myanmar=Naypyidaw
-Chad=NDjamena
-India=New Delhi
-Niger=Niamey
-Cyprus=Nicosia
-Mauritania=Nouakchott
-Greenland=Nuuk
-Aruba=Oranjestad
-Norway=Oslo
-Canada=Ottawa
-Panama=Panama City
-Suriname=Paramaribo
-France=Paris
-Cambodia=Phnom Penh
-Montserrat=Brades Estate (de facto)
-Montenegro=Podgorica
-Mauritius=Port Louis
-Vanuatu=Port Vila
-Haiti=Port-au-Prince
-Benin=Cotonou (de facto)
-Czech Republic=Prague
-Cape Verde=Praia
-South\ Africa=Cape Town
-North\ Korea=Pyongyang
-Ecuador=Quito
-Morocco=Rabat
-Iceland=Reykjavík
-Latvia=Riga
-Saudi\ Arabia=Riyadh
-Italy=Rome
-Dominica=Roseau
-Costa\ Rica=San José
-Puerto\ Rico=San Juan
-San\ Marino=San Marino
-El\ Salvador=San Salvador
-Yemen=Sanaa
-Chile=Santiago
-Dominican\ Republic=Santo Domingo
-Bosnia\ and\ Herzegovina=Sarajevo
-South\ Korea=Seoul
-Singapore=Singapore
-Macedonia=Skopje
-Bulgaria=Sofia
-Sri\ Lanka=Colombo
-Grenada=St. George's
-Jersey=St. Helier
-Guernsey=St. Peter Port
-Sweden=Stockholm
-Bolivia=La Paz
-Abkhazia=Sukhumi
-Fiji=Suva
-Taiwan=Taipei
-Estonia=Tallinn
-Kiribati=Tarawa
-Uzbekistan=Tashkent
-Georgia=Tbilisi
-Honduras=Tegucigalpa
-Iran=Tehran
-Bhutan=Thimphu
-Albania=Tirana
-Transnistria=Tiraspol
-Japan=Tokyo
-Libya=Tripoli
-Tunisia=Tunis
-Mongolia=Ulan Bator
-Liechtenstein=Vaduz
-Malta=Valletta
-Anguilla=The Valley
-Vatican\ City=Vatican City
-Seychelles=Victoria
-Austria=Vienna
-Laos=Vientiane
-Lithuania=Vilnius
-Poland=Warsaw
-United\ States=Washington D.C.
-New\ Zealand=Wellington
-Namibia=Windhoek
-Nauru=Yaren (de facto)
-Armenia=Yerevan
-Croatia=Zagreb

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/82464fb4/asterixdb/asterix-external-data/src/test/resources/escapes.txt
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-external-data/src/test/resources/escapes.txt b/asterixdb/asterix-external-data/src/test/resources/escapes.txt
deleted file mode 100644
index 50361e2..0000000
--- a/asterixdb/asterix-external-data/src/test/resources/escapes.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-[
-        Args = "\342\200\234-1 0.1 0.1 0.5 2e-07 0.001 10 -1\342\200\235";
-        GlobalJobId = "submit-4.chtc.wisc.edu#3724038.0#1462893042";
-    ]

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/82464fb4/asterixdb/asterix-external-data/src/test/resources/functional_tests.txt
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-external-data/src/test/resources/functional_tests.txt b/asterixdb/asterix-external-data/src/test/resources/functional_tests.txt
deleted file mode 100644
index 3aaae46..0000000
--- a/asterixdb/asterix-external-data/src/test/resources/functional_tests.txt
+++ /dev/null
@@ -1,364 +0,0 @@
-echo Testing select on lists...
-eval x = {
-           [a = 3; b = "I see London"],
-           [a = 2; b = "I see France"],
-           [a = 1; b = "I see Alain's funky pants"]
-         }
-same $x.a, {3, 2, 1}
-same $x.b, {"I see London", "I see France", "I see Alain's funky pants"}
-same $x.c, {undefined, undefined, undefined}
-same {}.a, {}
-
-/////////////////////////////////
-echo Testing basic math...
-eval x = (1 + 2)
-same $x, 3
-eval x = (3 - 1) 
-same $x, 2
-eval x = (2 * 3)
-same $x, 6
-eval x = (8 / 2)
-same $x, 4
-
-echo Testing extreme numbers...
-same string(real("INF")), "real(\"INF\")"
-same string(real("-INF")), "real(\"-INF\")"
-same string(real("NaN")), "real(\"NaN\")"
-diff real("NaN"), real("NaN")
-same real("INF"), real("INF")
-same real("-INF"), real("-INF")
-diff real("INF"), real("-INF")
-same 0.0, -(0.0)
-same 0.0, real("-0.0")
-same string(0.0), "0.0"
-same string(-0.0), "-0.0"
-
-/////////////////////////////////
-echo Testing basic attributes in a ClassAd...
-eval x = [
-            a = 1;
-            b = 2.0;
-            c = "alain";
-            d = true;
-            atime = absTime("2004-01-01");
-            rtime = relTime("2+25:14:16.123");
-            l = {1, 1, 2, 3, 5};
-            e = error;
-            u = undefined;
-         ]
-same $x.a, 1
-same $x.b, 2.0
-same $x.c, "alain"
-same $x.d, true
-same $x.atime, absTime("2004-01-01");
-same $x.rtime, relTime("2+25:14:16.123");
-same $x.l, {1, 1, 2, 3, 5}
-same $x.l[4], 5
-same $x.e, error
-same $x.u, undefined
-same isinteger($x.a), true
-same isinteger($x.b), false
-same isreal($x.b), true
-same isreal($x.c), false
-same isstring($x.c), true
-same isstring($x.d), false
-same isboolean($x.d), true
-same isboolean($x.c), false
-same isabstime($x.atime), true
-same isabstime($x.rtime), false
-same isreltime($x.rtime), true
-same isreltime($x.atime), false
-same islist($x.l), true
-same islist($x.a), false
-same iserror($x.e), true
-same iserror($x.u), false
-same isundefined($x.u), true
-same isundefined($x.e), false
-
-// Note that testing XML relies on the ClassAd from
-// the above testing.
-// echo Testing XML...
-// eval y = [ a = 2; b = "Lisp rocks"; ]
-// writexml tmp.xml {$x, $y}
-// readxml z tmp.xml
-// same $x, $z[0]
-// same $y, $z[1]
-
-/////////////////////////////////
-
-
-/////////////////////////////////
-echo Testing subscripts
-eval x = [
-           a = 3;
-           b = "alain";
-           ab = 4;
-         ]
-same $x["a"], 3
-same $x["b"], "alain"
-same $x["c"], error
-eval d = $x["c"]
-same $x[strcat("a", "b")], 4
-eval x = {"a", "b", "c"}
-same $x[0], "a"
-same $x[1], "b"
-same $x[2], "c"
-same $x[3], error
-
-/////////////////////////////////
-echo Testing multiple semicolons...
-eval x = [
-           ;;
-           a = 3;;
-           b = 4;;
-         ]
-
-/////////////////////////////////
-echo Testing functions...
-same int(3), 3
-same int(3.9), 3
-same int("3.9"), 3
-same int(absTime("1970-01-01T:00:00:01Z")), 1
-same int(reltime("01:00:01")), 3601
-eval y = int(absTime("1970-01-01T:00:00:01Z"))
-same $y, 1
-
-same real(3), 3.0
-same real(3.9), 3.9
-same real("3.9"), 3.9
-same real(absTime("1970-01-01T:00:00:01Z")), 1.0
-same real(reltime("01:00:01")), 3601.0
-
-same string("alain"), "alain"
-same string(1), "1"
-
-same floor(3.9), 3
-same floor("3.9"), 3
-
-same ceiling(3.9), 4
-same ceiling("3.9"), 4
-
-same round(3.1), 3
-same round(3.9), 4
-
-same strcat("", "roy"), "roy"
-same strcat("alain", ""), "alain"
-same strcat("alain", "roy"), "alainroy"
-same strcat(14, " bottles of root beer"), "14 bottles of root beer"
-
-same substr("abcde", 1), "bcde"
-same substr("abcde", 4), "e"
-same substr("abcde", 5), ""
-same substr("abcde", 1, 2), "bc"
-same substr("abcde", 4, 2), "e"
-
-same strcmp("alain", "roy") < 0, true
-same strcmp("roy", "alain") > 0, true
-same strcmp("alain", "alain"), 0
-
-same stricmp("alain", "ALAIN"), 0
-same stricmp("alain", "roy") < 0, true
-
-same tolower("ALAIN"), "alain")
-same toupper("alain"), "ALAIN")
-same tolower(true), "true")
-same toupper(true), "TRUE")
-
-same member(1, {1, 2, 3}), true
-same member(4, {1, 2, 3}), false
-
-same regexp("Alain.*Roy", "Alain Aslag Roy"), true
-same regexp("alain.*roy", "Alain Aslag Roy"), false
-same regexp("alain.*roy", "Alain Aslag Roy", "i"), true
-
-//same regexpMember("b.*", {}), false
-//same regexpMember("b.*", {"aa"}), false
-//same regexpMember("b.*", {"aa", "bb"}), true
-//same regexpMember("b.*", {"bb", "aa"}), true
-//same regexpMember("b.*", {1, "bb"} ), error
-
-
-eval t = absTime("1970-01-02T:03:04:05Z")
-same splitTime($t).year, 1970
-same splitTime($t).month, 1
-same splitTime($t).day, 2
-same splitTime($t).hours, 3
-same splitTime($t).minutes, 4
-same splitTime($t).seconds, 5
-same splitTime($t).offset, 0
-
-
-
-eval t = absTime("1970-01-02T:03:04:05-06:00")
-eval tt = splitTime($t)
-same splitTime($t).year, 1970
-same splitTime($t).month, 1
-same splitTime($t).day, 2
-same splitTime($t).hours, 3
-same splitTime($t).minutes, 4
-same splitTime($t).seconds, 5
-same splitTime($t).offset, -21600
-
-
-
-eval t = relTime("1d2h3m4.5s")
-eval tt = splitTime($t)
-same splitTime($t).days, 1
-same splitTime($t).hours, 2
-same splitTime($t).minutes, 3
-same splittime($t).seconds, 4.5
-eval tt = splitTime($t)
-
-
-eval t = absTime("1997-08-30T16:04:05-0500")
-eval f = formatTime($t, "%m %d %Y")
-same $f, "08 30 1997"
-eval f = formatTime($t, "%H %M %S")
-same $f, "16 04 05"
-eval f = formatTime($t, "%A %a")
-same $f, "Saturday Sat"
-eval f = formatTime($t, "%B %b")
-same $f, "August Aug"
-eval f = formatTime(splitTime($t), "%H:%M:%S")
-same $f, "16:04:05"
-eval f = formatTime($t)
-same $f, "Sat Aug 30 16:04:05 1997"
-
-same size({}), 0
-same size({1}), 1
-same size({1, 2, 3, 4, 5}), 5
-same size([]), 0
-same size([a = 1;]), 1
-same size([a = 1; b = 2;]), 2
-same size(""), 0
-same size("a"), 1
-same size("ab"), 2
-same size(3), error
-same size(3.4), error
-
-eval list0 = {}
-eval list1 = {1}
-eval list5 = {1, 2, 3, 4, 5}
-
-same sum($list0), undefined
-same avg($list0), undefined
-same min($list0), undefined
-same max($list0), undefined
-// #### Do we really want these to be false and true?
-same anycompare("<", $list0, 3), false
-same allcompare("<", $list0, 3), true
-
-same sum($list1), 1
-same avg($list1), 1.0
-same min($list1), 1
-same max($list1), 1
-same anycompare("<", $list1, 3), true
-same allcompare("<", $list1, 3), true
-
-same sum($list5), 15
-same avg($list5), 3.0
-same min($list5), 1
-same max($list5), 5
-same anycompare("<", $list5, 3), true
-same allcompare("<", $list5, 3), false
-
-same ifThenElse(1+1==2, 3, 4), 3
-same ifThenElse(1+1==3,3,4), 4
-same ifThenElse(ERROR,3,4), ERROR
-same ifThenElse(UNDEFINED,3,4), UNDEFINED
-
-same interval(1), "1"
-same interval(60*2 + 1), "2:01"
-same interval(3600*3 + 60*2 + 1), "3:02:01"
-same interval(3600*24*4 + 3600*3 + 60*2 + 1), "4+03:02:01"
-
-//same regexps("[abc]*([def]*)[ghi]*","aaaabbbbcccccdddeeefffggghhhiii","\\1"), "dddeeefff"
-//same regexps("[abc]*([def]*)[ghi]*","abcdefghi","\\0"), "abcdefghi"
-//same regexps("[abc]*([def]*)[ghi]*","abcdefghi","\\2"), error
-//same regexps("[abc]*([def]*)[ghi]*","NO","\\0"), ""
-
-
-echo Testing eval
-same eval("1+1"), 2
-same eval(1+1), 2
-same eval("1+"), ERROR
-eval x = [ A = 1; B = 2; C = eval("A+B"); ]
-same $x.C, 3
-
-echo Testing boolean expressions
-echo Testing && operator
-same false, false && false
-same false, false && undefined
-same false, false && true
-same false, false && error
-
-same false, undefined && false
-same undefined, undefined && undefined
-same undefined, undefined && true
-same error, undefined && error
-
-same false, true && false
-same undefined, true && undefined
-same true, true && true
-same error, true && error
-
-same error, error && false
-same error, error && undefined
-same error, error && true
-same error, error && error
-
-
-echo Testing || operator
-same false, false || false
-same undefined, false || undefined
-same true, false || true
-same error, false || error
-
-same undefined, undefined || false
-same undefined, undefined || undefined
-same true, undefined || true
-same error, undefined || error
-
-same true, true || false
-same true, true || undefined
-same true, true || true
-same true, true || error
-
-same error, error || false
-same error, error || undefined
-same error, error || true
-same error, error || error
-
-
-echo Testing ! operator
-same true, !false
-same undefined, !undefined
-same false, !true
-same error, !error
-
-
-echo Testing ? operator
-same false, false ? true : false
-same true, false ? false : true
-same undefined, false ? true : undefined
-same true, false ? undefined : true
-
-same true, true ? true : false
-same false, true ? false : true
-same true, true ? true : undefined
-same undefined, true ? undefined : true
-
-echo Testing characters with negative ascii values
-// # the following used to not even parse on some systems
-same "–", "–"
-
-echo Testing stringListsIntersect()
-same true, stringListsIntersect("one,two","two,three")
-same false, stringListsIntersect("one,two","three,four")
-same false, stringListsIntersect("one,two","three,four",";")
-same true, stringListsIntersect("one,two","one")
-same true, stringListsIntersect("one, two","two, three")
-same true, stringListsIntersect("one,two","two,three",",")
-same true, stringListsIntersect("one;two","two;three",";")
-same undefined, stringListsIntersect("one,two",undefined)
-same undefined, stringListsIntersect(undefined,"one,two" )


Mime
View raw message