diff --git a/app/tests/Makefile.am b/app/tests/Makefile.am
index 6acfe07..620b221 100644
--- a/app/tests/Makefile.am
+++ b/app/tests/Makefile.am
@@ -11,6 +11,7 @@ TESTS_ENVIRONMENT = \
 	GIMP_TESTING_ABS_TOP_BUILDDIR=@abs_top_builddir@
 
 TESTS = \
+	test1			\
 	test-core		\
 	test-session-management	\
 	test-ui			\
diff --git a/app/tests/test1.c b/app/tests/test1.c
new file mode 100644
index 0000000..eca8886
--- /dev/null
+++ b/app/tests/test1.c
@@ -0,0 +1,251 @@
+/* GIMP - The GNU Image Manipulation Program
+ * Copyright (C) 2009 Martin Nordholts <martinn@src.gnome.org>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <string.h>
+
+#include <gegl.h>
+#include <gtk/gtk.h>
+
+#include "libgimpmath/gimpmathtypes.h"
+#include "libgimpmath/gimpmatrix.h"
+
+#include "base/base-types.h"
+#include "base/pixel-region.h"
+#include "base/temp-buf.h"
+#include "base/tile-manager.h"
+
+#include "core/core-types.h"
+#include "core/gimp.h"
+#include "core/gimpcontext.h"
+#include "core/gimpdrawable-transform.h"
+#include "core/gimpimage.h"
+#include "core/gimplayer.h"
+
+#include "tests.h"
+
+#include "gimp-app-test-utils.h"
+
+static const guchar dark[4] = { 64, 64, 64, 255 };
+static const guchar light[4] = { 192, 192, 192, 255 };
+
+static TempBuf *
+fill_inside (TempBuf      *buffer,
+             gint          thickness,
+             const guchar *color)
+{
+  guchar *data = temp_buf_get_data (buffer);
+  gint    w    = buffer->width;
+  gint    h    = buffer->height;
+  gint    b    = buffer->bytes;
+  gint    j;
+
+  data += (w + 1) * thickness * b;
+
+  for (j = 0; j < w - 2 * thickness; ++j)
+    memcpy (&data[j * b], color, b);
+
+  for (j = 1; j < h - 2 * thickness; ++j)
+    memcpy (&data[j * w * b], data, b * (w - 2 * thickness));
+
+  return buffer;
+}
+
+static TileManager*
+prepare_tiles (TempBuf* buffer,
+               gint     repeat_x,
+               gint     repeat_y)
+{
+  const gint   W     = buffer->width * repeat_x;
+  const gint   H     = buffer->height * repeat_y;
+  TileManager *tiles = tile_manager_new (W, H, buffer->bytes);
+  const guchar *data = temp_buf_get_data (buffer);
+  gint         i, j;
+
+  for (i = 0; i < H; i += buffer->height)
+    for (j = 0; j < W; j += buffer->width)
+      write_pixel_data (tiles,
+                        j, i, j + buffer->width, i + buffer->height,
+                        data, buffer->width * buffer->bytes);
+
+
+  return tiles;
+}
+
+static GimpLayer*
+prepare_layer (Gimp    *gimp,
+               TempBuf *pattern,
+               gint     x_rep,
+               gint     y_rep)
+{
+  const gint W     = pattern->width  * x_rep;
+  const gint H     = pattern->height * y_rep;
+  GimpImage *image = gimp_image_new (gimp, W, H, GIMP_GRAY);
+
+  if (image)
+    {
+      TileManager *tiles = prepare_tiles (pattern,
+                                          x_rep, y_rep);
+
+      if (tiles)
+        {
+          GimpLayer *layer = gimp_layer_new_from_tiles (tiles,
+                                                        image,
+                                                        GIMP_GRAY_IMAGE,
+                                                        "layer",
+                                                        1.,
+                                                        GIMP_NORMAL_MODE);
+          tile_manager_unref (tiles);
+
+          if (layer)
+            {
+              gimp_image_add_layer (image, layer, NULL, 0, FALSE);
+
+              return layer;
+            }
+        }
+    }
+
+  g_assert_not_reached ();
+
+  return NULL;
+}
+
+static gboolean
+is_solid_region (PixelRegion *r, guint greylevel)
+{
+  gboolean solid = TRUE;
+  gpointer pr = pixel_regions_register (1, r);
+
+  while (pr)
+    {
+      gint  i;
+
+      for (i = 0; i < r->h * r->w; ++i)
+        solid = solid && (r->data [i * r->bytes] == greylevel);
+
+      pr = pixel_regions_process (pr);
+    }
+
+
+  return solid;
+}
+
+static gboolean
+is_solid_layer (GimpLayer* layer, guint greylevel)
+{
+  PixelRegion PR;
+  gint        w = gimp_item_get_width (GIMP_ITEM (layer));
+  gint        h = gimp_item_get_height (GIMP_ITEM (layer));
+
+  pixel_region_init (&PR,
+                     gimp_drawable_get_tiles (GIMP_DRAWABLE (layer)),
+                     0, 0, w, h, FALSE);
+
+  return is_solid_region (&PR, greylevel);
+}
+
+static const gint width          = 15;
+static const gint height         = 15;
+static const gint scaling_factor = 17;
+static const gint thickness      = 1;
+
+static void
+downscaling_gimp_item_scale (gconstpointer data)
+{
+  TempBuf   *pat   = temp_buf_new (scaling_factor, scaling_factor, 1, 0,0, dark);
+  GimpLayer *layer = prepare_layer (GIMP (data),
+                                    fill_inside (pat, thickness, light),
+                                    width, height);
+
+  gimp_item_scale (GIMP_ITEM (layer),
+                   width, height,
+                   0, 0,
+                   GIMP_INTERPOLATION_NONE, NULL);
+
+  g_assert_cmpint (is_solid_layer (layer, light[0]), ==, TRUE);
+
+  g_object_unref (gimp_item_get_image (GIMP_ITEM (layer)));
+  temp_buf_free (pat);
+}
+
+static void
+downscaling_gimp_drawable_transform_affine (gconstpointer data)
+{
+  GimpMatrix3  matrix;
+  Gimp        *gimp  = GIMP (data);
+  GimpContext *dummy = gimp_context_new (gimp, "dummy", NULL);
+  TempBuf     *pat   = temp_buf_new (scaling_factor, scaling_factor, 1, 0,0, dark);
+  GimpLayer   *layer = prepare_layer (gimp,
+                                      fill_inside (pat, thickness, light),
+                                      width, height);
+
+  gimp_matrix3_identity (&matrix);
+  gimp_matrix3_scale    (&matrix, 1. / scaling_factor, 1. / scaling_factor);
+
+  gimp_drawable_transform_affine (GIMP_DRAWABLE (layer),
+                                  dummy,
+                                  &matrix,
+                                  GIMP_TRANSFORM_FORWARD,
+                                  GIMP_INTERPOLATION_NONE,
+                                  3,
+                                  FALSE,
+                                  NULL);
+
+  g_assert_cmpint (is_solid_layer (layer, light[0]), ==, TRUE);
+
+  g_object_unref (gimp_item_get_image (GIMP_ITEM (layer)));
+  g_object_unref (dummy);
+  temp_buf_free (pat);
+}
+
+int
+main (int argc, char **argv)
+{
+  Gimp *gimp   = NULL;
+  gint  result = -1;
+
+  gtk_test_init (&argc, &argv, NULL);
+
+  gimp_test_utils_set_gimp2_directory ("GIMP_TESTING_ABS_TOP_SRCDIR",
+                                       "app/tests/gimpdir");
+  gimp_test_utils_setup_menus_dir ();
+
+  /* Start up GIMP */
+  gimp = gimp_init_for_gui_testing (TRUE, FALSE);
+
+  /* Add tests */
+  g_test_add_data_func ("/interpolation-none/gimp_item_scale",
+                        gimp,
+                        downscaling_gimp_item_scale);
+
+  g_test_add_data_func ("/interpolation-none/gimp_drawable_transform_affine",
+                        gimp,
+                        downscaling_gimp_drawable_transform_affine);
+
+  /* Run the tests and return status */
+  result = g_test_run ();
+
+  /* Don't write files to the source dir */
+  gimp_test_utils_set_gimp2_directory ("GIMP_TESTING_ABS_TOP_BUILDDIR",
+                                      "app/tests/gimpdir-output");
+
+  /* Exit properly so we don't break script-fu plug-in wire */
+  gimp_exit (gimp, TRUE);
+
+  return result;
+}
+
