Comments (10)
You can see how I'm checking for the console here:
This can throw an exception, so wrap in try/catch block. Exception probably means no console available, that's what I assume anyways.
You can always assign this to a variable, debug your tests, and see if that variable is true/false.
from betterconsoletables.
No i dont. It worked then in 2022. Probably still works. Not using this app at the moment. I like library. It works fine for me. You can close, thx.
from betterconsoletables.
I cleaned this up in test so it can pass
just letting you know about it if u didnt encoutered it
from betterconsoletables.
Can you provide a formatted (three backticks, code block) example of the output for the VS run and the dotnet cli run for comparison?
from betterconsoletables.
Sorry i dont know this formating thing.
This is output to txt file from VSCode run test
VSCode-RunAllTests.zip
This is output from dotnet test
Dotnet test.zip
I use notepad++ with endline switch on or this https://www.diffchecker.com/. To compare it.
My test table looks like this
[17:57:14 INF] Read Item
┌──────┬───────────┐
│ Id │ Name │
├──────┼───────────┤
│ 1639 │ Christine │
└──────┴───────────┘
I add code like this, to clean white spaces so test will pass
var linesOut = outputText!.Split(EOL).ToList();
var length = linesOut[0].IndexOf("┐") + 1;
linesOut[0] = linesOut[0].Substring(0, length);
linesOut[2] = linesOut[2].Substring(0, length);
linesOut[4] = linesOut[4].Substring(0, length);
PrintToFile(expected, linesOut);
outputText = string.Join(EOL, linesOut);
Assert.Equal(expected, outputText);
Not a big deal, still learning to use this lib.
from betterconsoletables.
Looks like they are different
VSCode RunAllTests:
- Expected:
839dc8c1e298ab9b30b90fe0ef018859deb7dfb2b8aee18f502dc8ffb4ee354d
- Actual:
839dc8c1e298ab9b30b90fe0ef018859deb7dfb2b8aee18f502dc8ffb4ee354d
Dotnet Test
- Expected:
cf64b2fefc18c9464e1aaddf82ef4b90bb7a938722a57e9c54911d836ea979fd
- Actual:
fe4b8563de8560584489246a53ddf4d0cfe66637a7fdd7053e8d7abceaadbcd9
Are either of these being ran in a terminal or with a console available at runtime, or are they being ran headless?
The dotnet test one is padding the end of the output with whitespace, which is behavior I would expect if Console
is available at runtime.
from betterconsoletables.
sorry i dont know
I just use Link in class test to run tests from VSCode
and in VSCode terminal i type dotnet test to run theese. i dont know how this affects stuff.
I also use CommandDotNet lib
It was just something weird for me so i wanted to show it to better coder.
I'am implementing rest of the columns and it;s not a problem.
from betterconsoletables.
Unfortunately I would need to know if Console is available to further help debug this and/or a repro that I can run.
You can test this by asserting if the console is or is not available during your tests.
from betterconsoletables.
Code is in my repos (inventory-min-cli-app), it's difficult to build thow since it consists of many separate projects.
I dont know how to assert this. Will google this.
from betterconsoletables.
Do you still need he;p with this problem?
from betterconsoletables.
Related Issues (20)
- Version 2 (Colors, New API, and More) HOT 7
- Buffer size to be too large. HOT 6
- Html output HOT 4
- IndexOutOfRangeException when no rows were given HOT 4
- Version 2 default table text color HOT 10
- Exception when piping to file HOT 6
- Live table updates HOT 5
- [Bug] [Hard] Inner/Custom formatting in cells can reset that cells general formatting
- [Enhancement] Add pseudo-bold & dim for RGB colors
- Error no rows HOT 5
- [BUG] RPI 4 ARM Linux System.PlatformNotSupportedException "Popcnt.PopCount" HOT 2
- header width not quite right HOT 3
- Print tables side-by-side. HOT 3
- Multiline support in a Cell HOT 5
- ForegroundColor seems to break the table. HOT 3
- [Enhancement] Make formatting for Table.From() path easier
- Cant find ns for Column HOT 4
- [Feature Request] Add rendering to image HOT 1
- Chinese is not supported HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from betterconsoletables.