芝麻web文件管理V1.00
编辑当前文件:/home2/sdektunc/airport-back/vendor/bower-asset/inputmask/qunit/tests_escape.js
export default function(qunit, $, Inputmask) { qunit.module("Escape character"); qunit.test("inputmask(\"9\\|9\")", function(assert) { var $fixture = $("#qunit-fixture"); $fixture.append('
'); var testmask = document.getElementById("testmask"); var input = $("#testmask"); Inputmask("9\\|9").mask(testmask); testmask.focus(); $("#testmask").Type("23"); assert.equal(testmask.value, "2|3", "Result " + testmask.value); }); qunit.test("inputmask(\"9\\[9\\]\")", function(assert) { var $fixture = $("#qunit-fixture"); $fixture.append('
'); var testmask = document.getElementById("testmask"); var input = $("#testmask"); Inputmask("9\\[9\\]").mask(testmask); testmask.focus(); $("#testmask").Type("23"); assert.equal(testmask.value, "2[3]", "Result " + testmask.value); }); qunit.test("inputmask(\"9\\\\9\")", function(assert) { var $fixture = $("#qunit-fixture"); $fixture.append('
'); var testmask = document.getElementById("testmask"); var input = $("#testmask"); Inputmask("9\\\\9").mask(testmask); testmask.focus(); $("#testmask").Type("23"); assert.equal(testmask.value, "2\\3", "Result " + testmask.value); }); qunit.test("inputmask(\"9\\{9\\}\")", function(assert) { var $fixture = $("#qunit-fixture"); $fixture.append('
'); var testmask = document.getElementById("testmask"); Inputmask("9\\{9\\}").mask(testmask); testmask.focus(); $("#testmask").Type("23"); assert.equal(testmask.value, "2{3}", "Result " + testmask.value); }); qunit.test("inputmask(\"9\\(9\\)\")", function(assert) { var $fixture = $("#qunit-fixture"); $fixture.append('
'); var testmask = document.getElementById("testmask"); Inputmask("9\\(9\\)").mask(testmask); testmask.focus(); $("#testmask").Type("23"); assert.equal(testmask.value, "2(3)", "Result " + testmask.value); }); qunit.test("inputmask(\"9\\?9\")", function(assert) { var $fixture = $("#qunit-fixture"); $fixture.append('
'); var testmask = document.getElementById("testmask"); Inputmask("9\\?9").mask(testmask); testmask.focus(); $("#testmask").Type("23"); assert.equal(testmask.value, "2?3", "Result " + testmask.value); }); qunit.test("inputmask(\"\\9999\") value not mask", function(assert) { var $fixture = $("#qunit-fixture"); $fixture.append('
'); var testmask = document.getElementById("testmask"); Inputmask("\\9999", { autoUnmask: true }).mask(testmask); testmask.focus(); assert.equal(testmask.inputmask._valueGet(), "9999", "Result " + testmask.inputmask._valueGet()); }); };