~davewalker/etherpad/ubuntu-unlimited-max-users-and-revisions

« back to all changes in this revision

Viewing changes to etherpad/src/etherpad/testing/unit_tests/t0003_persistent_vars.js

  • Committer: James Page
  • Date: 2011-04-13 08:00:43 UTC
  • Revision ID: james.page@canonical.com-20110413080043-eee2nq7y1v7cv2mp
* Refactoring to use native Ubuntu Java libraries. 
* debian/control:
  - use openjdk instead of sun's java
  - update maintainer
* debian/etherpad.init.orig, debian/etherpad.upstart:
  - move the init script out of the way
  - create a basic upstart script
  - note that the open office document conversion daemon was dropped
    from the upstart configuration; if this behavior is desired, please
    create a separate upstart job for it
* debian/rules:
  - just use basic dh_installinit, as it will pick up the new upstart job
* New release
* Changed maintainer to Packaging
* Fixed installation scripts
* Initial Release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/**
 
2
 * Copyright 2009 Google Inc.
 
3
 * 
 
4
 * Licensed under the Apache License, Version 2.0 (the "License");
 
5
 * you may not use this file except in compliance with the License.
 
6
 * You may obtain a copy of the License at
 
7
 * 
 
8
 *      http://www.apache.org/licenses/LICENSE-2.0
 
9
 * 
 
10
 * Unless required by applicable law or agreed to in writing, software
 
11
 * distributed under the License is distributed on an "AS-IS" BASIS,
 
12
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 
13
 * See the License for the specific language governing permissions and
 
14
 * limitations under the License.
 
15
 */
 
16
 
 
17
import("sqlbase.persistent_vars");
 
18
 
 
19
import("stringutils");
 
20
 
 
21
import("etherpad.testing.testutils.*");
 
22
 
 
23
function run() {
 
24
  var varname = stringutils.randomString(50);
 
25
  var varval = stringutils.randomString(50);
 
26
 
 
27
  var x = persistent_vars.get(varname);
 
28
  assertTruthy(!x);
 
29
 
 
30
  persistent_vars.put(varname, varval);
 
31
 
 
32
  for (var i = 0; i < 3; i++) {
 
33
    x = persistent_vars.get(varname);
 
34
    assertTruthy(x == varval);
 
35
  }
 
36
 
 
37
  persistent_vars.remove(varname);
 
38
 
 
39
  var x = persistent_vars.get(varname);
 
40
  assertTruthy(!x);
 
41
}
 
42