From 6a3f0ac68a0d649b85575dd61ef4bd26efb3ac81 Mon Sep 17 00:00:00 2001
From: antirez <antirez@gmail.com>
Date: Tue, 17 Apr 2012 16:28:50 +0200
Subject: [PATCH] Added test for SORT corner case: pattern ending with just
 "->".

---
 tests/unit/sort.tcl | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/tests/unit/sort.tcl b/tests/unit/sort.tcl
index ba412254..5a181641 100644
--- a/tests/unit/sort.tcl
+++ b/tests/unit/sort.tcl
@@ -190,6 +190,13 @@ start_server {
         r sort myset by score:*
     } {a aa aaa azz b c d e f g h i l m n o p q r s t u v z}
 
+    test "SORT GET with pattern ending with just -> does not get hash field" {
+        r del mylist
+        r lpush mylist a
+        r set x:a-> 100
+        r sort mylist by num get x:*->
+    } {100}
+
     tags {"slow"} {
         set num 100
         set res [create_random_dataset $num lpush]