X-Git-Url: https://www.tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=test%2Fvariables.test;h=6ae0b7975aeb412a2174300d4ceac3f8a10e9acb;hp=f8656c9309fb98c953165d1b3a9e33b830fc0b7b;hb=44f30239c1650877f8f1a4d9a5b56f0dbd0e3ea2;hpb=c33dd41c07c4c4578f546798264b7f467d6a7866 diff --git a/test/variables.test b/test/variables.test index f8656c93..6ae0b797 100755 --- a/test/variables.test +++ b/test/variables.test @@ -5,18 +5,18 @@ # Initialize one node $tinc $c1 init foo -test "`$tinc $c1 get Name`" = "foo" +test "`$tinc $c1 get Name | sed 's/\r//'`" = "foo" # Test case sensitivity $tinc $c1 set Mode switch -test "`$tinc $c1 get Mode`" = "switch" -test "`$tinc $c1 get mode`" = "switch" +test "`$tinc $c1 get Mode | sed 's/\r//'`" = "switch" +test "`$tinc $c1 get mode | sed 's/\r//'`" = "switch" $tinc $c1 set mode router -test "`$tinc $c1 get Mode`" = "router" -test "`$tinc $c1 get mode`" = "router" +test "`$tinc $c1 get Mode | sed 's/\r//'`" = "router" +test "`$tinc $c1 get mode | sed 's/\r//'`" = "router" $tinc $c1 set Mode Switch -test "`$tinc $c1 get Mode`" = "Switch" +test "`$tinc $c1 get Mode | sed 's/\r//'`" = "Switch" # Test deletion @@ -28,7 +28,7 @@ test -z "`$tinc $c1 get Mode`" $tinc $c1 add Mode switch $tinc $c1 add Mode hub -test "`$tinc $c1 get Mode`" = "hub" +test "`$tinc $c1 get Mode | sed 's/\r//'`" = "hub" # Test addition/deletion of multivalued variables @@ -36,11 +36,11 @@ $tinc $c1 add Subnet 1 $tinc $c1 add Subnet 2 $tinc $c1 add Subnet 2 $tinc $c1 add Subnet 3 -test "`$tinc $c1 get Subnet`" = "1 +test "`$tinc $c1 get Subnet | sed 's/\r//'`" = "1 2 3" $tinc $c1 del Subnet 2 -test "`$tinc $c1 get Subnet`" = "1 +test "`$tinc $c1 get Subnet | sed 's/\r//'`" = "1 3" $tinc $c1 del Subnet test -z "`$tinc $c1 get Subnet`" @@ -56,17 +56,17 @@ touch $d1/hosts/bar $tinc $c1 add bar.PMTU 1 $tinc $c1 add bar.PMTU 2 -test "`$tinc $c1 get bar.PMTU`" = "2" +test "`$tinc $c1 get bar.PMTU | sed 's/\r//'`" = "2" $tinc $c1 add bar.Subnet 1 $tinc $c1 add bar.Subnet 2 $tinc $c1 add bar.Subnet 2 $tinc $c1 add bar.Subnet 3 -test "`$tinc $c1 get bar.Subnet`" = "1 +test "`$tinc $c1 get bar.Subnet | sed 's/\r//'`" = "1 2 3" $tinc $c1 del bar.Subnet 2 -test "`$tinc $c1 get bar.Subnet`" = "1 +test "`$tinc $c1 get bar.Subnet | sed 's/\r//'`" = "1 3" $tinc $c1 del bar.Subnet test -z "`$tinc $c1 get bar.Subnet`" @@ -81,6 +81,6 @@ $tinc $c1 set qu-ux.Subnet 1 && exit 1 || true $tinc $c1 set PrivateKey 12345 && exit 1 || true $tinc $c1 --force set PrivateKey 12345 -test "`$tinc $c1 get PrivateKey`" = "12345" +test "`$tinc $c1 get PrivateKey | sed 's/\r//'`" = "12345" $tinc $c1 del PrivateKey test -z "`$tinc $c1 get PrivateKey`"