Ver Fonte

[php] minor clean

Aleksandr Kuzmenko há 6 anos atrás
pai
commit
9a166eb457
2 ficheiros alterados com 2 adições e 8 exclusões
  1. 1 3
      std/php/_std/Sys.hx
  2. 1 5
      tests/unit/src/unit/TestBasetypes.hx

+ 1 - 3
std/php/_std/Sys.hx

@@ -26,8 +26,6 @@ import sys.io.FileInput;
 import haxe.SysTools;
 
 @:coreApi class Sys {
-	static var lineEnd:String = Sys.systemName() == "Windows" ? "\r\n" : "\n";
-
 	/** Environment variables set by `Sys.putEnv()` */
 	static var customEnvVars = new NativeAssocArray<String>();
 
@@ -36,7 +34,7 @@ import haxe.SysTools;
 	}
 
 	public static inline function println(v:Dynamic):Void {
-		Global.echo(Std.string(v) + lineEnd);
+		Global.echo(Std.string(v) + Const.PHP_EOL);
 	}
 
 	public static function args():Array<String> {

+ 1 - 5
tests/unit/src/unit/TestBasetypes.hx

@@ -31,13 +31,9 @@ class TestBasetypes extends Test {
 		unspec(function() String.fromCharCode(0));
 		unspec(function() String.fromCharCode(-1));
 		unspec(function() String.fromCharCode(256));
-#if php
-		eq( Std.string(null) + "x", "nullx" );
-		eq( "x" + Std.string(null), "xnull" );
-#else
+
 		eq( null + "x", "nullx" );
 		eq( "x" + null, "xnull" );
-#end
 
 		var abc = "abc".split("");
 		eq( abc.length, 3 );