monotone-commits-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Monotone-commits-diffs] net.venge.monotone.lua-5.2: a6ed8b0418b6e6bd14a


From: code
Subject: [Monotone-commits-diffs] net.venge.monotone.lua-5.2: a6ed8b0418b6e6bd14a409841d4d084a8c2fdbb1
Date: Wed, 25 Apr 2012 16:25:45 +0200 (CEST)

revision:            a6ed8b0418b6e6bd14a409841d4d084a8c2fdbb1
date:                2012-04-25T14:24:42
author:              Richard Levitte <address@hidden>
branch:              net.venge.monotone.lua-5.2
changelog:
* test/func/automate_get_attributes/__driver__.lua,
  test/func/automate_inventory_ignore_dirs/__driver__.lua,
  test/func/automate_set_drop_attribute/__driver__.lua,
  test/func/netsync_negotiation/__driver__.lua: As documented in
  http://www.lua.org/manual/5.1/manual.html#7.1 :
  Function table.setn was deprecated. Function table.getn corresponds to
  the new length operator (#); use the operator instead of the function.

manifest:
format_version "1"

new_manifest [b209ef7a1c9da839ce44bd52ff47c9a6eb1994bb]

old_revision [070069619eb6319267ed5468b49dacb730ab749e]

patch "test/func/automate_get_attributes/__driver__.lua"
 from [cd69b24a950d6c100143f4267cb9f22f3877ad75]
   to [3c820fcccbd5102c4bb3a4e9c01233de137aa21a]

patch "test/func/automate_inventory_ignore_dirs/__driver__.lua"
 from [7afec31b9343b5e6d95f0d0bc30aa661254d7aeb]
   to [8b022036bd487f071752e21a3da566bc664c5995]

patch "test/func/automate_set_drop_attribute/__driver__.lua"
 from [5a090a94f10ebfa6ddb7378f9a285865ce881245]
   to [3d759e4395849775e5194721e6f5b05f50080644]

patch "test/func/netsync_negotiation/__driver__.lua"
 from [38cd5d9df0e16cf05d59f0d9525ae546a9654f5f]
   to [0b30d988c62dfc2aa3c4a7e0021b3395faba8609]
============================================================
--- test/func/automate_get_attributes/__driver__.lua	cd69b24a950d6c100143f4267cb9f22f3877ad75
+++ test/func/automate_get_attributes/__driver__.lua	3c820fcccbd5102c4bb3a4e9c01233de137aa21a
@@ -28,7 +28,7 @@ parsed = parse_basic_io(readfile("stdout
 check(fsize("stderr") == 0)
 parsed = parse_basic_io(readfile("stdout"))
 -- make sure the output generated 8 stanzas
-check(table.getn(parsed) == 8)
+check(#parsed == 8)
 lastkey = ""
 checked = {}
 for _,l in pairs(parsed) do
@@ -108,7 +108,7 @@ parsed = parse_basic_io(readfile("stdout
 check(mtn("automate", "get_attributes", "testfile", "-r", rev), 0, true, false)
 
 parsed = parse_basic_io(readfile("stdout"))
-check(table.getn(parsed) == 6)
+check(#parsed == 6)
 
 lastkey = ""
 checked = {}
============================================================
--- test/func/automate_inventory_ignore_dirs/__driver__.lua	7afec31b9343b5e6d95f0d0bc30aa661254d7aeb
+++ test/func/automate_inventory_ignore_dirs/__driver__.lua	8b022036bd487f071752e21a3da566bc664c5995
@@ -14,7 +14,7 @@ function sortContentsByLine(input)
   table.insert(lines, string.sub(input, theStart))
   table.sort(lines)
 
-  local len = table.getn(lines)
+  local len = #lines
   local output = lines[1]
   for i = 2, len do
     output = output .. delimiter .. lines[i]
============================================================
--- test/func/automate_set_drop_attribute/__driver__.lua	5a090a94f10ebfa6ddb7378f9a285865ce881245
+++ test/func/automate_set_drop_attribute/__driver__.lua	3d759e4395849775e5194721e6f5b05f50080644
@@ -25,7 +25,7 @@ parsed = parse_basic_io(readfile("stdout
 check(mtn("automate", "get_attributes", "testfile"), 0, true, false)
 parsed = parse_basic_io(readfile("stdout"))
 
-check(table.getn(parsed) == 2)
+check(#parsed == 2)
 for _,l in pairs(parsed) do
     if l.name == "attr" then
         key = l.values[1]
@@ -44,7 +44,7 @@ parsed = parse_basic_io(readfile("stdout
 -- check if it has been really dropped
 check(mtn("automate", "get_attributes", "testfile"), 0, true, false)
 parsed = parse_basic_io(readfile("stdout"))
-check(table.getn(parsed) == 0)
+check(#parsed == 0)
 
 -- check if it escalates properly if there is no such attr to drop
 check(mtn("automate", "drop_attribute", "testfile", "foo"), 1, false, true)
============================================================
--- test/func/netsync_negotiation/__driver__.lua	38cd5d9df0e16cf05d59f0d9525ae546a9654f5f
+++ test/func/netsync_negotiation/__driver__.lua	0b30d988c62dfc2aa3c4a7e0021b3395faba8609
@@ -87,10 +87,10 @@ function check_same_revs(cmd1, cmd2)
    check(cmd2, 0, true, false)
    local data2 = {}
    for l in io.lines("stdout") do table.insert(data2, l) end
-   L("Command 1 has ", table.getn(data1), " lines.")
-   L("Command 2 has ", table.getn(data2), " lines.")
-   check(table.getn(data1) == table.getn(data2))
-   for i = 1, table.getn(data1) do
+   L("Command 1 has ", #data1, " lines.")
+   L("Command 2 has ", #data2, " lines.")
+   check(#data1 == #data2)
+   for i = 1, #data1 do
       local hash_len = 40
       check(data1[i]:sub(1, hash_len) == data2[i]:sub(1, hash_len))
    end

reply via email to

[Prev in Thread] Current Thread [Next in Thread]