From 5892a17b4e9a48a017e2cebc427a5960085eda20 Mon Sep 17 00:00:00 2001
From: Julien Lopez <julien.lopez@lri.fr>
Date: Mon, 29 May 2017 14:43:46 +0200
Subject: [PATCH] Add test for pgsql

---
 .../tests/pgsql/QueryPartial.R                | 13 +++
 .../tests/pgsql/QueryPartial.out              | 89 +++++++++++++++++++
 2 files changed, 102 insertions(+)
 create mode 100644 com.oracle.truffle.r.test/tests/pgsql/QueryPartial.R
 create mode 100644 com.oracle.truffle.r.test/tests/pgsql/QueryPartial.out

diff --git a/com.oracle.truffle.r.test/tests/pgsql/QueryPartial.R b/com.oracle.truffle.r.test/tests/pgsql/QueryPartial.R
new file mode 100644
index 0000000000..c24b6fcdac
--- /dev/null
+++ b/com.oracle.truffle.r.test/tests/pgsql/QueryPartial.R
@@ -0,0 +1,13 @@
+movie = new.tableRef("movie", "PostgreSQL", "postgre.config", "public")
+
+filter = function (collection)
+  where (function (line) line$year < 1990 && line$year > 1985, collection)
+
+results = select(function (movie) {
+                          res = new.env()
+			  res$title = movie$title
+			  res },
+	  filter(
+          from(movie)))
+
+print(query.force(results))
diff --git a/com.oracle.truffle.r.test/tests/pgsql/QueryPartial.out b/com.oracle.truffle.r.test/tests/pgsql/QueryPartial.out
new file mode 100644
index 0000000000..f4be23850b
--- /dev/null
+++ b/com.oracle.truffle.r.test/tests/pgsql/QueryPartial.out
@@ -0,0 +1,89 @@
+                                            title
+1  The Naked Gun: From the Files of Police Squad!
+2                                        Scrooged
+3                                      Parenthood
+4                          The Accidental Tourist
+5                              The Little Mermaid
+6                                The Untouchables
+7                               Castle in the Sky
+8                                        Heathers
+9                              Dangerous Liaisons
+10                          Good Morning, Vietnam
+11                                     Spaceballs
+12                        When Harry Met Sally...
+13                                            Big
+14                                        Tin Men
+15                               The Last Emperor
+16                                         Batman
+17                             The Princess Bride
+18                               Crocodile Dundee
+19                                   Working Girl
+20                                       Hoosiers
+21                                   Tango & Cash
+22                                    Bull Durham
+23                     Throw Momma from the Train
+24                              Casualties of War
+25                                       9½ Weeks
+26                                   Major League
+27                                     Uncle Buck
+28                  Tucker: The Man and His Dream
+29                                Ghostbusters II
+30                           The War of the Roses
+31                                 At Close Range
+32                                        Platoon
+33                                 Broadcast News
+34                       Sex, Lies, and Videotape
+35                            A Fish Called Wanda
+36                                   My Left Foot
+37                               Fatal Attraction
+38                       Children of a Lesser God
+39                                       Ironweed
+40                         Little Shop of Horrors
+41                                     Lean on Me
+42                                    Wall Street
+43                        Crimes and Misdemeanors
+44                                 Something Wild
+45                                    Blue Velvet
+46                             Dead Poets Society
+47                             Do the Right Thing
+48                  The Last Temptation of Christ
+49                   Planes, Trains & Automobiles
+50                                          Glory
+51                                     Young Guns
+52                                Say Anything...
+53                                       Die Hard
+54                         Hannah and Her Sisters
+55                            Crimes of the Heart
+56                                Tequila Sunrise
+57                              Full Metal Jacket
+58                     Born on the Fourth of July
+59                                Raising Arizona
+60                                     Moonstruck
+61                       Ferris Bueller's Day Off
+62                                     Radio Days
+63                                        Top Gun
+64          National Lampoon's Christmas Vacation
+65                                  Lethal Weapon
+66                                    Beetlejuice
+67                             My Neighbor Totoro
+68               Bill & Ted's Excellent Adventure
+69                                    The Accused
+70                                       Predator
+71                        The Fabulous Baker Boys
+72                                 ¡Three Amigos!
+73                             The Color of Money
+74                      The Great Mouse Detective
+75                             Driving Miss Daisy
+76                                 Less Than Zero
+77              The Unbearable Lightness of Being
+78             Indiana Jones and the Last Crusade
+79                       Honey, I Shrunk the Kids
+80                           The Land Before Time
+81                            Mississippi Burning
+82                     Back to the Future Part II
+83                                        The Fly
+84                                Field of Dreams
+85                                       Rain Man
+86                        Who Framed Roger Rabbit
+87                                  Another Woman
+
-- 
GitLab