1
0
mirror of https://github.com/gnosygnu/xowa.git synced 2026-03-02 03:49:30 +00:00

TemplateStyles: Add XoCssMin from @desb42 [#704]

This commit is contained in:
gnosygnu
2020-04-19 08:54:54 -04:00
parent e9e5724a2a
commit 73a56ffab3
11 changed files with 807 additions and 42 deletions

View File

@@ -0,0 +1,27 @@
package gplx.langs.javascripts;
import gplx.core.tests.Gftest;
import org.junit.Test;
public class JsString_Test {
private final JsString_Tstr tstr = new JsString_Tstr();
@Test public void slice() {
tstr.Test_slice("bgn.positive.basic", "bc" , "abc", 1);
tstr.Test_slice("bgn.positive.large", "" , "abc", 4);
tstr.Test_slice("bgn.negative.basic", "c" , "abc", -1);
tstr.Test_slice("bgn.negative.large", "abc", "abc", -4);
tstr.Test_slice("end.positive.basic", "b" , "abc", 1, 2);
tstr.Test_slice("end.positive.eos" , "bc" , "abc", 1, 3);
tstr.Test_slice("end.positive.large", "bc" , "abc", 1, 4);
tstr.Test_slice("end.negative.basic", "b" , "abc", 1, -1);
tstr.Test_slice("end.negative.large", "" , "abc", 1, -4);
}
}
class JsString_Tstr {
public void Test_slice(String note, String expd, String src, int bgn) {
Gftest.Eq__str(expd, JsString_.slice(src, bgn), note);
}
public void Test_slice(String note, String expd, String src, int bgn, int end) {
Gftest.Eq__str(expd, JsString_.slice(src, bgn, end), note);
}
}