1
1
mirror of https://github.com/wader/fq.git synced 2024-12-27 15:42:07 +03:00
fq/pkg/interp/testdata/basic.fqtest

53 lines
1.2 KiB
Plaintext
Raw Normal View History

2020-06-08 03:29:51 +03:00
# ffmpeg -f lavfi -i sine -t 10ms test.mp3
/test.mp3:
2021-08-13 17:40:28 +03:00
$ fq -d mp3 '.headers[0].magic == "ID3"' /test.mp3
2020-06-08 03:29:51 +03:00
true
2021-08-13 17:40:28 +03:00
$ fq -d mp3 '.headers[0].version == 4' /test.mp3
2020-06-08 03:29:51 +03:00
true
2021-08-13 17:40:28 +03:00
$ fq -d mp3 '.frames[0].header.protection == true' /test.mp3
2020-06-08 03:29:51 +03:00
true
2021-08-13 17:40:28 +03:00
$ fq -d mp3 '.headers[0].flags + {}' /test.mp3
2020-06-08 03:29:51 +03:00
{
"experimental_indicator": false,
"extended_header": false,
"unsynchronisation": false,
"unused": 0
}
2021-08-13 17:40:28 +03:00
$ fq -d mp3 '._unknown' /test.mp3
2020-06-08 03:29:51 +03:00
false
2021-08-13 17:40:28 +03:00
$ fq -d mp3 '._format' /test.mp3
2020-06-08 03:29:51 +03:00
"mp3"
2021-08-13 17:40:28 +03:00
$ fq -d mp3 '.headers[0].magic._format' /test.mp3
2020-06-08 03:29:51 +03:00
null
2021-08-13 17:40:28 +03:00
$ fq -d raw '._bytes | string'
2020-06-08 03:29:51 +03:00
"abc\n"
stdin:
abc
2021-08-13 17:40:28 +03:00
$ fq -n "{a: 123, b: []} | debug"
2020-06-08 03:29:51 +03:00
{
"a": 123,
"b": []
}
stderr:
["DEBUG",{"a":123,"b":[]}]
2021-08-13 17:40:28 +03:00
$ fq -n options
2020-06-08 03:29:51 +03:00
{
"addrbase": 16,
"bitsformat": "snippet",
2020-06-08 03:29:51 +03:00
"bytecolors": "0-0xff=brightwhite,0=brightblack,32-126:9-13=white",
"color": false,
"colors": "array=white,dumpaddr=yellow,dumpheader=yellow+underline,error=brightred,false=yellow,index=white,null=brightblack,number=cyan,object=white,objectkey=brightblue,string=green,true=yellow,value=white",
"compact": false,
"decodeprogress": false,
"depth": 0,
"displaybytes": 16,
"joinstring": "\n",
"linebytes": 16,
"raw": false,
"rawstring": false,
"repl": false,
"sizebase": 10,
"unicode": false,
"verbose": false
}