Match only accepts regular expressions
This commit is contained in:
parent
0560b772f1
commit
d6999de0da
@ -71,7 +71,7 @@ public class Match implements Function {
|
||||
|
||||
return null;
|
||||
}
|
||||
return new EvalError(ControlFunctionRegistry.getFunctionName(this) + " expects a string or a regexp");
|
||||
return new EvalError(ControlFunctionRegistry.getFunctionName(this) + " expects a regexp");
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -81,7 +81,7 @@ public class Match implements Function {
|
||||
|
||||
@Override
|
||||
public String getParams() {
|
||||
return "string or regexp";
|
||||
return "regexp";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -34,7 +34,7 @@ import com.google.refine.tests.util.TestUtils;
|
||||
public class MatchTests {
|
||||
@Test
|
||||
public void serializeMatch() {
|
||||
String json = "{\"description\":\"Returns an array of the groups matching the given regular expression\",\"params\":\"string or regexp\",\"returns\":\"array of strings\"}";
|
||||
String json = "{\"description\":\"Returns an array of the groups matching the given regular expression\",\"params\":\"regexp\",\"returns\":\"array of strings\"}";
|
||||
TestUtils.isSerializedTo(new Match(), json);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user